CC=gcc INCLUDE=-I. CFLAGS=-Wall -O2 -ansi -pedantic OBJS=clrlibru.o .SUFFIXES: .o.c all: clrlibru .c.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< clrlibru: $(OBJS) $(CC) $(LIB) -o $@ $(OBJS) test: all @[ -d results ] || mkdir results @[ -d diffs ] || mkdir diffs @for FILE in test.htm ; do \ echo -n $$FILE " ........ " ; \ if ./clrlibru < tests/$$FILE > results/$$FILE && diff -c expected/$$FILE results/$$FILE > diffs/$$FILE ; then \ echo ok ; \ else \ echo FAILED ; \ fi ; \ done clean: rm -rf clrlibru *core *.o rm -rf results diffs