X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=Makefile;h=f7f50ca6ac76535de862f640af7557c9875d65dc;hb=ae52b69dfadbd0835e01f55167d979cb6a9a6305;hp=87b732d9a21f793566329e5b71c66aec53371519;hpb=abb8fbf8f749167dabff786e43009e2a509f43e8;p=cparser diff --git a/Makefile b/Makefile index 87b732d..f7f50ca 100644 --- a/Makefile +++ b/Makefile @@ -29,25 +29,28 @@ SOURCES := \ adt/obstack_printf.c \ adt/xmalloc.c \ ast.c \ - ast2firm.c \ diagnostic.c \ entitymap.c \ format_check.c \ lexer.c \ main.c \ - parser.c \ + walk_statements.c \ symbol_table.c \ token.c \ type.c \ types.c \ type_hash.c \ warning.c \ + parser.c \ + ast2firm.c \ write_fluffy.c \ + write_caml.c \ driver/firm_cmdline.c \ driver/firm_timing.c \ driver/firm_codegen.c \ driver/firm_opt.c \ driver/gen_firm_asm.c \ + preprocessor.c OBJECTS = $(SOURCES:%.c=build/%.o) @@ -67,11 +70,16 @@ ifeq ($(findstring $(MAKECMDGOALS), clean depend),) -include .depend endif +config.h: + cp config.h.in $@ + %.h: @true -.depend: $(SOURCES) - @echo "#define cparser_REVISION \"`svnversion -n .`\"" > .revision.h +REVISION ?= $(shell svnversion -n .) + +.depend: config.h $(SOURCES) + @echo "#define cparser_REVISION \"$(REVISION)\"" > .revision.h $(Q)if diff -Nq .revision.h revision.h > /dev/null; then \ rm .revision.h; \ else \ @@ -84,7 +92,7 @@ endif DIRS = build build/adt build/driver build/cpb build/cpb/adt build/cpb/driver build/cpb2 build/cpb2/adt build/cpb2/driver build/cpbe build/cpbe/adt build/cpbe/driver UNUSED := $(shell mkdir -p $(DIRS)) -$(GOAL): $(OBJECTS) +$(GOAL): $(OBJECTS) $(LIBFIRM_FILE) @echo "===> LD $@" $(Q)$(CC) $(OBJECTS) $(LFLAGS) -o $(GOAL) @@ -110,6 +118,12 @@ $(DIRS): @echo "===> MKDIR $@" $(Q)mkdir -p $@ +builtins.h: builtins/builtins.c create_builtins_h.sh + @echo '===> CREATE_BUILTINS $<' + $(Q)./create_builtins_h.sh > $@ + +main.c: builtins.h + build/cpb/%.o: %.c build/cparser @echo '===> CPARSER $<' $(Q)./build/cparser $(CPPFLAGS) -std=c99 -Wall -g3 -c $< -o $@ @@ -136,8 +150,8 @@ cparser.bootstrap2: $(CPARSEROS2) build/%.o: %.c @echo '===> CC $<' - $(Q)$(ICC) $(CPPFLAGS) $(ICC_CFLAGS) -c $< -o $@ - $(Q)$(GCCO1) $(CPPFLAGS) $(CFLAGS) -O1 -c $< -o $@ +#$(Q)$(ICC) $(CPPFLAGS) $(ICC_CFLAGS) -c $< -o $@ +#$(Q)$(GCCO1) $(CPPFLAGS) $(CFLAGS) -O1 -c $< -o $@ $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ clean: