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
23 subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr ir/ana ir/st
25 ifeq ($(enable_statistics),yes)
29 SOURCES := Makefile.in MakeRules.in MakeTargets\
30 aclocal.m4 config.h.in\
31 config.guess config.sub configure.in \
32 stamp-h.in install-sh README configure
34 INSTALL_LIBS = libfirm.a
36 GENFILES := stamp-h config.log config.cache
37 # config.status config.h.in $(srcdir)/stamp-h.in
39 include $(topdir)/MakeRules
41 XOFILES += $(addsuffix /subdir.o, $(subdirs))
43 include $(top_srcdir)/MakeTargets
45 # add target firmjni if configured with --enable-firmjni
50 $(OFILES): config.h Makefile
52 $(XOFILES): subdir_all
54 libfirm.a: $(XOFILES) $(OFILES)
55 $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
59 libfirm.so: subdir_all $(XOFILES) $(OFILES)
60 ld -Bshareable -o ./libfirm.so $(XOFILES) -lm
62 testprograms: libfirm.a
63 $(MAKE) -C testprograms
68 # gernerate program documentation
70 autodoc: $(AUTODOCDIR) $(AUTODOCINDEXFILE)
72 .PHONY: $(AUTDOCINDEXFILE)
73 $(AUTODOCINDEXFILE): $(CFILES) $(HFILES)
74 $(AUTODOC) $(AUTODOCFILE)
77 #${srcdir}/configure: configure.in aclocal.m4
78 $(srcdir)/configure: configure.in
79 cd $(srcdir) && autoconf
81 # autoheader might not change config.h.in, so touch a stamp file.
82 $(srcdir)/config.h.in: stamp-h.in
84 #${srcdir
\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
85 $(srcdir)/stamp-h.in: configure.in
86 cd $(srcdir) && autoheader
87 echo timestamp > $(srcdir)/stamp-h.in
90 stamp-h: config.h.in config.status
93 config.status: configure
94 ./config.status --recheck
96 # add target test-firmjni if configured with --enable-firmjni
98 $(MAKE) -C testprograms test;
101 $(MAKE) -C firmjni test;
104 $(MAKE) -C testprograms reference;
107 $(MAKE) -C testprograms realclean
108 $(MAKE) -C firmjni/testprograms clean;