srcdir ?= $(top_srcdir)
builddir ?= $(top_builddir)/$(variant)
-docdir ?= $(top_builddir)/firm-doc
+docdir ?= $(top_builddir)/doc
# This hides the noisy commandline outputs. You can see them with "make Q="
Q ?= @
DLLEXT ?= .so
# Variants
-CFLAGS_all = -fPIC -DHAVE_FIRM_REVISION_H
+CFLAGS_all = -std=c99 -fPIC -DHAVE_FIRM_REVISION_H
CFLAGS_debug = $(CFLAGS_all) -O0 -g3 -DDEBUG_libfirm
CFLAGS_profile = $(CFLAGS_all) -O3 -pg -DNDEBUG -fno-inline
-LINKFLAGS_profile = -pg
-CFLAGS_optimize = $(CFLAGS_all) -O3 -DNDEBUG
+CFLAGS_coverage = $(CFLAGS_all) -O0 --coverage -DDEBUG_libfirm
+LINKFLAGS_profile = -pg
+LINKFLAGS_coverage = --coverage
+CFLAGS_optimize = $(CFLAGS_all) -O3 -fomit-frame-pointer -DNDEBUG
# General flags
CFLAGS += $(CFLAGS_$(variant))
echo "$$REV" | cmp -s - firm_revision.h 2> /dev/null || echo "$$REV" > firm_revision.h \
)
-.PHONY: all
all: firm
+.PHONY: all
+
+# disable make builtin suffix rules
+.SUFFIXES:
# This rule is necessary so that make does not abort if headers get deleted
# (the deleted header might still be referenced in a .d file)
$(Q)rm -f $@
$(Q)echo "#define libfirm_VERSION_MAJOR 1" >> $@
$(Q)echo "#define libfirm_VERSION_MICRO 0" >> $@
- $(Q)echo "#define libfirm_VERSION_MINOR 20" >> $@
+ $(Q)echo "#define libfirm_VERSION_MINOR 21" >> $@
# libFirm
libfirm_DIRS := \
backends = amd64 arm ia32 sparc TEMPLATE
EMITTER_GENERATOR = $(srcdir)ir/be/scripts/generate_emitter.pl
-EMITTER_GENERATOR2 = $(srcdir)ir/be/scripts/generate_emitter_new.pl
REGALLOC_IF_GENERATOR = $(srcdir)ir/be/scripts/generate_regalloc_if.pl
OPCODES_GENERATOR = $(srcdir)ir/be/scripts/generate_new_opcodes.pl
$(1)_SPEC = ir/be/$(1)/$(1)_spec.pl
-$$(srcdir)ir/be/$(1)/gen_$(1)_emitter.h $$(srcdir)ir/be/$(1)/gen_$(1)_emitter.c: $$($(1)_SPEC) $$(EMITTER_GENERATOR) $(EMITTER_GENERATOR2)
+$$(srcdir)ir/be/$(1)/gen_$(1)_emitter.h $$(srcdir)ir/be/$(1)/gen_$(1)_emitter.c: $$($(1)_SPEC) $$(EMITTER_GENERATOR)
@echo GEN $$@
$(Q)$$(EMITTER_GENERATOR) $$($(1)_SPEC) $$(srcdir)ir/be/$(1)
$(1)_SOURCES += ir/be/$(1)/gen_$(1)_emitter.c
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(libfirm_CPPFLAGS) -MMD -c -o $@ $<
$(docdir)/libfirm.tag: $(IR_SPEC_GENERATED_FILES) Doxyfile $(wildcard include/libfirm/*.h) $(wildcard include/libfirm/adt/*.h)
- @echo Doxygen
+ @echo Doxygen $@
$(Q)$(DOXYGEN)
DOCU_GENERATOR := scripts/gen_docu.py
$(docdir)/html/nodes.html: $(docdir)/libfirm.tag $(DOCU_GENERATOR) $(IR_SPEC) scripts/spec_util.py scripts/style.css
- @echo gen_docu.py
- $(Q)$(DOCU_GENERATOR) $(docdir)/libfirm.tag "" $@
+ @echo gen_docu.py $@
+ $(Q)$(DOCU_GENERATOR) $(IR_SPEC) $(docdir)/libfirm.tag "" $@
$(Q)cp scripts/style.css $(docdir)/html
-.PHONY: documentation
-documentation: $(docdir)/libfirm.tag $(docdir)/html/nodes.html
+.PHONY: doc
+doc: $(docdir)/libfirm.tag $(docdir)/html/nodes.html
.PHONY: clean
clean: