73f5b839ac3fa782b472f9596de6c593709c1ace
[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_STATICVM
27 cacao_LDFLAGS = \
28         -all-static
29 else
30 cacao_LDFLAGS =
31 endif
32
33 if ENABLE_LIBJVM
34 lib_LTLIBRARIES = \
35         libjvm.la
36
37 libjvm_la_LDFLAGS = \
38         -version-info 1:0:0
39
40 if WITH_JAVA_RUNTIME_LIBRARY_OPENJDK
41 libjvm_la_LDFLAGS += \
42         -Xlinker --version-script=$(top_srcdir)/contrib/mapfile-vers-product
43 endif
44
45 cacao_LDFLAGS += \
46         -export-dynamic
47
48 CACAO_LIBS =
49 else
50 noinst_LTLIBRARIES = \
51         libjvm.la
52
53 cacao_LDFLAGS += \
54         -export-dynamic
55
56 CACAO_LIBS = \
57         libjvm.la
58 endif
59
60 if ENABLE_RT_TIMING
61 cacao_LDFLAGS += -lrt
62 endif
63
64 if ENABLE_PYTHON
65 cacao_LDFLAGS += \
66     @PYTHON_LSPEC@
67 endif
68
69 libjvm_la_SOURCES =
70
71 libjvm_la_LIBADD = \
72         $(top_builddir)/src/fdlibm/libfdlibm.la \
73         $(top_builddir)/src/mm/libmm.la \
74         $(top_builddir)/src/native/libnative.la \
75         $(top_builddir)/src/threads/libthreads.la \
76         $(top_builddir)/src/toolbox/libtoolbox.la \
77         $(top_builddir)/src/vm/libvm.la \
78         $(top_builddir)/src/vmcore/libvmcore.la \
79         $(GC_LIB)
80
81 bin_PROGRAMS = \
82         cacao
83
84 cacao_SOURCES = \
85         cacao.c
86
87 cacao_LDADD = \
88         $(CACAO_LIBS)
89
90 cacao_DEPENDENCIES = \
91         $(cacao_LDADD)
92
93
94 if WITH_JAVA_RUNTIME_LIBRARY_OPENJDK
95 install-data-local:
96         $(mkdir_p) $(prefix)/jre/lib/$(JAVA_ARCH)/server
97         $(LN_S) -f $(libdir)/libjvm.so $(prefix)/jre/lib/$(JAVA_ARCH)/server
98         $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
99         $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
100
101 uninstall-local:
102         rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjvm.so
103         rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
104         rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
105 endif
106
107
108 ## Local variables:
109 ## mode: Makefile
110 ## indent-tabs-mode: t
111 ## c-basic-offset: 4
112 ## tab-width: 8
113 ## compile-command: "automake --add-missing"
114 ## End: