X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=Makefile;h=4436a663fc9a0ec484f9fbc92e82909a90bc18c3;hb=b4841b96869c6fbd61f4ae3931d3c69c6b33c2e0;hp=745b7371c32549aafefe45232c0de94254d38867;hpb=9e7f415c155a845ef8af34152e45d2bceec4792e;p=libfirm diff --git a/Makefile b/Makefile index 745b7371c..4436a663f 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,13 @@ variant ?= debug srcdir ?= $(top_srcdir) builddir ?= $(top_builddir)/$(variant) +docdir ?= $(top_builddir)/doc # This hides the noisy commandline outputs. You can see them with "make Q=" Q ?= @ CC ?= cc +DOXYGEN ?= doxygen LINK ?= $(CC) AR ?= ar DLLEXT ?= .so @@ -33,7 +35,7 @@ CFLAGS_optimize = $(CFLAGS_all) -O3 -DNDEBUG # General flags CFLAGS += $(CFLAGS_$(variant)) CFLAGS += -Wall -W -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -LINKFLAGS += $(LINKFLAGS_$(variant)) +LINKFLAGS += $(LINKFLAGS_$(variant)) -lm VPATH = $(srcdir) REVISION ?= $(shell git describe --abbrev=40 --always --dirty --match '') @@ -168,7 +170,7 @@ $(libfirm_a): $(libfirm_OBJECTS) $(libfirm_dll): $(libfirm_OBJECTS) @echo LINK $@ - $(Q)$(LINK) -shared -o $@ $^ + $(Q)$(LINK) -shared $(LINKFLAGS) -o $@ $^ # Generic rules UNUSED := $(shell mkdir -p $(libfirm_DIRS:%=$(builddir)/%)) @@ -176,6 +178,19 @@ $(builddir)/%.o: %.c $(IR_SPEC_GENERATED_FILES) config.h @echo CC $@ $(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 $@ + $(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 "" $@ + $(Q)cp scripts/style.css $(docdir)/html + +.PHONY: doc +doc: $(docdir)/libfirm.tag $(docdir)/html/nodes.html + .PHONY: clean clean: @echo CLEAN