added copyright information
[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
23 subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr ir/ana ir/st
24
25 SOURCES := Makefile.in MakeRules.in MakeTargets\
26            aclocal.m4 config.h.in\
27            config.guess config.sub configure.in \
28            stamp-h.in install-sh README configure
29
30 INSTALL_LIBS = libfirm.a
31
32 GENFILES := stamp-h config.log config.cache
33 # config.status config.h.in $(srcdir)/stamp-h.in
34
35 include $(topdir)/MakeRules
36
37 XOFILES += $(addsuffix /subdir.o, $(subdirs))
38
39 include $(top_srcdir)/MakeTargets
40
41 # add target firmjni if configured with --enable-firmjni
42 all: firm
43
44 firm: config.h Makefile libfirm.a
45
46 libfirm.a: subdir_all $(XOFILES) $(OFILES)
47         $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
48         $(RANLIB) $@.new
49         mv -f $@.new $@
50
51 libfirm.so: subdir_all $(XOFILES) $(OFILES)
52         ld -Bshareable -o ./libfirm.so $(XOFILES) -lm
53
54 testprograms:   libfirm.a
55         $(MAKE) -C testprograms
56
57 firmjni:: libfirm.a
58         $(MAKE) -C firmjni
59
60 # gernerate program documentation
61 .PHONY: autodoc
62 autodoc: $(AUTODOCDIR) $(AUTODOCINDEXFILE)
63
64 .PHONY: $(AUTDOCINDEXFILE)
65 $(AUTODOCINDEXFILE): $(CFILES) $(HFILES)
66         $(AUTODOC) $(AUTODOCFILE)
67
68
69 #${srcdir}/configure: configure.in aclocal.m4
70 $(srcdir)/configure: configure.in
71         cd $(srcdir) && autoconf
72
73 # autoheader might not change config.h.in, so touch a stamp file.
74 $(srcdir)/config.h.in: stamp-h.in
75
76 #${srcdir\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
77 $(srcdir)/stamp-h.in: configure.in
78         cd $(srcdir) && autoheader
79         echo timestamp > $(srcdir)/stamp-h.in
80
81 config.h: stamp-h
82 stamp-h: config.h.in config.status
83         ./config.status
84
85 config.status: configure
86         ./config.status --recheck
87
88 # add target test-firmjni if configured with --enable-firmjni
89 test::
90         $(MAKE) -C testprograms test;
91
92 test-firmjni::
93         $(MAKE) -C firmjni test;
94
95 test-reference::
96         $(MAKE) -C testprograms reference;
97
98 test-clean:
99         $(MAKE) -C testprograms realclean
100         $(MAKE) -C firmjni/testprograms clean;