summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile27
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 @@
1RM = rm -f
2SRCS = main.cpp GUI.cpp util.cpp engine.cpp enginecore.cpp
3OBJS = $(subst .cpp,.o,$(SRCS))
4HEADS = $(subst .cpp,.h,$(SRCS))
5CFLAGS = -Wall -ggdb -O2 -c -Wno-sign-compare
6LFLAGS = -Wall -ggdb -O2 -lSDL -lSDL_gfx -lSDL_image -lSDL_ttf -lSDL_mixer -Wno-sign-compare
7
8Game: $(OBJS)
9 g++ $(OBJS) $(LFLAGS) -o Game
10
11main.o: main.cpp $(HEADS)
12 g++ main.cpp $(CFLAGS) -o main.o
13
14GUI.o: GUI.cpp GUI.h util.h
15 g++ GUI.cpp $(CFLAGS) -o GUI.o
16
17util.o: util.cpp util.h
18 g++ util.cpp $(CFLAGS) -o util.o
19
20engine.o: engine.cpp GUI.h util.h engine.h enginecore.h
21 g++ engine.cpp $(CFLAGS) -o engine.o
22
23enginecore.o: enginecore.cpp util.h enginecore.h
24 g++ enginecore.cpp $(CFLAGS) -o enginecore.o
25
26clean:
27 $(RM) $(OBJS)