BASEDIR := ./
+CURDIR := $(shell pwd)
BINEXT :=
OBJEXT := .o
LIBEXT := .a
CXX := g++
-CXXFLAGS := -g -fPIC -I/usr/include/python2.3
-LDFLAGS :=
-
-CURDIR := $(shell pwd)
+CXXFLAGS := -g -fPIC -I/usr/include/python2.3 -I$(CURDIR)
+# needed for linux (as darwin doesn't put gl.h in a directory starting with
+# GL
+CXXFLAGS += -I/usr/include/GL
+# needed for darwin
+CXXFLAGS += -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include
+LDFLAGS := -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/ -L/usr/local/lib
# each module will add to this, .os are derived from it
TARGETLIBS :=
all: targets
include alg/module.mk
+include alg/test/module.mk
+include py/module.mk
include gui/module.mk
-include test/module.mk
-include module.mk
# process what the module.mks defined
-OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC)))
+OBJ := $(patsubst %.cpp,%.o, $(filter %.cpp,$(SRC)))
DEPS := $(OBJ:.o=.d)
targets: $(TARGETLIBS) $(TARGETBINS)
$(CXX) -MM -MF $3 -MP -MT $2 $(CFLAGS) $(CXXFLAGS) $1
endef
-%.d: %.cxx
+%.d: %.cpp
$(call make-depend,$<,$@,$(subst .o,.d,$@))
# makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
-%.o: %.cxx
+%.o: %.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $^
include $(DEPS)