First implementation of lowering for calls with compound return values
[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 # do we want external description of effects
25 enable_external_effects := @enable_external_effects@
26 # do we want to use the libcore for debug and ADT support
27 enable_libcore := @enable_libcore@
28 # do we want to disable xmalloc and friends
29 disable_libiberty := @disable_libiberty@
30
31 # suck in values for the linking procedure:
32 LDFLAGS                 = @LDFLAGS@
33 LIBS                    = @LIBS@
34
35 # plugin subdirectories
36 plugin_subdirs := @plugin_subdirs@
37
38 build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
39                 ir/opt ir/tr ir/ana ir/stat ir/ana2 ir/arch \
40                 $(plugin_subdirs)
41
42 ifeq (@enable_external_effects@,yes)
43 build_subdirs += ir/external
44 endif
45
46 ifeq ($(disable_libiberty),yes)
47 build_add_lib := libfirm_xmalloc.a
48 else
49 build_add_lib :=
50 endif
51
52 subdirs := $(build_subdirs) ir/config
53
54 SOURCES := Makefile.in MakeRules.in MakeTargets\
55            aclocal.m4 config.h.in\
56            config.guess config.sub configure.in \
57            stamp-h.in install-sh README configure
58
59 SHARED_LIB = libfirm.so
60
61 INSTALL_LIBS = libfirm.a $(build_add_lib)
62
63 GENFILES := stamp-h config.log config.cache
64 # config.status config.h.in $(srcdir)/stamp-h.in
65
66 include $(topdir)/MakeRules
67
68 XOFILES += $(addsuffix /subdir.o, $(build_subdirs))
69
70 include $(top_srcdir)/MakeTargets
71
72 # add target firmjni if configured with --enable-firmjni
73 all: firm
74
75 firm: libfirm.a $(build_add_lib)
76
77 shared: $(SHARED_LIB)
78
79 $(OFILES): config.h Makefile
80
81 $(XOFILES): subdir_all
82
83 libfirm.a: $(XOFILES) $(OFILES)
84         $(AR) $(ARFLAGS) $@.new $^
85         mv -f $@.new $@
86         $(RANLIB) $@
87
88 libfirm_xmalloc.a: subdir_all ir/adt/xmalloc.o
89         $(AR) $(ARFLAGS) $@.new ir/adt/xmalloc.o
90         mv -f $@.new $@
91
92 # dont know about xml here
93 libfirm.so: $(XOFILES)
94         ld -Bshareable -o ./libfirm.so $(XOFILES) -lm $(LDFLAGS) $(LIBS)
95
96 testprograms:   libfirm.a
97         $(MAKE) -C testprograms
98
99 firmjni:: libfirm.a
100         $(MAKE) -C firmjni
101
102 # gernerate program documentation
103 .PHONY: autodoc
104 autodoc: $(DOXYFILE)
105         $(DOXYGEN) $(DOXYFILE)
106
107 #${srcdir}/configure: configure.in aclocal.m4
108 $(srcdir)/configure: configure.in
109         cd $(srcdir) && autoconf
110
111 # autoheader might not change config.h.in, so touch a stamp file.
112 $(srcdir)/config.h.in: stamp-h.in
113
114 #${srcdir\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
115 $(srcdir)/stamp-h.in: configure.in
116         cd $(srcdir) && autoheader
117         echo timestamp > $(srcdir)/stamp-h.in
118
119 config.h: stamp-h
120 stamp-h: config.h.in config.status
121         ./config.status
122
123 config.status: configure
124         ./config.status --recheck
125
126 # add target test-firmjni if configured with --enable-firmjni
127 test::
128         $(MAKE) -C testprograms test;
129
130 test-firmjni::
131         $(MAKE) -C firmjni test;
132
133 test-reference::
134         $(MAKE) -C testprograms reference;
135
136 test-clean:
137         $(MAKE) -C testprograms realclean
138         $(MAKE) -C firmjni/testprograms clean;