CLAM_PATH ?= $(TOP) SRCDEPS=$(CLAM_PATH)/build/srcdeps/srcdeps all: program clean: rm -rf obj/ dep/ moc/ uic/ 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 ifeq ($(OS_MACOSX),1) PROGRAMPATH = $(PROGRAM).app/Contents/MacOS/ PROGRAMEXTRAS = $(PROGRAM).app $(PROGRAM).app/Contents $(PROGRAM).app/Contents/MacOS $(PROGRAM).app/Contents/Resources $(PROGRAM).app/Contents/Resources/CLAM.icns $(PROGRAM).app/Contents/Info.plist $(PROGRAM).app: mkdir $(PROGRAM).app $(PROGRAM).app/Contents: mkdir $(PROGRAM).app/Contents $(PROGRAM).app/Contents/MacOS: mkdir $(PROGRAM).app/Contents/MacOS $(PROGRAM).app/Contents/Resources: mkdir $(PROGRAM).app/Contents/Resources $(PROGRAM).app/Contents/Resources/CLAM.icns: $(CLAM_PATH)/build/macosx-utils/CLAM.icns cp $(CLAM_PATH)/build/macosx-utils/CLAM.icns $(PROGRAM).app/Contents/Resources $(PROGRAM).app/Contents/Info.plist: $(CLAM_PATH)/build/macosx-utils/create_Info_plist.sh $(PROGRAM).app/Contents/Info.plist $(PROGRAM) endif program: $(PROGRAMPATH)$(PROGRAM) tags: .FORCE ctags $(SOURCES) `cat dep/*.d | grep -v \.o: | grep -v \.d: | sed -e 's/\\\\//' | sort | uniq` ifeq ($(CONFIG),debug) LIBRARIES = $(LIBRARIES_DEBUG) LINK_FLAGS = $(LINK_FLAGS_DEBUG) CXXFLAGS = $(CXXFLAGS_DEBUG) $(PROGRAMPATH)$(PROGRAM): $(PROGRAMEXTRAS) $(MOC_OBJECTS) $(OBJECTS) @echo == linking $@ $(CXX) $(OBJECTS) $(MOC_OBJECTS) $(LIBRARY_PATHS) $(LIBRARIES) $(LINK_FLAGS) -o $@ ifeq ($(OS_MACOSX),1) $(CLAM_PATH)/build/macosx-utils/correct_dylibs_from_paths.sh $(PROGRAMPATH)$(PROGRAM) $(LIBRARY_PATHS) endif %.o: @mkdir -p obj @echo == compiling $< @$(CXX) $(CXXFLAGS) -c $(PREINCL) -ftemplate-depth-99 $(DEFINES) $(PRE_INCLUDES) $(INCLUDES) $< -o $@ uic/%.h: @mkdir -p uic @echo === Generating $@ from $< @uic $< -o $@ uic/%.cxx: @mkdir -p uic @echo === Generating $@ from $< @uic -i $(@:uic/%.cxx=%.h) $< -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) $(PROGRAMPATH)$(PROGRAM): $(PROGRAMEXTRAS) $(MOC_OBJECTS) $(OBJECTS) @echo == linking $@ @$(CXX) $(OBJECTS) $(MOC_OBJECTS) $(LIBRARY_PATHS) $(LIBRARIES) $(LINK_FLAGS) -o $@ ifeq ($(OS_MACOSX),1) @$(CLAM_PATH)/build/macosx-utils/correct_dylibs_from_paths.sh $(PROGRAMPATH)$(PROGRAM) $(LIBRARY_PATHS) endif %.o: @mkdir -p obj @echo == compiling $< @$(CXX) $(CXXFLAGS) -c $(PREINCL) -ftemplate-depth-99 $(DEFINES) $(PRE_INCLUDES) $(INCLUDES) $< -o $@ uic/%.h: @mkdir -p uic @echo === Generating $@ from $< @uic $< -o $@ uic/%.cxx: @mkdir -p uic @echo === Generating $@ from $< @uic -i $(@:uic/%.cxx=%.h) $< -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 "====================================================================" $(PROGRAMPATH)$(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: