- when parsing compound types, do NOT destroy old declarations if
[cparser] / Makefile
index acc6009..1065cfe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,11 +68,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                                                 \
@@ -111,10 +116,12 @@ $(DIRS):
        @echo "===> MKDIR $@"
        $(Q)mkdir -p $@
 
-builtins.h: builtins/builtins.c
+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 $@
@@ -141,8 +148,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: