Minor corrections.
[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
27 ifeq (@enable_external_effects@,yes)
28 build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
29                 ir/opt ir/tr ir/ana ir/stat ir/ana2 ir/external
30 else
31 build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
32                 ir/opt ir/tr ir/ana ir/stat ir/ana2
33 endif
34
35 subdirs := $(build_subdirs) ir/config
36
37 SOURCES := Makefile.in MakeRules.in MakeTargets\
38            aclocal.m4 config.h.in\
39            config.guess config.sub configure.in \
40            stamp-h.in install-sh README configure
41
42 SHARED_LIB = libfirm.so
43
44 INSTALL_LIBS = libfirm.a
45
46 GENFILES := stamp-h config.log config.cache
47 # config.status config.h.in $(srcdir)/stamp-h.in
48
49 include $(topdir)/MakeRules
50
51 XOFILES += $(addsuffix /subdir.o, $(build_subdirs))
52
53 include $(top_srcdir)/MakeTargets
54
55 # add target firmjni if configured with --enable-firmjni
56 all: firm
57
58 firm: libfirm.a
59
60 shared: $(SHARED_LIB)
61
62 $(OFILES): config.h Makefile
63
64 $(XOFILES): subdir_all
65
66 libfirm.a: $(XOFILES) $(OFILES)
67         $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
68         mv -f $@.new $@
69         $(RANLIB) $@
70
71 # dont know about xml here
72 libfirm.so: subdir_all $(XOFILES) $(OFILES)
73         ld -Bshareable -o ./libfirm.so $(XOFILES) -lm -L/usr/public/libxml2/lib -lxml2
74
75 testprograms:   libfirm.a
76         $(MAKE) -C testprograms
77
78 firmjni:: libfirm.a
79         $(MAKE) -C firmjni
80
81 # gernerate program documentation
82 .PHONY: autodoc
83 autodoc: $(DOXYFILE)
84         $(DOXYGEN) $(DOXYFILE)
85
86 #${srcdir}/configure: configure.in aclocal.m4
87 $(srcdir)/configure: configure.in
88         cd $(srcdir) && autoconf
89
90 # autoheader might not change config.h.in, so touch a stamp file.
91 $(srcdir)/config.h.in: stamp-h.in
92
93 #${srcdir\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
94 $(srcdir)/stamp-h.in: configure.in
95         cd $(srcdir) && autoheader
96         echo timestamp > $(srcdir)/stamp-h.in
97
98 config.h: stamp-h
99 stamp-h: config.h.in config.status
100         ./config.status
101
102 config.status: configure
103         ./config.status --recheck
104
105 # add target test-firmjni if configured with --enable-firmjni
106 test::
107         $(MAKE) -C testprograms test;
108
109 test-firmjni::
110         $(MAKE) -C firmjni test;
111
112 test-reference::
113         $(MAKE) -C testprograms reference;
114
115 test-clean:
116         $(MAKE) -C testprograms realclean
117         $(MAKE) -C firmjni/testprograms clean;