]> Dogcows Code - chaz/yoink/blob - src/rules.mk
testing new non-autotools build system
[chaz/yoink] / src / rules.mk
1
2 #########################
3 sp := $(sp).x
4 dirstack_$(sp) := $(d)
5 d := $(dir)
6 #########################
7
8 #
9 # Include the subdirectories--order is not important.
10 #
11
12 dir := $(d)/moof
13 include $(dir)/rules.mk
14
15 dir := $(d)/stlplus
16 include $(dir)/rules.mk
17
18
19 #
20 # Define rules and targets for Yoink.
21 #
22
23 OBJS_$(d) := \
24 $(d)/Animation.o \
25 $(d)/Character.o \
26 $(d)/GameLayer.o \
27 $(d)/Heroine.o \
28 $(d)/Hud.o \
29 $(d)/Main.o \
30 $(d)/Scene.o \
31 $(d)/TilemapFont.o \
32 $(d)/TitleLayer.o \
33 $(d)/Typesetter.o \
34 $(d)/version.o \
35 $(_END_)
36
37 ifeq ($(HOST),win32)
38 OBJS_$(d) += $(d)/yoink.o
39 endif
40
41 TGTS_$(d) := $(d)/yoink$(EXEEXT)
42 DEPS_$(d) := $(OBJS_$(d):%=%.d)
43
44 TGT_BIN := $(TGT_BIN) $(TGTS_$(d))
45 CLEAN := $(CLEAN) $(OBJS_$(d)) $(DEPS_$(d)) $(TGTS_$(d))
46
47
48 $(OBJS_$(d)): CF_TGT := -I$(d)
49 $(OBJS_$(d)): $(d)/rules.mk
50
51 $(TGTS_$(d)): $(OBJS_$(d)) $(d)/moof/libmoof.a $(d)/stlplus/libstlplus.a
52 $(DO_LDX)
53
54
55 #
56 # Define the run and debug targets.
57 #
58
59 YOINK_ENVIRONMENT = YOINK_DATADIR="./data"
60
61 .PHONY: run
62 run: $(TGTS_$(d))
63 @$(YOINK_ENVIRONMENT) $< $(YOINK_OPTS)
64
65 .PHONY: debug
66 debug: $(TGTS_$(d))
67 @$(YOINK_ENVIRONMENT) gdb $<
68
69
70 #######################
71 -include $(DEPS_$(d))
72 d := $(dirstack_$(sp))
73 sp := $(basename $(sp))
74 #######################
75
This page took 0.041394 seconds and 5 git commands to generate.