-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 776 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#Copyright (C). All rights reserved
CC := gcc
AR := ar
CFLAGES := -std=c11 -Wall -D NDEBUG
RM := del
#The name of the program
TARGET_NAME := cheatlib
dlls := capstone.dll keystone.dll
srcs := $(wildcard *.c)
objs := $(patsubst %.c,%.o, $(srcs))
x32: $(dlls) $(srcs)
$(CC) $(CFLAGES) -c -m32 $(srcs)
$(CC) $(CFLAGES) -shared -m32 $(objs) $(dlls) -o $(TARGET_NAME).dll
x64: $(dlls) $(srcs)
$(CC) $(CFLAGES) -c -m64 $(srcs) -D CHEATLIB_TARGET_X64
$(CC) $(CFLAGES) -shared -m64 $(objs) $(dlls) -o $(TARGET_NAME).dll -D CHEATLIB_TARGET_X64
x32s: $(srcs)
$(CC) $(CFLAGES) -static -c -m32 $(srcs)
$(AR) r cheatlib.lib $(objs)
x64s: $(srcs)
$(CC) $(CFLAGES) -static -c -m64 $(srcs) -D CHEATLIB_TARGET_X64
$(AR) r cheatlib.lib $(objs)
.PHONY: clean
clean:
-$(RM) *.o