Mercurial > hg > Members > kono > compiler-examples
view Makefile @ 16:5b631c16f89b
llvm output
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 02 Nov 2012 14:04:35 +0900 |
parents | 8741552a4e4b |
children | e5c8532ab38d |
line wrap: on
line source
TEST = s-intel CC = gcc CFLAGS = -g -O -Wall YYFLAGS = -v COMPILER = s-compile.o s-token.o # COMPILER = s-tree-compile.o s-token.o # COMPILER = s-yacc.o s-token.o # TARGET = token calc s-calc s-prefix s-rpn s-09 s-intel s-intel-r s-sparc s-rs6k s-m68k s-ppc s-imac TARGET = token calc s-calc s-prefix s-rpn s-intel s-intel-r s-sparc s-ppc s-imac s-imac64 all: $(TARGET) token: token.o s-token.o $(CC) $(CFLAGS) -o $@ $^ calc: calc.c $(CC) $(CFLAGS) -o $@ $^ s-calc: s-calc.c s-token.o $(CC) $(CFLAGS) -o $@ $^ s-tree: s-tree.c s-token.o $(CC) $(CFLAGS) -o $@ $^ s-prefix: s-prefix.o s-code-print.o s-token.o $(CC) $(CFLAGS) -o $@ $^ s-rpn: $(COMPILER) s-code-print.o $(CC) $(CFLAGS) -o $@ $^ s-ppc: $(COMPILER) s-code-ppc.o $(CC) $(CFLAGS) -o $@ $^ s-09: $(COMPILER) s-code-09.o $(CC) $(CFLAGS) -o $@ $^ s-intel: $(COMPILER) s-code-intel.o $(CC) $(CFLAGS) -o $@ $^ s-intel-r: $(COMPILER) s-code-intel-r.o $(CC) $(CFLAGS) -o $@ $^ s-imac: $(COMPILER) s-code-intel-mac.o $(CC) $(CFLAGS) -o $@ $^ s-imac64: $(COMPILER) s-code-intel64-mac.o $(CC) $(CFLAGS) -o $@ $^ s-sparc: $(COMPILER) s-code-sparc.o $(CC) $(CFLAGS) -o $@ $^ s-rs6k: $(COMPILER) s-code-rs6k.o $(CC) $(CFLAGS) -o $@ $^ s-rs6k-r: $(COMPILER) s-code-rs6k-r.o $(CC) $(CFLAGS) -o $@ $^ s-m68k: $(COMPILER) s-code-m68k.o $(CC) $(CFLAGS) -o $@ $^ s-yacc.o: s-yacc.y $(YACC) $(YYFLAGS) s-yacc.y mv y.tab.c s-yacc.c $(CC) -c s-yacc.c test: $(TEST) ./$(TEST) < s-input.txt > s-output.s $(CC) s-output.s ./a.out MC09EMU = ../emulator/util09/v09 MC09ASM = ../emulator/util09/a09 test-09: s-09 ./s-09 < s-input.txt > s-output.a09 $(MC09ASM) s-output.a09 $(MC09EMU) s-output tar: ( cd ..; tar zcf compiler-examples.tgz --exclude CVS compiler-examples ) clean: rm -rf *.o $(TARGET) a.out s-output.s s-output.a09 s-output *.dSYM *.s rm -f s-yacc.c y.tab.c y.tab.h # DO NOT DELETE