Integrated ir/external/
[libfirm] / Makefile.in
1 #
2 # Project:     libFIRM
3 # File name:   Makefile.in
4 # Purpose:     Top level Makefile
5 # Author:      Till Riedel
6 # Modified by:
7 # Created:
8 # CVS-ID:      $Id$
9 # Copyright:   (c) 2002-2003 Universität Karlsruhe
10 # Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11 #
12
13
14 # top directory of the source tree
15 top_srcdir := @top_srcdir@
16 # directory with the sources for this directory
17 srcdir := @srcdir@
18 # top directory of the configured tree
19 topdir := .
20 # subdirectory under topdir
21 subdir := .
22 # do we want statistics
23 enable_statistics := @enable_statistics@
24
25 subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/opt ir/tr ir/ana ir/stat ir/external # ir/st
26
27 SOURCES := Makefile.in MakeRules.in MakeTargets\
28            aclocal.m4 config.h.in\
29            config.guess config.sub configure.in \
30            stamp-h.in install-sh README configure
31
32 SHARED_LIB = libfirm.so
33
34 INSTALL_LIBS = libfirm.a $(SHARED_LIB)
35
36 GENFILES := stamp-h config.log config.cache
37 # config.status config.h.in $(srcdir)/stamp-h.in
38
39 include $(topdir)/MakeRules
40
41 XOFILES += $(addsuffix /subdir.o, $(subdirs))
42
43 include $(top_srcdir)/MakeTargets
44
45 # add target firmjni if configured with --enable-firmjni
46 all: firm
47
48 firm: libfirm.a $(SHARED_LIB)
49
50 $(OFILES): config.h Makefile
51
52 $(XOFILES): subdir_all
53
54 libfirm.a: $(XOFILES) $(OFILES)
55         $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
56         $(RANLIB) $@.new
57         mv -f $@.new $@
58
59 libfirm.so: subdir_all $(XOFILES) $(OFILES)
60         ld -Bshareable -o ./libfirm.so $(XOFILES) -lm
61
62 testprograms:   libfirm.a
63         $(MAKE) -C testprograms
64
65 firmjni:: libfirm.a
66         $(MAKE) -C firmjni
67
68 # gernerate program documentation
69 .PHONY: autodoc
70 autodoc: $(DOXYFILE)
71         $(DOXYGEN) $(DOXYFILE)
72
73 #${srcdir}/configure: configure.in aclocal.m4
74 $(srcdir)/configure: configure.in
75         cd $(srcdir) && autoconf
76
77 # autoheader might not change config.h.in, so touch a stamp file.
78 $(srcdir)/config.h.in: stamp-h.in
79
80 #${srcdir\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
81 $(srcdir)/stamp-h.in: configure.in
82         cd $(srcdir) && autoheader
83         echo timestamp > $(srcdir)/stamp-h.in
84
85 config.h: stamp-h
86 stamp-h: config.h.in config.status
87         ./config.status
88
89 config.status: configure
90         ./config.status --recheck
91
92 # add target test-firmjni if configured with --enable-firmjni
93 test::
94         $(MAKE) -C testprograms test;
95
96 test-firmjni::
97         $(MAKE) -C firmjni test;
98
99 test-reference::
100         $(MAKE) -C testprograms reference;
101
102 test-clean:
103         $(MAKE) -C testprograms realclean
104         $(MAKE) -C firmjni/testprograms clean;