C compiler with embedded metalanguage.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
516 B

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 :