Pfade in Mock so angepasst, dass sie mit dem Hauptcode zusammenpassen.
[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/sprite.c \
21 jumpnrun/collision.c \
22 jumpnrun/enemies.c \
23 jumpnrun/items.c \
24 jumpnrun/jumpnrun.c \
25 jumpnrun/tiles.c \
26 jumpnrun/level_load.c
27
28 BADGE_CXXOBJS = $(BADGE_CXXSRCS:%.cc=%.o)
29 BADGE_COBJS = $(BADGE_CSRCS:%.c=%.o)
30 BADGE_OBJS = $(BADGE_CXXOBJS) $(BADGE_COBJS)
31
32 CONVERTER_SRCS = tools/level-converter.cc
33 CONVERTER_OBJS = $(CONVERTER_SRCS:%.cc=%.o)
34
35 CDEPS = $(BADGE_CSRCS:%.c=%.dep)
36 CXXDEPS = $(BADGE_CXXSRCS:%.cc=%.dep) $(CONVERTER_SRCS:%.cc=%.dep)
37 DEPS = $(CDEPS) $(CXXDEPS)
38
39 LDLIBS = $$(pkg-config --libs gtkmm-3.0)
40 RM = rm -f
41
42 .PHONY: all dep clean distclean play
43
44 all: dep $(BADGE) $(CONVERTER)
45
46
47 $(BADGE_COBJS) : %.o : %.c
48 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $(@:../badge/%=%) $< $(LDLIBS)
49
50 $(BADGE_CXXOBJS) : %.o : %.cc
51 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -c -o $@ $< $(LDLIBS)
52
53 $(BADGE): $(BADGE_OBJS)
54 $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $(+:../badge/%=%)
55
56 dep: $(DEPS)
57
58 $(CDEPS): %.dep : %.c
59 $(CC) $(CPPFLAGS) $(CFLAGS) -MM $< -MT $(<:%.c=%.o) -MF $@
60
61 $(CXXDEPS): %.dep : %.cc
62 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM $< -MT $(<:%.cc=%.o) -MF $@
63
64 sinclude $(DEPS)
65
66 clean:
67 $(RM) $(BADGE_OBJS) $(CONVERTER_OBJS) $(BADGE) $(CONVERTER)
68
69 distclean: clean
70 $(RM) $(DEPS) $(wildcard *~)
71
72 $(CONVERTER): $(CONVERTER_OBJS)
73 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $+
74
75 play: all
76 ./$(CONVERTER)
77 ./$(BADGE)
This page took 0.056593 seconds and 5 git commands to generate.