#* #* Version: $Revision: 1.14 $ #* Version control file: $RCSfile: Makefile,v $ #* Date last modified: $Date: 2005/01/23 16:13:38 $ #* Last modified by: $Author: baallan $ # # converted to use ruby instead of make madness. # To change the source in this directory you will need ruby installed. # # By ben allan, 7/99 & 10/99, because we hate templates compiler switches. # We take legitimate template code and sed-instantiate it explicitly. # ccaffeine doesn't use the templates directly. # # If you change the name lists in this file, eg adding another type, # then you need to manually run gen-files target and # add the new generated files with 'cvs add -kb '. # All generated files must fit a filename pattern # *.gen.*. CCAFE_HOME=.. zeroth: first include $(CCAFE_HOME)/Makefile.Rules CXXTEMPLATESRC = \ SCEnumeration.cpp \ SCVectEnum.cpp \ SCVector.cpp CXXTHREADSRC= # we don't build CXXTEMPLATEOBJ any more CXXTEMPLATEOBJ=$(CXXTEMPLATESRC:%.cpp=%.o) CXXTHREADOBJ=$(CXXTHREADSRC:%.cpp=%.o) # the input files less the suffix. TFILES = $(CXXTEMPLATESRC:%.cpp=%) include gen.Makeinclude GENOBJS_RB = $(GENSRC:%.cpp=%.o) first all: build-tfiles lib testV @touch .allbuild.complete build-tfiles: $(GENOBJS_RB) rb-gen: ruby ./detemplate.rb rb-gen-clean: $(RM) *.gen.* gen-files: rb-gen-clean rb-gen lib : compile ar $(ARFLAGS) libscutil.a *.o $(RANLIB) libscutil.a compile : $(CXXTHREADOBJ) Thread.o: $(CXX) -c $(CXXFLAGS) $(CCAFE_PTHREADS_FLAGS) Thread.cc #suppress -G on aix testV: testV.cpp (BLDFLAGS=`echo $(CXXFLAGS) | sed -e 's/ -G / /g'`; \ $(CXX) $$BLDFLAGS -I$(CCAFE_HOME) -o testV testV.cpp \ libscutil.a ../util/libcafeutil.a) ./testV .SUFFIXES: .SUFFIXES: .o .cpp .cpp.o: $(CXX) -c $(CXXFLAGS) $< clean: -$(RM) -r *.o *.a *.so a.out testV *.u depend: -$(DEPEND) $(CXXFLAGS) $(CXXTEMPLATESRC) depend-sys: -$(DEPENDSYS) $(CXXFLAGS) $(CXXTEMPLATESRC) ifneq "x$(TARGET)" "xclean" include Makefile.depends endif