Win32 SaveAs Patch
[mussa.git] / Makefile.noqt
1 BASEDIR := ./
2 CURDIR := $(shell pwd)
3
4 BINEXT := 
5 OBJEXT := .o
6 LIBEXT := .a
7
8 CXX := g++ 
9 CXXFLAGS := -g -fPIC -I/usr/include/python2.3 -I$(CURDIR)
10 # needed for linux (as darwin doesn't put gl.h in a directory starting with
11 # GL
12 CXXFLAGS += -I/usr/include/GL
13 # needed for darwin
14 CXXFLAGS += -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include
15 LDFLAGS := -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/ -L/usr/local/lib
16
17 # each module will add to this, .os are derived from it
18 TARGETLIBS := 
19 TARGETBINS :=
20 LIBS := 
21 LIBSRC := 
22 SRC := 
23
24 all: targets
25
26 include alg/module.mk
27 include alg/test/module.mk
28 include py/module.mk
29 include gui/module.mk
30
31 # process what the module.mks defined
32 OBJ := $(patsubst %.cpp,%.o, $(filter %.cpp,$(SRC))) 
33 DEPS := $(OBJ:.o=.d)
34
35 targets: $(TARGETLIBS) $(TARGETBINS)
36
37 # this make function came from 
38 # http://www.oreilly.com/catalog/make3/book/ch08.pdf
39 # $(call make-depend,source-file,object-file,depend-file)
40 define make-depend
41   $(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
42 endef
43         
44 %.d: %.cpp
45         $(call make-depend,$<,$@,$(subst .o,.d,$@))
46 #       makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
47
48 %.o: %.cpp
49         $(CXX) -c -o $@ $(CXXFLAGS) $^
50
51 include $(DEPS)
52
53 clean:
54         -rm $(OBJ) $(DEPS) $(TARGETLIBS) $(TARGETBINS)
55         
56
57