First version of ImageScaler Widget
[mussa.git] / Makefile.noqt
1 BASEDIR := ./
2
3 BINEXT := 
4 OBJEXT := .o
5 LIBEXT := .a
6
7 CXX := g++ 
8 CXXFLAGS :=  
9 LDFLAGS := 
10
11 CURDIR := $(shell pwd)
12
13 # each module will add to this, .os are derived from it
14 TARGETLIBS := 
15 TARGETBINS :=
16 LIBS := 
17 LIBSRC := 
18 SRC := 
19
20 all: targets
21
22 include alg/module.mk
23 include alg/test/module.mk
24 include gui/module.mk
25 include module.mk
26
27 # process what the module.mks defined
28 OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC))) 
29 DEPS := $(OBJ:.o=.d)
30
31 targets: $(TARGETLIBS) $(TARGETBINS)
32
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)
36 define make-depend
37   $(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
38 endef
39         
40 %.d: %.cxx
41         $(call make-depend,$<,$@,$(subst .o,.d,$@))
42 #       makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
43
44 %.o: %.cxx
45         $(CXX) -c -o $@ $(CXXFLAGS) $^
46
47 include $(DEPS)
48
49 clean:
50         -rm $(OBJ) $(DEPS) $(TARGETLIBS) $(TARGETBINS)
51         
52
53