11 CURDIR := $(shell pwd)
13 # each module will add to this, .os are derived from it
23 include alg/test/module.mk
27 # process what the module.mks defined
28 OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC)))
31 targets: $(TARGETLIBS) $(TARGETBINS)
33 # this make function came from
34 # http://www.oreilly.com/catalog/make3/book/ch08.pdf
35 # $(call make-depend,source-file,object-file,depend-file)
37 $(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
41 $(call make-depend,$<,$@,$(subst .o,.d,$@))
42 # makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
45 $(CXX) -c -o $@ $(CXXFLAGS) $^
50 -rm $(OBJ) $(DEPS) $(TARGETLIBS) $(TARGETBINS)