need the configure script
[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 OBJECTS_$(d) := $(patsubst %.c,%.o,$(wildcard $(d)/*.c)) \
24 $(patsubst %.cc,%.o,$(wildcard $(d)/*.cc))
25 D_FILES_$(d) := $(OBJECTS_$(d):%=%.d)
26
27 ifeq ($(HOST),win32)
28 OBJECTS_$(d) += $(d)/yoink.o
29 endif
30
31 PROGRAM_$(d) := $(call add_exe_suffix,$(d)/yoink)
32
33 BINARIES := $(BINARIES) $(PROGRAM_$(d))
34 CLEAN := $(CLEAN) $(OBJECTS_$(d)) $(D_FILES_$(d)) $(PROGRAM_$(d))
35
36 $(OBJECTS_$(d)): CF_TGT := -I$(d)
37 $(OBJECTS_$(d)): $(d)/rules.mk
38
39 $(PROGRAM_$(d)): $(OBJECTS_$(d)) $(d)/moof/libmoof.a $(d)/stlplus/libstlplus.a
40 $(DO_LDX)
41
42
43 #
44 # Define the run and debug targets.
45 #
46
47 YOINK_ENVIRONMENT = YOINK_DATADIR="./data"
48
49 .PHONY: run
50 run: $(PROGRAM_$(d))
51 @$(YOINK_ENVIRONMENT) $< $(YOINK_OPTS)
52
53 .PHONY: debug
54 debug: $(PROGRAM_$(d))
55 @$(YOINK_ENVIRONMENT) gdb $<
56
57
58 ########################
59 -include $(D_FILES_$(d))
60 d := $(dirstack_$(sp))
61 sp := $(basename $(sp))
62 ########################
63
This page took 0.030326 seconds and 4 git commands to generate.