-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (24 loc) · 812 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
CC = clang++
CFLAGS = -Wall -std=c++11
EXE = wintile.exe
.PHONY: all
all: $(EXE)
wintile.exe: wintile.o wndhook.dll
$(CC) $(CFLAGS) -L./ -lwndhook $< -o $@ -mwindows
wintile.o: wintile.cc wintile.h wndhookdll.h
$(CC) $(CFLAGS) -c $<
wndhook.dll: wndhookdll.o
$(CC) $(CFLAGS) -shared $< -o $@
wndhookdll.o: wndhookdll.cc wndhookdll.h
$(CC) $(CFLAGS) -c $<
debug: wintile.o wndhook.dll
$(CC) $(CFLAGS) -S -g wintile.cc wndhookdll.cc
$(CC) $(CFLAGS) -c -g wintile.cc wndhookdll.cc
$(CC) $(CFLAGS) -shared wndhookdll.o -o wndhook.dll
$(CC) $(CFLAGS) -L./ -lwndhook wintile.o -o $(EXE) -mwindows
release: wintile.o wndhook.dll
$(CC) $(CFLAGS) -shared -s -DNDEBUG wndhookdll.o -o wndhook.dll
$(CC) $(CFLAGS) -L./ -lwndhook -s -DNDEBUG wintile.cc -o $(EXE) -mwindows
.PHONY: clean
clean:
rm *.o *.s