# # Standard Rules for Make # # MakeRules,v 1.3 2003/07/29 10:15:59 frenger Exp # ifdef SRCS %_debug.o: %.cpp $(CXX) $(CXXFLAGS) $(DEBUG_FLAGS) $(INCLUDE) -c $< -o $@ %_prof.o: %.cpp $(CXX) $(CXXFLAGS) $(PROF_FLAGS) $(INCLUDE) -c $< -o $@ %_pic.o: %.cpp $(CXX) $(CXXFLAGS) $(SHARED_FLAGS) $(INCLUDE) -c $< -o $@ %.o: %.cpp $(CXX) $(CXXFLAGS) $(OPTIMIZED_FLAGS) $(INCLUDE) -c $< -o $@ endif JUNKFILES += $(LIB_TARGETS) core ALLJUNKFILES += $(JUNKFILES) ALLJUNKFILES += tmp *.tmp *.bak *.ps *.eps *.log *.dvi *.aux *.toc .depend TAGS .PHONY: all .PHONY: strip .PHONY: clean .PHONY: cleanall .PHONY: depend .PHONY: tags ifdef SUBDIRS ifndef SUBAUTODIRS SUBAUTODIRS = $(SUBDIRS) endif all: suball $(TARGETS) strip: substrip ifdef PRG strip $(PRG) endif clean: subclean @echo Cleaning... @rm -f $(JUNKFILES) cleanall: subcleanall @echo Cleaning... @rm -f $(ALLJUNKFILES) depend: subdepend @echo Checking dependencies... ifdef SRCS @$(DEPEND) -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef DEBUG_OBJS @$(DEPEND) -o _debug.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef PROF_OBJS @$(DEPEND) -o _prof.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef PIC_OBJS @$(DEPEND) -o _pic.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif tags: subtags ifdef SRCS etags $(SRCS) endif .PHONY: suball suball: @for dir in $(SUBAUTODIRS); do $(MAKE) -C $$dir all; done; .PHONY: substrip substrip: @for dir in $(SUBAUTODIRS); do $(MAKE) -C $$dir strip; done; .PHONY: subclean subclean: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done; .PHONY: subcleanall subcleanall: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir cleanall; done; .PHONY: subdepend subdepend: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir depend; done; .PHONY: subtags subtags: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir tags; done; else all: $(TARGETS) strip: ifdef PRG strip $(PRG) endif clean: @echo Cleaning... @rm -f $(JUNKFILES) cleanall: @echo Cleaning... @rm -f $(ALLJUNKFILES) depend: @echo Checking dependencies... ifdef SRCS @$(DEPEND) -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef DEBUG_OBJS @$(DEPEND) -o _debug.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef PROF_OBJS @$(DEPEND) -o _prof.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif ifdef PIC_OBJS @$(DEPEND) -o _pic.o -a -Y $(INCLUDE) -DDEPENDING $(SRCS) 2> /dev/null endif tags: ifdef SRCS etags $(SRCS) endif endif .PHONY: nothing nothing: