d149d03ddec6fb29ede5457554859f775472808b
[cacao.git] / src / native / Makefile.am
1 ## src/native/Makefile.am
2 ##
3 ## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 ## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 ## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 ## J. Wenninger, Institut f. Computersprachen - TU Wien
7 ##
8 ## This file is part of CACAO.
9 ##
10 ## This program is free software; you can redistribute it and/or
11 ## modify it under the terms of the GNU General Public License as
12 ## published by the Free Software Foundation; either version 2, or (at
13 ## your option) any later version.
14 ##
15 ## This program is distributed in the hope that it will be useful, but
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ## General Public License for more details.
19 ##
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 ## 02110-1301, USA.
24 ##
25 ## $Id: Makefile.am 8297 2007-08-12 00:02:48Z michi $
26
27 ## Process this file with automake to produce Makefile.in
28
29 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
30
31 LIBS =
32
33 SUBDIRS = \
34         include \
35         vm
36
37 CLEANFILES = \
38         nativetable.inc
39
40 if ENABLE_JVMTI
41 SUBDIRS += jvmti
42 JVMTI_LIB = jvmti/libjvmti.la
43 endif
44
45 if WITH_STATIC_CLASSPATH
46 SUBDIRS += tools
47
48 GENNATIVETABLE=$(top_builddir)/src/native/tools/gennativetable
49
50 CLASSPATH = $(top_builddir)/src/lib/classes/:$(CLASSPATH_GLIBJ_ZIP)
51
52 $(srcdir)/native.c: nativetable.inc
53
54 nativetable.inc: $(CACAO_VM_ZIP) $(CLASSPATH_GLIBJ_ZIP) $(top_builddir)/src/native/tools/gennativetable
55         echo    $(GENNATIVETABLE) -bootclasspath $(CLASSPATH) > $(top_builddir)/src/native/nativetable.inc
56         if `$(GENNATIVETABLE) -bootclasspath $(CLASSPATH) > $(top_builddir)/src/native/nativetable.inc` ; then true; else rm -f $(top_builddir)/src/native/nativetable.inc; exit 1; fi
57 endif
58
59 noinst_LTLIBRARIES = libnative.la
60
61 if ENABLE_JNI
62 JNI_SOURCES = \
63         jni.c \
64         jni.h \
65         localref.c \
66         localref.h
67 endif
68
69 libnative_la_SOURCES = \
70         $(JNI_SOURCES) \
71         native.c \
72         native.h
73
74 libnative_la_LIBADD = \
75         vm/libnativevm.la \
76         $(JVMTI_LIB)
77
78
79 ## Local variables:
80 ## mode: Makefile
81 ## indent-tabs-mode: t
82 ## c-basic-offset: 4
83 ## tab-width: 8
84 ## compile-command: "automake --add-missing"
85 ## End: