## Include dependencies rules, working only on linux ifeq ($(Go4_Makefile_Rules),) Go4_Makefile_Rules = included ## one can exclude dependency generation, calling "make nodepend=1" ## it is only work when build go4 package, not with examples ifndef GO4PACKAGE GO4WITHOUTDEPEND= endif ifndef GO4WITHOUTDEPEND ifdef LIBDEPENDENC ifeq ($(findstring $(MAKECMDGOALS), examples $(FASTRULES)),) $(LIBDEPENDENC) : $(GO4SYS)/build/dummy.d -include $(LIBDEPENDENC) endif endif ifdef EXAMPDEPENDENCS ifeq ($(findstring $(MAKECMDGOALS), libs gui $(FASTRULES)),) $(EXAMPDEPENDENCS) : $(GO4SYS)/build/dummy.d -include $(EXAMPDEPENDENCS) endif endif endif ifeq ($(DOOPTIMIZATION), false) OPTFLAGS = $(DEBUGMODE) else OPTFLAGS = $(OPTIMIZEMODE) endif #define targets, which may be not defines in user makefile libs:: ## Extensions rules .SUFFIXES: .$(SrcSuf) .$(DepSuf) .$(HedSuf) %.$(ObjSuf): %.$(SrcSuf) $(CXX) -c $< $(OPTFLAGS) $(CXXFLAGS) -o $@ %.$(ObjSuf): %.$(CSuf) $(CC) -c $< $(OPTFLAGS) $(CFLAGS) -o $@ %.$(DepSuf): %.$(SrcSuf) @echo "Generate dependency $@ ... " @$(MakeDepend) $@ "$(CXXFLAGS)" $*.$(SrcSuf) > $@ %.$(DepSuf): %.$(CSuf) @echo "Generate dependency $@ ... " @$(MakeDepend) $@ "$(CFLAGS)" $*.$(CSuf) > $@ ifdef GO4_QT ifndef GO4PACKAGE #dependency and Qt staff generation works only on linux %.$(ObjSuf): %.cpp $(CXX) -c $< $(OPTFLAGS) $(CXXFLAGS) $(QTCXXFLAGS) -o $@ %.d: %.cpp @echo "Generate dependency $@ ... " @$(MakeDepend) $@ "$(CXXFLAGS) $(QTCXXFLAGS)" $*.cpp > $@ endif endif endif