ICC ?= true
GCCO1 ?= true
-LFLAGS = $(FIRM_LIBS)
+LFLAGS += $(FIRM_LIBS)
SOURCES := \
adt/hashset.c \
adt/xmalloc.c \
ast.c \
ast2firm.c \
+ diagnostic.c \
+ format_check.c \
lexer.c \
main.c \
parser.c \
symbol_table.c \
token.c \
type.c \
+ types.c \
type_hash.c \
+ warning.c \
write_fluffy.c \
driver/firm_cmdline.c \
driver/firm_timing.c \
-include .depend
endif
+%.h:
+ @true
+
.depend: $(SOURCES)
+ @echo "#define cparser_REVISION \"`svnversion -n .`\"" > .revision.h
+ $(Q)if diff -Nq .revision.h revision.h > /dev/null; then \
+ rm .revision.h; \
+ else \
+ echo "===> UPDATING revision.h"; \
+ mv .revision.h revision.h; \
+ fi
@echo "===> DEPEND"
@rm -f $@ && touch $@ && makedepend -p "$@ build/" -Y -f $@ -- $(CPPFLAGS) -- $(SOURCES) 2> /dev/null && rm $@.bak
build/%.o: %.c
@echo '===> CC $<'
+#-$(Q)build/cparser $(CPPFLAGS) $(CFLAGS) -fsyntax-only $<
$(Q)$(ICC) $(CPPFLAGS) $(ICC_CFLAGS) -c $< -o $@
$(Q)$(GCCO1) $(CPPFLAGS) $(CFLAGS) -O1 -c $< -o $@
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean:
@echo '===> CLEAN'
- $(Q)rm -rf build $(GOAL) .depend
+ $(Q)rm -rf build/* $(GOAL) .depend