Mercurial > hg > CbC > old > device
changeset 708:cd4aac9abd5e
*** empty log message ***
author | kono |
---|---|
date | Wed, 24 Oct 2007 16:23:52 +0900 |
parents | 75a2d51ca4dc |
children | 8b54c40081de |
files | Makefile.powerpc |
diffstat | 1 files changed, 72 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.powerpc Wed Oct 24 10:51:18 2007 +0900 +++ b/Makefile.powerpc Wed Oct 24 16:23:52 2007 +0900 @@ -1,12 +1,12 @@ -CC = gcc -std=c99 -# -O2 -# -O99 -CFLAGS = -fsigned-char -g -Wall -I. -DUSE_CODE_KEYWORD +CC = gcc -std=c99 $(CCEXT) +# -O3 +MCFLAGS = -DUSE_CODE_KEYWORD +CFLAGS = -g -O -Wall -I. $(MCFLAGS) # CFLAGS = -g -Wall -I. -pg -fprofile-arcs -ftest-coverage # LDFLAGS = -pg # for Linux Zaurus # CFLAGS = -fsigned-char -pipe -g -I. -I/home/zaurus/develop/include -CFLAGS1 = -fsigned-char -g -I. -DUSE_CODE_KEYWORD +CFLAGS1 = -g -I. BASE=0 STAGE=1 MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE) @@ -14,48 +14,44 @@ MC=mc-$(ARCH) MLIB = -lm PRINTF= # printf.c -CONVERTER=conv/c.o conv/null.o conv/cbc2c.o conv/c2cbc.o - -# conv/c2cbc.o conv/cbc2c.o +CONVERTER=conv/c.o conv/null.o conv/c2cbc.o conv/cbc2c.o COMPLIB = mc-parse.o mc-codegen.o mc-switch.o mc-macro.o mc-tree.o mc-inline.o # CODE=mc-code-ia32.c CODE=mc-code-$(ARCH).c GCC_INCLUDE=`perl tools/find-gcc-include-path -p $(CC)` - +# # TARGET=test/simp -all: mc-include.c mc +all: mc tags -allall: mc-include.c mc mc-ia32 mc-powerpc mc-mips mc-arm +ppc: + make ARCH=powerpc CCEXT="-arch ppc" check-all -mc: mc-$(ARCH) +mc: mc-$(ARCH) cp mc-$(ARCH) mc TAGS: - ctags mc-code-null.c mc-code.h mc-codegen.c mc-codegen.h \ + ctags mc-code-*.c mc-code.h mc-codegen.c mc-codegen.h \ mc-macro.c \ mc-parse.c mc-tree.c mc-switch.c mc-switch.h \ mc.h conv/c.c conv/c.h \ mc-inline.h mc-inline.c \ conv/conv.h conv/convdef.h conv/null.c -mc-null : mc-code-null.o $(COMPLIB) $(CONVERTER) - $(CC) $(LDFLAGS) -g mc-code-null.o $(COMPLIB) $(CONVERTER) -o $@ - -mc-powerpc : mc-code-powerpc.o $(COMPLIB) $(CONVERTER) +mc-powerpc :conv/conv.h mc-include.c mc-code-powerpc.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-powerpc.o $(COMPLIB) $(CONVERTER) -o $@ -mc-ia32 : mc-code-ia32.o $(COMPLIB) $(CONVERTER) +mc-ia32 :conv/conv.h mc-include.c mc-code-ia32.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-ia32.o $(COMPLIB) $(CONVERTER) -o $@ -mc-mips : mc-code-mips.o $(COMPLIB) $(CONVERTER) +mc-mips :conv/conv.h mc-include.c mc-code-mips.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-mips.o $(COMPLIB) $(CONVERTER) -o $@ -mc-arm : mc-code-arm.o $(COMPLIB) $(CONVERTER) +mc-arm :conv/conv.h mc-include.c mc-code-arm.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-arm.o $(COMPLIB) $(CONVERTER) -o $@ -mc-spu : mc-code-arm.o $(COMPLIB) $(CONVERTER) +mc-spu :conv/conv.h mc-include.c mc-code-spu.o $(COMPLIB) $(CONVERTER) $(CC) $(LDFLAGS) -g mc-code-spu.o $(COMPLIB) $(CONVERTER) -o $@ conv/conv.h: conv_func.tbl tools/conv_func.pl @@ -89,13 +85,15 @@ make check TARGET=test/simp0 make check TARGET=test/simp1 make check TARGET=test/static + make check-inline TARGET=test/static make check TARGET=test/tmp make check TARGET=test/tmp10 make check TARGET=test/tmp11 make check TARGET=test/tmp12 make check TARGET=test/tmp5 make check TARGET=test/tmp7 - make check-inline TARGET=test/tmp8 + make check-inline TARGET=test/tmp7 + make check TARGET=test/tmp8 make check TARGET=test/tmp9 make check TARGET=test/enum make check TARGET=test/obsf @@ -103,6 +101,7 @@ make check TARGET=test/long make check TARGET=test/tstdarg make check TARGET=test/switch + make check-inline TARGET=test/switch make check TARGET=test/strinit make check-inline TARGET=test/strinit make check TARGET=test/code-gen-all @@ -115,9 +114,12 @@ make check TARGET=test/void_code make check TARGET=test/putenemy make check TARGET=test/inline - make check TARGET=test/offset make check TARGET=test/ps2 + make check-inline TARGET=test/ps2 make check TARGET=test/multi + make check-inline TARGET=test/multi + make check TARGET=test/comp + make check-inline TARGET=test/comp # make check TARGET=test/scope STDFLAG="-std=gnu99" # make check-inline TARGET=test/scope STDFLAG="-std=gnu99" #MK =-make @@ -130,17 +132,20 @@ make check-code$(MK) TARGET=test/fact make check-code$(MK) TARGET=test/goto make check-code$(MK) TARGET=test/test1 + make check-code$(MK) TARGET=test/test2 make check-code$(MK) TARGET=test/tmpa make check-code$(MK) TARGET=test/tmp1 make check-code$(MK) TARGET=test/tmp2 make check-code$(MK) TARGET=test/tmp4 make check-code$(MK) TARGET=test/tmp6 + make check-code$(MK) TARGET=test/tmpb + make check-code-inline TARGET=test/tmpb make check-code$(MK) TARGET=test/scope + make check-code-inline TARGET=test/scope make check-code$(MK) TARGET=test/throw - make check-code$(MK) TARGET=test/test2 make check-code$(MK) TARGET=test/too-long-argument -check-nkf: +check-nkf: mc ( cd nkf203; $(CC) -g -o nkf1 nkf.c utf8tbl.c ) ( cd nkf203; ../mc-$(ARCH) -s nkf.c utf8tbl.c ) ( cd nkf203; $(CC) -g -o nkf nkf.s utf8tbl.s ) @@ -151,7 +156,7 @@ check: mc $(MC) $(TARGET).c -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -./b.out > $(TARGET).gcc.out - -./$(MC) -s $(TARGET).c + -./$(MC) -s $(TARGET).c -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).$(MC).out -diff $(TARGET).gcc.out $(TARGET).$(MC).out @@ -159,21 +164,37 @@ check-inline: mc $(MC) $(TARGET).c -$(CC) $(CFLAGS1) $(STDFLAG) $(TARGET).c -o b.out $(MLIB) -./b.out > $(TARGET).gcc.out - -./$(MC) -s -DINLINE=inline $(TARGET).c + -./$(MC) -s -DINLINE=inline $(TARGET).c -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).$(MC).out -diff $(TARGET).gcc.out $(TARGET).$(MC).out check-code: mc $(MC) - -./$(MC) -s $(TARGET).c + -./$(MC) -s $(TARGET).c + -$(CC) $(TARGET).s $(MLIB) + -./a.out > $(TARGET).$(MC).out + -diff $(TARGET).code-out $(TARGET).$(MC).out +check-code-inline: mc $(MC) + -./$(MC) -s -DINLINE=inline $(TARGET).c -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).$(MC).out -diff $(TARGET).code-out $(TARGET).$(MC).out check-code-make: mc $(MC) - -./$(MC) -s $(TARGET).c + -./$(MC) -s $(TARGET).c -$(CC) $(TARGET).s $(MLIB) -./a.out > $(TARGET).code-out +check-flip: mc $(MC) + -$(CC) -DFLIP -c test/basic2.c + -$(CC) basic2.o test/basic2.c + ./a.out + -./$(MC) -s test/basic2.c + -$(CC) test/basic2.s -DFLIP test/basic2.c + ./a.out + -./$(MC) -DFLIP -s test/basic2.c + -$(CC) test/basic2.s test/basic2.c + ./a.out + test/code-gen-all.c: test/code-gen.pl test/code-gen.c perl test/code-gen.pl < test/code-gen.c > test/code-gen-all.c @@ -192,19 +213,18 @@ make clean tar cBf - . | gzip > ../comp.tgz -depend : mc.h mc-include.c conv/conv.h +depend : mc.h mc-include.c makedepend -I$(GCC_INCLUDE) mc-code-ia32.c mc-code.h mc-codegen.c mc-codegen.h \ - mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ - mc-inline.c mc-macro.c mc-macro.h mc-parse.h \ + mc-parse.c mc-tree.c mc-switch.c mc-switch.h mc.h \ + mc-inline.c mc-macro.c mc-macro.h mc-parse.h \ conv/c.c conv/c.h conv/c2cbc.c conv/c2cbc.h conv/cbc2c.c \ conv/cbc2c.h conv/conv.h conv/convdef.h conv/null.c conv/null.h \ - mc-code-arm.c \ - mc-code-powerpc.c \ - mc-code-mips.c + mc-code-arm.c \ + mc-code-powerpc.c \ + mc-code-mips.c clean : - -rm -f mc mc-null mc-ia32 mc-powerpc mc-mips mc-arm *.bak *.s *.o *.cc mc mc1 mc2 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~ *.out */*.out *.i */*.i *.cbc.? */*.cbc.? mc-include.h - -rm -f *.tsv ../test/*.tsv ../test/sample/*.tsv + -rm -f mc mc-ia32 mc-powerpc mc-mips mc-arm *.bak *.s *.o *.cc mc mc1 mc2 a.out *~ core* */*.o *.bak test/*.s test/*.cc test/*.o test/*.bak test/*~ conv/*.s conv/*.cc conv/*.o conv/*.bak conv/*~ *.out */*.out *.i */*.i mc-include.c mc1 : b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) $(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o mc-switch.o mc-macro.o mc-inline.o $(CONVERTER) @@ -213,37 +233,37 @@ $(CC) -g -o $@ $(PRINTF) b00.s b01.s b02.s b03.s b04.s mc-macro.o mc-inline.o $(CONVERTER) b00.s : mc-parse.c $(MC) - ./$(MC) -s -ob00.s mc-parse.c + ./$(MC) $(MCFLAGS) -s -ob00.s mc-parse.c b01.s : $(CODE) $(MC) - ./$(MC) -s -ob01.s $(CODE) + ./$(MC) $(MCFLAGS) -s -ob01.s $(CODE) b02.s : mc-codegen.c $(MC) - ./$(MC) -s -ob02.s mc-codegen.c + ./$(MC) $(MCFLAGS) -s -ob02.s mc-codegen.c b03.s : mc-tree.c $(MC) - ./$(MC) -s -ob03.s mc-tree.c + ./$(MC) $(MCFLAGS) -s -ob03.s mc-tree.c b04.s : mc-switch.c $(MC) - ./$(MC) -s -ob04.s mc-switch.c + ./$(MC) $(MCFLAGS) -s -ob04.s mc-switch.c b10.s : mc-parse.c mc1 - ./mc1 -s -ob10.s mc-parse.c + ./mc1 $(MCFLAGS) -s -ob10.s mc-parse.c b11.s : $(CODE) $(PRINTF) mc1 - ./mc1 -s -ob11.s $(CODE) + ./mc1 $(MCFLAGS) -s -ob11.s $(CODE) b12.s : mc-codegen.c mc1 - ./mc1 -s -ob12.s mc-codegen.c + ./mc1 $(MCFLAGS) -s -ob12.s mc-codegen.c b13.s : mc-tree.c mc1 - ./mc1 -s -ob13.s mc-tree.c + ./mc1 $(MCFLAGS) -s -ob13.s mc-tree.c b14.s : mc-switch.c mc1 - ./mc1 -s -ob14.s mc-switch.c + ./mc1 $(MCFLAGS) -s -ob14.s mc-switch.c b20.s : mc-parse.c mc2 - ./mc2 -s -ob20.s mc-parse.c + ./mc2 $(MCFLAGS) -s -ob20.s mc-parse.c b21.s : $(CODE) $(PRINTF) mc2 - ./mc2 -s -ob21.s $(CODE) + ./mc2 $(MCFLAGS) -s -ob21.s $(CODE) b22.s : mc-codegen.c mc2 - ./mc2 -s -ob22.s mc-codegen.c + ./mc2 $(MCFLAGS) -s -ob22.s mc-codegen.c b23.s : mc-tree.c mc2 - ./mc2 -s -ob23.s mc-tree.c + ./mc2 $(MCFLAGS) -s -ob23.s mc-tree.c b24.s : mc-switch.c mc1 - ./mc2 -s -ob24.s mc-switch.c + ./mc2 $(MCFLAGS) -s -ob24.s mc-switch.c diff : b00.s b01.s b02.s b03.s b04.s b10.s b11.s b12.s b13.s b14.s -diff b00.s b10.s @@ -261,4 +281,3 @@ # DO NOT DELETE -