C compiler with embedded metalanguage.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

54 líneas
1.0 KiB

CFLAGS = -I/opt/local/include -std=gnu99 -Wall -Wno-unused-label -Wno-unused-function -g
LDLIBS = -L/opt/local/lib -lgc -lm
TREE = -t
MAIN = ccmeta
all : $(MAIN)
tree : all .FORCE
./$(MAIN) $(TREE) < $(MAIN)-input.txt > $(MAIN)-tree.out
output : all .FORCE
./$(MAIN) < $(MAIN)-input.txt > $(MAIN)-output.out
diff $(MAIN)-input.txt $(MAIN)-output.out
test : all .FORCE
./dotest
both : all .FORCE
./$(MAIN) $(TREE) < $(MAIN)-input.txt > $(MAIN)-tree.out
./$(MAIN) < $(MAIN)-input.txt > $(MAIN)-output.out
diff $(MAIN)-input.txt $(MAIN)-output.out
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
rm -f *~ $(MAIN)-output.out
tidy : .FORCE
rm -f *~ $(MAIN)-tree.out
cleansed : .FORCE
rm -f debug.out
purified : .FORCE
rm -rf tests-c/*.out
spotless : clean tidy cleansed purified
.FORCE :