Merging 7971:887db7d64bc9 with 7970:21b063622472.
[cacao.git] / src / cacao / Makefile.am
1 ## src/cacao/Makefile.am
2 ##
3 ## Copyright (C) 1996-2005, 2006, 2007, 2008
4 ## CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5 ##
6 ## This file is part of CACAO.
7 ##
8 ## This program is free software; you can redistribute it and/or
9 ## modify it under the terms of the GNU General Public License as
10 ## published by the Free Software Foundation; either version 2, or (at
11 ## your option) any later version.
12 ##
13 ## This program is distributed in the hope that it will be useful, but
14 ## WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 ## General Public License for more details.
17 ##
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 ## 02110-1301, USA.
22
23
24 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
25
26 if ENABLE_THREADS
27 THREAD_LIB = \
28         $(top_builddir)/src/threads/libthreads.la
29 endif
30
31 if ENABLE_STATICVM
32 cacao_LDFLAGS = \
33         -all-static
34 else
35 cacao_LDFLAGS =
36 endif
37
38 if ENABLE_LIBJVM
39 lib_LTLIBRARIES = \
40         libjvm.la
41
42 libjvm_la_LDFLAGS = \
43         -version-info 1:0:0
44
45 if WITH_CLASSPATH_SUN
46 libjvm_la_LDFLAGS += \
47         -Xlinker --version-script=$(top_srcdir)/contrib/mapfile-vers-product
48 endif
49
50 cacao_LDFLAGS += \
51         -export-dynamic
52
53 CACAO_LIBS =
54 else
55 noinst_LTLIBRARIES = \
56         libjvm.la
57
58 cacao_LDFLAGS += \
59         -export-dynamic
60
61 CACAO_LIBS = \
62         libjvm.la
63 endif
64
65 if ENABLE_RT_TIMING
66 cacao_LDFLAGS += -lrt
67 endif
68
69 if ENABLE_PYTHON
70 cacao_LDFLAGS += \
71     @PYTHON_LSPEC@
72 endif
73
74 libjvm_la_SOURCES =
75
76 libjvm_la_LIBADD = \
77         $(top_builddir)/src/fdlibm/libfdlibm.la \
78         $(top_builddir)/src/mm/libmm.la \
79         $(top_builddir)/src/native/libnative.la \
80         $(top_builddir)/src/toolbox/libtoolbox.la \
81         $(top_builddir)/src/vm/libvm.la \
82         $(top_builddir)/src/vmcore/libvmcore.la \
83         $(GC_LIB) \
84         $(THREAD_LIB)
85
86 bin_PROGRAMS = \
87         cacao
88
89 cacao_SOURCES = \
90         cacao.c
91
92 cacao_LDADD = \
93         $(CACAO_LIBS)
94
95 cacao_DEPENDENCIES = \
96         $(cacao_LDADD)
97
98
99 ## Local variables:
100 ## mode: Makefile
101 ## indent-tabs-mode: t
102 ## c-basic-offset: 4
103 ## tab-width: 8
104 ## compile-command: "automake --add-missing"
105 ## End: