-
Notifications
You must be signed in to change notification settings - Fork 8
/
kiss_makefile
executable file
·52 lines (41 loc) · 1.22 KB
/
kiss_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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
C = gcc
#LDFLAGS = -LC:\SDL2-2.0.4\i686-w64-mingw32\lib \
-LC:\SDL2_ttf-2.0.14\i686-w64-mingw32\lib \
-LC:\SDL2_image-2.0.1\i686-w64-mingw32\lib \
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf \
-mwindows -march=i686
#CFLAGS = -IC:\SDL2-2.0.4\include \
-IC:\SDL2-2.0.4\i686-w64-mingw32\include \
-IC:\SDL2_ttf-2.0.14\i686-w64-mingw32\include \
-IC:\SDL2_image-2.0.1\i686-w64-mingw32\include \
-Wall -c -std=c89 -march=i686
#EXE1 = kiss_example1.exe
#EXE2 = kiss_example2.exe
LDFLAGS = -lSDL2 -lSDL2_image -lSDL2_ttf
CFLAGS = -Wall -c -std=c89
EXE1 = kiss_example1
EXE2 = kiss_example2
all: $(EXE1) $(EXE2)
$(EXE1): kiss_example1.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@
$(EXE2): kiss_example2.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@
kiss_example1.o: kiss_example1.c
$(C) $(CFLAGS) $^ -o $@
kiss_example2.o: kiss_example2.c
$(C) $(CFLAGS) $^ -o $@
kiss_widgets.o: kiss_widgets.c
$(C) $(CFLAGS) $^ -o $@
kiss_draw.o: kiss_draw.c
$(C) $(CFLAGS) $^ -o $@
kiss_general.o: kiss_general.c
$(C) $(CFLAGS) $^ -o $@
kiss_posix.o: kiss_posix.c
$(C) $(CFLAGS) $^ -o $@
clean:
rm *.o && rm $(EXE1) && rm $(EXE2)
# del *.o
# del $(EXE1)
# del $(EXE2)