1 # Hey Emacs, this is a -*- makefile -*-
10 # top directory of the source tree
11 top_srcdir := @top_srcdir@
12 # directory with the sources for this directory
14 # top directory of the configured tree
16 # subdirectory under topdir
20 exec_prefix := @exec_prefix@
21 bindir = $(exec_prefix)/bin
22 datadir = $(prefix)/lib
24 subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr
26 SOURCES := Makefile.in MakeRules.in MakeTargets\
27 aclocal.m4 config.h.in\
28 config.guess config.sub configure.in \
31 INSTALL_LIBS = libfirm.a
33 GENFILES := stamp-h config.log config.cache
35 # config.status config.h.in $(srcdir)/stamp-h.in
37 include $(topdir)/MakeRules
39 XOFILES += $(addsuffix /subdir.o, $(subdirs))
41 include $(top_srcdir)/MakeTargets
44 all: config.h Makefile libfirm.a
46 libfirm.a: subdir_all $(XOFILES) $(OFILES)
47 $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
51 testprograms: libfirm.a
52 $(MAKE) -C testprograms
55 # generate program documentation
57 autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
59 $(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
62 find $(PWD) -name "*.xref" -print > $@
64 $(INDEXFILE): $(GLOBALXREFFILE)
65 $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
68 #${srcdir}/configure: configure.in aclocal.m4
69 $(srcdir)/configure: configure.in
70 cd $(srcdir) && autoconf
72 # autoheader might not change config.h.in, so touch a stamp file.
73 $(srcdir)/config.h.in: stamp-h.in
75 #${srcdir
\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
76 $(srcdir)/stamp-h.in: configure.in
77 cd $(srcdir) && autoheader
78 echo timestamp > $(srcdir)/stamp-h.in
81 stamp-h: config.h.in config.status
84 config.status: configure
85 ./config.status --recheck