# # Makefile for cppunit demo # # @author Keith Lee # keithlee [ at ] unc.edu # # FILE LOCATIONS L = /unc/lee/lib/COMP121/cppunitdemo # Compiler to use. C = g++ # COMPILER FLAGS. CPPOFLAGS = -I/opt/cppunit/cppunit/include -L/opt/cppunit/cppunit/lib CPPOBJFLAGS = -I/opt/cppunit/cppunit/include -L/opt/cppunit/cppunit/lib -lcppunit -ldl CFLAGS = -Wall #CFLAGS = -Wall -g OPT = -Wall -O # COMPILE CartesianComplex.o: CartesianComplex.h CartesianComplex.C ${C} -I${L} -c CartesianComplex.C # TEST TestCartesianComplexMath.o: CartesianComplex.o TestCartesianComplexMath.h TestCartesianComplexMath.C ${C} ${CPPOFLAGS} -I${L} -c TestCartesianComplexMath.C TestCartesianComplex.o: CartesianComplex.o TestCartesianComplex.h TestCartesianComplex.C ${C} ${CPPOFLAGS} -I${L} -c TestCartesianComplex.C test.obj: test.C TestCartesianComplex.o TestCartesianComplexMath.o ${C} ${CPPOBJFLAGS} -I${L} -o test.obj test.C TestCartesianComplex.o TestCartesianComplexMath.o CartesianComplex.o test: test.obj rm -f TEST/TestCartesianComplex.out* test.obj > TEST/TestCartesianComplex.out2 cat TEST/TestCartesianComplex.out2 | rm_bangs | rm_blank_line > TEST/TestCartesianComplex.out cmp TEST/TestCartesianComplex.out TEST/TestCartesianComplex.GOOD # diff TEST/TestPrint.out TEST/TestPrint.GOOD # MISC clean: /bin/rm -f core *.o *.obj backup: cp *.h *.C Makefile back # PRINT PFILES = WarGame.C CardPile.h CardPile.C Card.C Deck.C TestCardPile.C TestPrint.C print: lwprint ${PFILES} Makefile