C compiler with embedded metalanguage.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

60 linhas
1.1 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
rm -f debug
purified : .FORCE
rm -rf tests-c/*.out
rm -rf tests-cpp/*.out
rm -rf tests-err/*.out
rm -rf tests-gnu/*.out
rm -rf tests-knr/*.out
rm -rf tests-std/*.out
spotless : clean tidy cleansed purified
.FORCE :