3 # File name: Makefile.in
4 # Purpose: Top level Makefile
9 # Copyright: (c) 2002-2003 Universität Karlsruhe
10 # Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
14 # top directory of the source tree
15 top_srcdir := @top_srcdir@
16 # directory with the sources for this directory
18 # top directory of the configured tree
20 # subdirectory under topdir
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 test the firm internal backend stuff?
27 enable_backend := @enable_backend@
28 # do we want to use the libcore for debug and ADT support
29 enable_libcore := @enable_libcore@
31 # suck in values for the linking procedure:
35 build_subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir \
36 ir/opt ir/tr ir/ana ir/stat ir/ana2
38 ifeq (@enable_external_effects@,yes)
39 build_subdirs += ir/external
42 ifeq (@enable_backend@,yes)
43 build_subdirs += ir/be
46 subdirs := $(build_subdirs) ir/config
48 SOURCES := Makefile.in MakeRules.in MakeTargets\
49 aclocal.m4 config.h.in\
50 config.guess config.sub configure.in \
51 stamp-h.in install-sh README configure
53 SHARED_LIB = libfirm.so
55 INSTALL_LIBS = libfirm.a
57 GENFILES := stamp-h config.log config.cache
58 # config.status config.h.in $(srcdir)/stamp-h.in
60 include $(topdir)/MakeRules
62 XOFILES += $(addsuffix /subdir.o, $(build_subdirs))
64 include $(top_srcdir)/MakeTargets
66 # add target firmjni if configured with --enable-firmjni
73 $(OFILES): config.h Makefile
75 $(XOFILES): subdir_all
77 libfirm.a: $(XOFILES) $(OFILES)
78 $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
82 # dont know about xml here
83 libfirm.so: subdir_all $(XOFILES) $(OFILES)
84 ld -Bshareable -o ./libfirm.so $(XOFILES) -lm $(LDFLAGS) $(LIBS)
86 testprograms: libfirm.a
87 $(MAKE) -C testprograms
92 # gernerate program documentation
95 $(DOXYGEN) $(DOXYFILE)
97 #${srcdir}/configure: configure.in aclocal.m4
98 $(srcdir)/configure: configure.in
99 cd $(srcdir) && autoconf
101 # autoheader might not change config.h.in, so touch a stamp file.
102 $(srcdir)/config.h.in: stamp-h.in
104 #${srcdir
\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
105 $(srcdir)/stamp-h.in: configure.in
106 cd $(srcdir) && autoheader
107 echo timestamp > $(srcdir)/stamp-h.in
110 stamp-h: config.h.in config.status
113 config.status: configure
114 ./config.status --recheck
116 # add target test-firmjni if configured with --enable-firmjni
118 $(MAKE) -C testprograms test;
121 $(MAKE) -C firmjni test;
124 $(MAKE) -C testprograms reference;
127 $(MAKE) -C testprograms realclean
128 $(MAKE) -C firmjni/testprograms clean;