Removed 'create subanalysis' from menu for now (until implemented)
[mussa.git] / Makefile.noqt
1 BASEDIR := ./
2
3 BINEXT := 
4 OBJEXT := .o
5 LIBEXT := .a
6
7 CXX := g++ 
8 CXXFLAGS := -g -fPIC -I/usr/include/python2.3
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 py/module.mk
25 include gui/module.mk
26 include module.mk
27
28 # process what the module.mks defined
29 OBJ := $(patsubst %.cpp,%.o, $(filter %.cpp,$(SRC))) 
30 DEPS := $(OBJ:.o=.d)
31
32 targets: $(TARGETLIBS) $(TARGETBINS)
33
34 # this make function came from 
35 # http://www.oreilly.com/catalog/make3/book/ch08.pdf
36 # $(call make-depend,source-file,object-file,depend-file)
37 define make-depend
38   $(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
39 endef
40         
41 %.d: %.cpp
42         $(call make-depend,$<,$@,$(subst .o,.d,$@))
43 #       makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
44
45 %.o: %.cpp
46         $(CXX) -c -o $@ $(CXXFLAGS) $^
47
48 include $(DEPS)
49
50 clean:
51         -rm $(OBJ) $(DEPS) $(TARGETLIBS) $(TARGETBINS)
52         
53
54