# # $Id: Makefile,v 1.6 2001/02/07 21:11:12 keller Exp $ # # Makefile for triangle # EXEC = triangle TESTS = test.in # test cases EXPECTED = expected.out # expected result SOURCES = *.cc CCFLAGS = -g -Wall CC = g++ $(CCFLAGS) DOX = doxygen CONFIG = triangle.cfg all : $(EXEC) test # test executes EXEC on test.in, compares the result with the desired one, # and indicates the result test : @echo '*** testing' @if( $(EXEC) < $(TESTS) | diff - expected.out ); \ then echo '*** test succeeded'; \ else echo '*** test failed'; \ fi # run runs the tests without comparison run : $(EXEC) < $(TESTS) # update updates the results of test cases update : /bin/rm $(EXPECTED) $(EXEC) < $(TESTS) > $(EXPECTED) # doc creates documentation dox : $(DOX) $(CONFIG) $(EXEC) : $(SOURCES) $(CC) -o$(EXEC) $(SOURCES) clean : rm $(EXEC) .SUFFIXES : .o .cc .cc.o : $(CC) -c $< # Change log: # # $Log: Makefile,v $ # Revision 1.6 2001/02/07 21:11:12 keller # changed comment in Makefile # # Revision 1.5 2000/10/30 09:06:43 keller # Added .cfg for doxygen. Modified Makefile to include dox element. # # Revision 1.4 2000/10/25 20:02:12 keller # Further cleanup in documentation and addition of test cases. # # Revision 1.3 2000/10/25 18:21:10 keller # Modified test cases to mask a problem. # # Revision 1.2 2000/03/22 22:39:45 keller # added run element # #