-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (25 loc) · 792 Bytes
/
Makefile
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
32P := i686-w64-mingw32
64P := x86_64-w64-mingw32
SRC_DIR := src
OBJ_DIR := obj
SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES))
THR = -Lminhook32
SIX = -Lminhook
MH := -lminhook
LDFLAGS := -shared -s -static
CXXFLAGS := -Iinclude -fpermissive
all: resource.o kgsgrd.dll kgsgrd32.dll
resource.o:
$(64P)-windres resource.rc -o $(OBJ_DIR)/$@
resource32.o:
$(32P)-windres resource.rc -o minhook32/$@
kgsgrd32.dll: resource32.o
$(32P)-g++ -o $@ $(SRC_FILES) minhook32/resource32.o $(THR) $(MH) $(LDFLAGS) $(CXXFLAGS)
kgsgrd.dll: $(OBJ_FILES)
$(64P)-g++ -o $@ $(wildcard $(OBJ_DIR)/*.o) $(SIX) $(MH) $(LDFLAGS)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(64P)-g++ -c -o $@ $< $(CXXFLAGS)
clean:
mkdir -p $(OBJ_DIR)
rm -f *.dll