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.
 
 
 

39 regels
650 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)
tree : all .FORCE
./$(MAIN) < $(MAIN)-tree.txt > $(MAIN)-tree.out
test : all .FORCE
./dotest
debug : all .FORCE
./$(MAIN) < debug.c > debug.out
gcc -o debug debug.c
#diff debug.out debug.c
$(MAIN) : $(MAIN).c object.c buffer.h
$(CC) $(CFLAGS) -o $@ $@.c $(LDLIBS)
.SUFFIXES: .leg .c
.leg.c :
leg $< > $@.new
mv $@.new $@
clean : .FORCE
rm -f $(MAIN) $(MAIN).c
tidy : .FORCE
rm -f *~ $(MAIN)-tree.out
cleansed : .FORCE
rm -f debug.out
spotless : clean tidy cleansed
.FORCE :