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 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 \
29 stamp-h.in install-sh README configure
31 INSTALL_LIBS = libfirm.a
33 GENFILES := stamp-h config.log config.cache
34 # config.status config.h.in $(srcdir)/stamp-h.in
36 include $(topdir)/MakeRules
38 XOFILES += $(addsuffix /subdir.o, $(subdirs))
40 include $(top_srcdir)/MakeTargets
43 all: config.h Makefile libfirm.a
45 libfirm.a: subdir_all $(XOFILES) $(OFILES)
46 $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
50 testprograms: libfirm.a
51 $(MAKE) -C testprograms
54 # generate program documentation
56 autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
58 $(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
61 find $(PWD) -name "*.xref" -print > $@
63 $(INDEXFILE): $(GLOBALXREFFILE)
64 $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
67 #${srcdir}/configure: configure.in aclocal.m4
68 $(srcdir)/configure: configure.in
69 cd $(srcdir) && autoconf
71 # autoheader might not change config.h.in, so touch a stamp file.
72 $(srcdir)/config.h.in: stamp-h.in
74 #${srcdir
\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
75 $(srcdir)/stamp-h.in: configure.in
76 cd $(srcdir) && autoheader
77 echo timestamp > $(srcdir)/stamp-h.in
80 stamp-h: config.h.in config.status
83 config.status: configure
84 ./config.status --recheck