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