Browse Source

Makefile has target "test". Add reference output for test.

master
Ian Piumarta 3 years ago
parent
commit
1bcc24f34f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Makefile

+ 5
- 1
Makefile View File

@ -5,6 +5,10 @@ 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)
@ -15,7 +19,7 @@ $(MAIN) : $(MAIN).c object.c buffer.h
mv $@.new $@
tidy : .FORCE
rm -f *~
rm -f *~ $(MAIN)-test.out
clean : .FORCE
rm -f $(MAIN) $(MAIN).c

Loading…
Cancel
Save