CFLAGS = -I/opt/local/include -std=gnu99 -Wall -Wno-unused-label -Wno-unused-function -g LDLIBS = -L/opt/local/lib -lgc -lm MAIN = ccmeta all : $(MAIN) test : all .FORCE ./$(MAIN) < $(MAIN)-test.txt > $(MAIN)-test.out diff $(MAIN)-test.ref $(MAIN)-test.out $(MAIN) : $(MAIN).c object.c buffer.h $(CC) $(CFLAGS) -o $@ $@.c $(LDLIBS) .SUFFIXES: .leg .c .leg.c : leg $< > $@.new mv $@.new $@ tidy : .FORCE rm -f *~ $(MAIN)-test.out clean : .FORCE rm -f $(MAIN) $(MAIN).c spotless : clean tidy .FORCE :