VPATH = $(srcdir)
-SHELL = @CONFIG_SHELL@
+LIBFIRM_VERSION = @PACKAGE_VERSION@
CC = @CC@
CFLAGS := @CFLAGS@
CPPFLAGS := -I. -I$(topdir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
-
+prefix?=@prefix@
+exec_prefix?=@exec_prefix@
+includedir?=@includedir@
+libdir?=@libdir@
INSTALL = @INSTALL@
-INCLUDEDIR = @includedir@
-LIBDIR = @libdir@
+INCLUDEDIR ?= ${prefix}/${includedir}/${PACKAGE_NAME}
+LIBDIR ?= ${exec_prefix}/${libdir}
+PACKAGE_NAME = @PACKAGE_NAME@
DEFS = @DEFS@
LDFLAGS := @LDFLAGS@
LD_R := @libfirm_cv_prog_ld_r@
+LN_S := @LN_S@
+
# profiling enabled?
ifeq (@enable_profile_libfirm@,yes)
-LDFLAGS += -g -pg
+LDFLAGS += # -g -pg GL: geht bei mir nicht: unrecognised option
+CFLAGS += -g -pg
endif
AR := @AR@
ARFLAGS := rc
+TAR := @TAR@
+TARDIRNAME := libfirm-$(LIBFIRM_VERSION)
+TARFILENAME := $(topdir)/$(TARDIRNAME).tar
+TARFLAGS = -uhf $(TARFILENAME)
+
RANLIB := @RANLIB@
-DISTFILES = $(SOURCES)
+AUTODOC := @ROBODOC@
+AUTODOCDIR := $(topdir)/auto_doc
+INDEXFILE := $(AUTODOCDIR)/index.html
+GLOBALXREFFILE := $(AUTODOCDIR)/libfirm.html.xrefs
+LOCALXREFSFILE := .xrefs
+
+DISTFILES += $(addprefix $(srcdir)/, $(SOURCES))
+ARCHIVEDISTFILES += $(addprefix $(TARDIRNAME)/$(subdir)/, $(SOURCES))
CFILES = $(filter %.c,$(SOURCES) $(GENFILES))
HFILES = $(filter %.h,$(SOURCES) $(GENFILES))
OFILES = $(CFILES:.c=.o)
+XREFFILES = $(addsuffix .xref, $(filter %.c, $(SOURCES)) $(filter %.h, $(SOURCES)))
+HTMLFILES = $(addprefix $(AUTODOCDIR)/, $(XREFFILES:.xref=.html))
+
+GENFILES += $(LOCALXREFSFILE) $(XREFFILES)
TAGFILES = $(CFILES) $(HFILES)
%.c: %.dot
$(DT) $(DTFLAGS) <$^ >$@ || $(fail)
+%.xref: %
+ $(AUTODOC) $< $(@:.xref=.html) INTERNAL HTML GENXREF $@
+
+$(AUTODOCDIR)/%.html: % $(GLOBALXREFFILE)
+ $(AUTODOC) $< $@ HTML INTERNAL XREF $(GLOBALXREFFILE)
+
+$(LOCALXREFSFILE): $(XREFFILES)
+ifeq ($(strip $(XREFSFILE)),)
+ $(RM) $@
+ touch $@
+else
+ ls *.xref > $@
+endif
+
define fail
{ $(RM) $@; false; }
endef
endif
-targets = all clean depend echodist echogen echosrc realclean tags install
+targets = all clean depend realclean tags install autodoc autodoc_xref autodoc_html dist distrib install_headers install_libs