fix cp_error020, fix warning
[cparser] / Makefile
index e9c4c30..4749e6a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,10 @@ CPPFLAGS += $(FIRM_CFLAGS)
 
 CFLAGS += -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Werror -std=c99 -pedantic
 CFLAGS += -O0 -g3
-ICC_CFLAGS = -O0 -g3 -std=c99 -Wall -Werror
 #CFLAGS += -O3 -march=pentium4 -fomit-frame-pointer -DNDEBUG
+#CFLAGS += -pg -O3 -fno-inline
+ICC_CFLAGS = -O0 -g3 -std=c99 -Wall -Werror
+LFLAGS += -pg
 ICC    ?= true
 GCCO1  ?= true
 
@@ -23,6 +25,8 @@ LFLAGS += $(FIRM_LIBS)
 SOURCES := \
        adt/hashset.c \
        adt/strset.c \
+       adt/obstack.c \
+       adt/obstack_printf.c \
        adt/xmalloc.c \
        ast.c \
        ast2firm.c \
@@ -47,6 +51,7 @@ SOURCES := \
 OBJECTS = $(SOURCES:%.c=build/%.o)
 
 SPLINTS = $(addsuffix .splint, $(SOURCES))
+CPARSERS = $(addsuffix .cparser, $(SOURCES))
 
 Q = @
 
@@ -78,10 +83,16 @@ $(GOAL): build/adt build/driver $(OBJECTS)
 
 splint: $(SPLINTS)
 
+selfcheck: $(CPARSERS)
+
 %.c.splint: %.c
        @echo '===> SPLINT $<'
        $(Q)splint $(CPPFLAGS) $<
 
+%.c.cparser: %.c
+       @echo '===> CPARSER $<'
+       $(Q)./cparser $(CPPFLAGS) -fsyntax-only $<
+
 build/adt build/driver:
        @echo "===> MKDIR $@"
        $(Q)mkdir -p $@