1 ############################################################
2 # Tsunagari Tile Engine primary source Makefile (gnu make) #
3 ############################################################
6 ### --- VARIABLES SECTION --- ###
8 # Compiler to use. (Suggested: "g++" or "clang")
11 # Warning flags to enable.
12 WFLAGS
= -Wall
-Wextra
-Wconversion
14 # Libraries to include.
15 LIBS
= -lboost_program_options
-lgosu
-lphysfs
$(shell xml2-config
--libs
)
17 # Compiler and linker flags.
18 CXXFLAGS
= $(BLDCFLAGS
) -pipe
-pedantic
-ansi
$(WFLAGS
) \
19 $(shell xml2-config
--cflags)
20 LDFLAGS
= $(BLDLDFLAGS
) $(LIBS
)
22 # Name of testing world.
23 TESTWORLD
= testing.world
26 ### --- MAIN SECTION --- ###
28 all: tsunagari
$(TESTWORLD
)
31 @
$(CXX
) $(CXXFLAGS
) -MM
*.
cpp | perl ..
/scripts
/filter-depend.pl
33 tsunagari
: animation.o area.o cmd.o common.o entity.o log.o main.o music.o \
34 player.o resourcer.o tile.o viewport.o window.o world.o xml.o
35 $(CXX
) -o tsunagari
*.o
$(LDFLAGS
)
38 cd
$(basename $@
) && zip
--symlinks
-r
-0 ..
/$@
*
41 $(RM
) tsunagari
*.o
$(TESTWORLD
)
44 ### --- DEPENDS SECTION --- ###
46 # The following tells make when an object depends on a header so it can rebuild
47 # the object automatically. If an object isn't rebuilt it might crash the
48 # program. Generated by 'make depend'. Update if you change/add/remove
49 # a #include anywhere or if you add/remove a C++ file.
51 animation.o
: animation.
cpp animation.h common.h log.h math.h resourcer.h \
53 area.o
: animation.h area.
cpp area.h common.h entity.h log.h math.h music.h \
54 player.h resourcer.h tile.h viewport.h window.h world.h xml.h
55 cmd.o
: cmd.
cpp cmd.h common.h log.h math.h
56 common.o
: common.
cpp common.h log.h math.h
57 entity.o
: animation.h area.h common.h config.h entity.
cpp entity.h log.h \
58 math.h music.h player.h resourcer.h tile.h viewport.h window.h xml.h
60 log.o
: config.h log.
cpp log.h
61 main.o
: cmd.h common.h config.h log.h main.
cpp math.h window.h
62 music.o
: common.h log.h math.h music.
cpp music.h resourcer.h xml.h
63 player.o
: animation.h area.h common.h config.h entity.h log.h math.h music.h \
64 player.
cpp player.h resourcer.h tile.h viewport.h window.h world.h xml.h
65 resourcer.o
: common.h config.h log.h math.h resourcer.
cpp resourcer.h \
67 tile.o
: animation.h area.h common.h entity.h log.h math.h music.h player.h \
68 resourcer.h tile.
cpp tile.h viewport.h window.h xml.h
69 viewport.o
: animation.h area.h common.h entity.h log.h math.h music.h \
70 player.h resourcer.h tile.h viewport.
cpp viewport.h window.h xml.h
71 window.o
: animation.h common.h config.h entity.h log.h math.h player.h \
72 resourcer.h tile.h viewport.h window.
cpp window.h world.h xml.h
73 world.o
: animation.h area.h common.h entity.h log.h math.h music.h player.h \
74 resourcer.h tile.h viewport.h window.h world.
cpp world.h xml.h
75 xml.o
: common.h config.h log.h math.h xml.
cpp xml.h