2 #########################
6 #########################
9 # Include the subdirectories--order is not important.
13 include $(dir)/rules.mk
16 include $(dir)/rules.mk
20 # Define rules and targets for Yoink.
23 OBJECTS_$(d) := $(patsubst %.c,%.o,$(wildcard $(d)/*.c)) \
24 $(patsubst %.cc,%.o,$(wildcard $(d)/*.cc))
25 D_FILES_$(d) := $(OBJECTS_$(d):%=%.d)
28 OBJECTS_$(d) += $(d)/yoink.o
31 PROGRAM_$(d) := $(call add_exe_suffix,$(d)/yoink)
33 BINARIES := $(BINARIES) $(PROGRAM_$(d))
34 CLEAN := $(CLEAN) $(OBJECTS_$(d)) $(D_FILES_$(d)) $(PROGRAM_$(d))
36 $(OBJECTS_$(d)): CF_TGT := -I$(d)
37 $(OBJECTS_$(d)): $(d)/rules.mk
39 $(PROGRAM_$(d)): $(OBJECTS_$(d)) $(d)/moof/libmoof.a $(d)/stlplus/libstlplus.a
44 # Define the run and debug targets.
47 YOINK_ENVIRONMENT = YOINK_DATADIR="./data"
51 @$(YOINK_ENVIRONMENT) $< $(YOINK_OPTS)
54 debug: $(PROGRAM_$(d))
55 @$(YOINK_ENVIRONMENT) gdb $<
58 ########################
59 -include $(D_FILES_$(d))
60 d := $(dirstack_$(sp))
61 sp := $(basename $(sp))
62 ########################