Kräftig aufgeräumt. Kollisions- und Sprungtötungsphysik jetzt allein auf
[hackover2013-badge-firmware.git] / mock / Makefile
1 #!/usr/bin/make -f
2
3 CPPFLAGS = $$(pkg-config --cflags gtkmm-3.0) -I. -I ../badge
4 CFLAGS = -Wall -Wextra -pedantic -std=c99 -Werror -O0 -g
5 CXXFLAGS = -Wall -Wextra -pedantic -std=c++11 -Werror -O0 -g
6
7 BADGE = badge
8 CONVERTER = level-converter
9
10 GLADEFILES = lcd-display.glade
11
12 VPATH = ../badge
13
14 BADGE_CXXSRCS = mock-main.cc \
15 mock/badge_worker.cc \
16 mock/display.cc \
17 mock/event.cc \
18 mock/lcd-window.cc
19 BADGE_CSRCS = badge_main_loop.c \
20 ui/font.c \
21 ui/sprite.c \
22 jumpnrun/collision.c \
23 jumpnrun/enemies.c \
24 jumpnrun/game_state.c \
25 jumpnrun/items.c \
26 jumpnrun/jumpnrun.c \
27 jumpnrun/level_load.c \
28 jumpnrun/moveable.c \
29 jumpnrun/player.c \
30 jumpnrun/render.c \
31 jumpnrun/shots.c \
32 jumpnrun/stats.c \
33 jumpnrun/tiles.c
34
35 BADGE_CXXOBJS = $(BADGE_CXXSRCS:%.cc=%.o)
36 BADGE_COBJS = $(BADGE_CSRCS:%.c=%.o)
37 BADGE_OBJS = $(BADGE_CXXOBJS) $(BADGE_COBJS)
38
39 CONVERTER_SRCS = tools/level-converter.cc
40 CONVERTER_OBJS = $(CONVERTER_SRCS:%.cc=%.o)
41
42 CDEPS = $(BADGE_CSRCS:%.c=%.dep)
43 CXXDEPS = $(BADGE_CXXSRCS:%.cc=%.dep) $(CONVERTER_SRCS:%.cc=%.dep)
44 DEPS = $(CDEPS) $(CXXDEPS)
45
46 LDLIBS = $$(pkg-config --libs gtkmm-3.0)
47 RM = rm -f
48
49 .PHONY: all dep clean distclean play
50
51 all: dep $(BADGE) $(CONVERTER)
52
53
54 $(BADGE_COBJS) : %.o : %.c
55 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $(@:../badge/%=%) $< $(LDLIBS)
56
57 $(BADGE_CXXOBJS) : %.o : %.cc
58 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -c -o $@ $< $(LDLIBS)
59
60 $(BADGE): $(BADGE_OBJS)
61 $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(+:../badge/%=%) $(LDLIBS)
62
63 dep: $(DEPS)
64
65 $(CDEPS): %.dep : %.c
66 $(CC) $(CPPFLAGS) $(CFLAGS) -MM $< -MT $(<:%.c=%.o) -MF $@
67
68 $(CXXDEPS): %.dep : %.cc
69 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM $< -MT $(<:%.cc=%.o) -MF $@
70
71 sinclude $(DEPS)
72
73 clean:
74 $(RM) $(BADGE_OBJS) $(CONVERTER_OBJS) $(BADGE) $(CONVERTER)
75
76 distclean: clean
77 $(RM) $(DEPS) $(wildcard *~)
78
79 $(CONVERTER): $(CONVERTER_OBJS)
80 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $+
81
82 play: all
83 ./$(CONVERTER)
84 ./$(BADGE)
This page took 0.048439 seconds and 5 git commands to generate.