C compiler with embedded metalanguage.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

29 行
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 :