Return to GNUmakefile CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / libpdel / tmpl / test |
1.1 ! misho 1: # $Id: GNUmakefile,v 1.6 2004/06/03 21:18:42 archie Exp $ ! 2: ! 3: prefix= /usr/local ! 4: srcs= main.c ! 5: objs= $(srcs:.c=.o) ! 6: prog= tmpl ! 7: CFLAGS= -I$(prefix)/include -Wall -DOPENSSL_NO_KRB5 ! 8: cc= cc ! 9: ! 10: $(prog): $(objs) ! 11: $(cc) -o $@ $(objs) -L$(prefix)/lib \ ! 12: -lpdel -lssl -lcrypto -lexpat -lpthread ! 13: ! 14: %.o: %.c ! 15: $(cc) -c -o $@ $(CFLAGS) $+ ! 16: ! 17: test: ! 18: rm -f test.out ! 19: make test.out ! 20: make test-input ! 21: ! 22: test-input: ! 23: $(prog) test-input.in ! 24: ! 25: test.out: $(prog) test.in ! 26: $(prog) -n test.in > $@ ! 27: @if ! diff -q $@.sav $@; then \ ! 28: echo ERROR: Test output does not match saved output; \ ! 29: echo ERROR: The difference is saved in test.diff; \ ! 30: diff -u $@.sav $@ > test.diff; \ ! 31: exit 1; \ ! 32: fi ! 33: ! 34: clean: ! 35: rm -f $(prog) $(objs) ! 36: rm -f test.out test.diff ! 37: