CLAM_PATH ?= $(TOP) SRCDEPS=$(CLAM_PATH)/build/srcdeps/srcdeps all: program clean: rm -rf obj/ dep/ moc/ Makefile.vars $(PROGRAM) distclean: clean rm -rf dep/ depend: $(SRCDEPS) .FORCE @echo Generating SOURCES, OBJECTS, DEPENDS and INCLUDES definitions $(SRCDEPS) settings.cfg > Makefile.vars .FORCE: ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),depend) include Makefile.vars include $(DEPENDS) endif endif Makefile.vars: Makefile $(SRCDEPS) settings.cfg @echo Generating SOURCES, OBJECTS, DEPENDS and INCLUDES definitions $(SRCDEPS) settings.cfg > Makefile.vars program: $(PROGRAM) ifeq ($(CONFIG),debug) LIBRARIES = $(LIBRARIES_DEBUG) LINK_FLAGS = $(LINK_FLAGS_DEBUG) CXXFLAGS = $(CXXFLAGS_DEBUG) $(PROGRAM): $(MOC_OBJECTS) $(OBJECTS) @echo == linking $@ @$(CXX) $(OBJECTS) $(MOC_OBJECTS) $(LIBRARY_PATHS) $(LIBRARIES) $(LINK_FLAGS) -o $@ @$(MACOSX_POSTLINK) %.o: @mkdir -p obj @echo == compiling $< @$(CXX) $(CXXFLAGS) -c $(PREINCL) -ftemplate-depth-99 $(DEFINES) $(PRE_INCLUDES) $(INCLUDES) $< -o $@ moc/%_moc.cxx: @mkdir -p moc @echo == Generating moc file for $@ moc $< -o $@ else ifeq ($(CONFIG),release) LIBRARIES = $(LIBRARIES_RELEASE) LINK_FLAGS = $(LINK_FLAGS_RELEASE) CXXFLAGS = $(CXXFLAGS_RELEASE) $(PROGRAM): $(MOC_OBJECTS) $(OBJECTS) @echo == linking $@ @$(CXX) $(OBJECTS) $(MOC_OBJECTS) $(LIBRARY_PATHS) $(LIBRARIES) $(LINK_FLAGS) -o $@ @$(MACOSX_POSTLINK) %.o: @mkdir -p obj @echo == compiling $< @$(CXX) $(CXXFLAGS) -c $(PREINCL) -ftemplate-depth-99 $(DEFINES) $(PRE_INCLUDES) $(INCLUDES) $< -o $@ moc/%_moc.cxx: @mkdir -p moc @echo == Generating moc file for $@ moc $< -o $@ else .FORCE: %.o: .FORCE @echo "====================================================================" @echo "Error: specify configuration, either by" @echo "- specifying CONFIG=[debug|release] when running make" @echo " $(MAKE_COMMAND) $(MAKECMDGOALS) CONFIG=debug" @echo " $(MAKE_COMMAND) $(MAKECMDGOALS) CONFIG=release" @echo "- setting the environment variable CONFIG" @echo " bash: export CONFIG=debug" @echo " export CONFIG=release" @echo " csh: setenv CONFIG debug" @echo " setenv CONFIG release" @echo "====================================================================" $(PROGRAM): .FORCE @echo "====================================================================" @echo "Error: specify configuration, either by" @echo "- specifying CONFIG=[debug|release] when running make" @echo " $(MAKE_COMMAND) $(MAKECMDGOALS) CONFIG=debug" @echo " $(MAKE_COMMAND) $(MAKECMDGOALS) CONFIG=release" @echo "- setting the environment variable CONFIG" @echo " bash: export CONFIG=debug" @echo " export CONFIG=release" @echo " csh: setenv CONFIG debug" @echo " setenv CONFIG release" @echo "====================================================================" endif endif %.d: @mkdir -p dep @echo Generating dependency information for $< @$(SRCDEPS) -d settings.cfg $< > $@ $(SRCDEPS): @echo =============================================================== @echo srcdeps is missing. Please go to the $(CLAM_PATH)/build/srcdeps @echo directory and run make @echo =============================================================== @exit -1 .SUFFIXES: