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 \
31 INSTALL_LIBS = libfirm.a
33 GENFILES := stamp-h config.log config.cache
36 ARCHIVEDISTFILES := testprograms/Makefile.in \
37 testprograms/array-heap_example.c testprograms/if_example.c \
38 testprograms/array-stack_example.c testprograms/if_while_example.c \
39 testprograms/call_str_example.c testprograms/inheritance_example.c \
40 testprograms/cond_example.c testprograms/irr_cf_example.c \
41 testprograms/const_eval_example.c testprograms/irr_loop_example.c \
42 testprograms/dead_block_example.c testprograms/memory_example.c \
43 testprograms/empty.c testprograms/oo_program_example.c \
44 testprograms/global_var_example.c testprograms/three_cfpred_example.c \
45 testprograms/if_else_example.c testprograms/while_example.c \
47 DISTFILES = $(addprefix ../, $(ARCHIVEDISTFILES))
49 # config.status config.h.in $(srcdir)/stamp-h.in
51 include $(topdir)/MakeRules
53 XOFILES += $(addsuffix /subdir.o, $(subdirs))
55 include $(top_srcdir)/MakeTargets
58 all: config.h Makefile libfirm.a
60 libfirm.a: subdir_all $(XOFILES) $(OFILES)
61 $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
65 testprograms: libfirm.a
66 $(MAKE) -C testprograms
69 # generate program documentation
71 autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
73 $(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
76 find $(PWD) -name "*.xref" -print > $@
78 $(INDEXFILE): $(GLOBALXREFFILE)
79 $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
82 #${srcdir}/configure: configure.in aclocal.m4
83 $(srcdir)/configure: configure.in
84 cd $(srcdir) && autoconf
86 # autoheader might not change config.h.in, so touch a stamp file.
87 $(srcdir)/config.h.in: stamp-h.in
89 #${srcdir
\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
90 $(srcdir)/stamp-h.in: configure.in
91 cd $(srcdir) && autoheader
92 echo timestamp > $(srcdir)/stamp-h.in
95 stamp-h: config.h.in config.status
98 config.status: configure
99 ./config.status --recheck