-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
78 lines (54 loc) · 1.67 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
CURRENT = apptest
ARGUMENTS =
OPTIMIZATION = -O0
DEBUG = -g3
ODEBUG = $(DEBUG)
ENVIRONMENTS_DIR = g2c/environments
LIBG2C_DIR = g2c/g2c
LIBG2C = $(LIBG2C_DIR)/libg2c.a
LIBENVIRONMENTS = $(ENVIRONMENTS_DIR)/libenvironments.a
include $(LIBG2C_DIR)/platform.mk
HAZEL = hazel.o game.o worldbase.o
LIB2D = math2d.o phys2d.o
current: $(CURRENT)
run: $(CURRENT)
./$(CURRENT) $(ARGUMENTS)
$(LIBG2C): force_look
$(MAKE) -C $(LIBG2C_DIR) libg2c.a
$(LIBENVIRONMENTS): force_look
$(MAKE) -C $(ENVIRONMENTS_DIR) libenvironments.a
apptest: $(LIBG2C) $(LIBENVIRONMENTS) $(LIB2D) $(HAZEL) apptest.cpp
c++ $(FLAGS) $(DEBUG) $(OPTIMIZATION) $(GLFLAGS) $(AUDIOFLAGS) \
-I$(ENVIRONMENTS_DIR) \
-I$(LIBG2C_DIR) \
apptest.cpp -o apptest \
$(LIBENVIRONMENTS)\
$(LIBG2C) \
$(HAZEL) \
$(LIB2D) \
$(GRAPHICS_LIBRARIES) \
$(AUDIO_LIBRARIES)
worldbase.cpp: hazel.world basegen.py
python basegen.py hazel.world WorldBase
worldbase.h: hazel.world basegen.py
python basegen.py hazel.world WorldBase
worldbase.o: worldbase.cpp worldbase.h
c++ $(FLAGS) -c $(DEBUG) $(OPTIMIZATION) -I$(LIBG2C_DIR) worldbase.cpp
math2d.o: lib2d/math2d.cpp lib2d/math2d.h
c++ -c $(DEBUG) -Ig2c/g2c $(OPTIMIZATION) -DGL_ON=1 lib2d/math2d.cpp
phys2d.o: lib2d/phys2d.cpp lib2d/phys2d.h lib2d/math2d.h
c++ -c $(DEBUG) -Ig2c/g2c $(OPTIMIZATION) -DGL_ON=1 lib2d/phys2d.cpp
hazel.o: hazel.cpp hazel.h
c++ $(FLAGS) -c $(DEBUG) $(OPTIMIZATION) -I$(LIBG2C_DIR) hazel.cpp
game.o: game.h game.cpp
c++ $(FLAGS) -c $(DEBUG) -Ig2c/g2c $(OPTIMIZATION) game.cpp
.PHONY: force_look
clean:
rm -f *.o
rm -f worldbase.cpp
rm -f worldbase.h
clean-all:
rm -f *.o
rm -f worldbase.cpp
rm -f worldbase.h
rm -f g2c/g2c/obj/*.o