diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..b5fdb2a --- /dev/null +++ b/makefile | |||
@@ -0,0 +1,27 @@ | |||
1 | RM = rm -f | ||
2 | SRCS = main.cpp GUI.cpp util.cpp engine.cpp enginecore.cpp | ||
3 | OBJS = $(subst .cpp,.o,$(SRCS)) | ||
4 | HEADS = $(subst .cpp,.h,$(SRCS)) | ||
5 | CFLAGS = -Wall -ggdb -O2 -c -Wno-sign-compare | ||
6 | LFLAGS = -Wall -ggdb -O2 -lSDL -lSDL_gfx -lSDL_image -lSDL_ttf -lSDL_mixer -Wno-sign-compare | ||
7 | |||
8 | Game: $(OBJS) | ||
9 | g++ $(OBJS) $(LFLAGS) -o Game | ||
10 | |||
11 | main.o: main.cpp $(HEADS) | ||
12 | g++ main.cpp $(CFLAGS) -o main.o | ||
13 | |||
14 | GUI.o: GUI.cpp GUI.h util.h | ||
15 | g++ GUI.cpp $(CFLAGS) -o GUI.o | ||
16 | |||
17 | util.o: util.cpp util.h | ||
18 | g++ util.cpp $(CFLAGS) -o util.o | ||
19 | |||
20 | engine.o: engine.cpp GUI.h util.h engine.h enginecore.h | ||
21 | g++ engine.cpp $(CFLAGS) -o engine.o | ||
22 | |||
23 | enginecore.o: enginecore.cpp util.h enginecore.h | ||
24 | g++ enginecore.cpp $(CFLAGS) -o enginecore.o | ||
25 | |||
26 | clean: | ||
27 | $(RM) $(OBJS) | ||