*** empty log message ***
[libfirm] / Makefile.in
1 # Hey Emacs, this is a -*- makefile -*-
2 #
3 # libFIRM Project
4 #
5 # Top level Makefile
6 # $Id$
7 #
8
9
10 # top directory of the source tree
11 top_srcdir := @top_srcdir@
12 # directory with the sources for this directory
13 srcdir := @srcdir@
14 # top directory of the configured tree
15 topdir := .
16 # subdirectory under topdir
17 subdir := .
18
19 prefix := @prefix@
20 exec_prefix := @exec_prefix@
21 bindir = $(exec_prefix)/bin
22 datadir = $(prefix)/lib
23
24 subdirs := ir ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr
25
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
30
31 INSTALL_LIBS = libfirm.a
32
33 GENFILES := stamp-h config.log config.cache
34
35 # init
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        \
46
47 DISTFILES = $(addprefix ../, $(ARCHIVEDISTFILES))
48
49 # config.status config.h.in $(srcdir)/stamp-h.in
50
51 include $(topdir)/MakeRules
52
53 XOFILES += $(addsuffix /subdir.o, $(subdirs))
54
55 include $(top_srcdir)/MakeTargets
56
57
58 all: config.h Makefile libfirm.a
59
60 libfirm.a: subdir_all $(XOFILES) $(OFILES)
61         $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
62         $(RANLIB) $@.new
63         mv -f $@.new $@
64
65 testprograms:   libfirm.a
66         $(MAKE) -C testprograms
67
68
69 # generate program documentation
70 .PHONY: autodoc
71 autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
72
73 $(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
74 #       cat $^ > $@
75         $(RM) $@
76         find $(PWD) -name "*.xref" -print > $@
77
78 $(INDEXFILE): $(GLOBALXREFFILE)
79         $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
80
81
82 #${srcdir}/configure: configure.in aclocal.m4
83 $(srcdir)/configure: configure.in
84         cd $(srcdir) && autoconf
85
86 # autoheader might not change config.h.in, so touch a stamp file.
87 $(srcdir)/config.h.in: stamp-h.in
88
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
93
94 config.h: stamp-h
95 stamp-h: config.h.in config.status
96         ./config.status
97
98 config.status: configure
99         ./config.status --recheck