# -*- mode: makefile -*- include ../../env/Make.${MACHINE} CXXTEST=../../common/test/cxxtest/cxxtestgen.pl --error-printer # # Suffixes # # *.h "test suite" header file generates a *.cpp source file # *.cpp generated source file compile to an *.o object file # Building a test test creates a *_test executable # .SUFFIXES: .cxxTest .o .c .cxx .C .cxxTest.cxx: ${CXXTEST} -o $(*F).cxx $< .cxx.o: $(CXX) -c $(CXXFLAGS) $< # # Targets # all: testAverage testAveragePpp testAverage:CXXFLAGS=-DAPLUSPLUS -I../../common/test/cxxtest -I. -I${A++}/include testAverage:LIBS=-L${A++}/lib -lApp -lApp_static testAverage.o: Average.h testAverage: testAverage.cxx testAverage.o ${CXX} ${CXXFLAGS} -o testAverage testAverage.o ${LIBS} testAveragePpp:CXXFLAGS=-DPPLUSPLUS -I. -I${P++}/include testAveragePpp:LIBS=-L${P++}/lib -lPpp -lPpp_static testAveragePpp: Average.h FORCE ${MPICXX} ${CXXFLAGS} testAveragePpp.C -o testAveragePpp ${LIBS} FORCE: clean: rm -f *.cxx testAverage testAveragePpp