8a0d134dc1b15c2516cee04546917db0f56072f0
[cacao.git] / tests / regression / native / Makefile.am
1 ## src/tests/regression/native/Makefile.am
2 ##
3 ## Copyright (C) 1996-2005, 2006, 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) -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)
25
26 JAVA     = $(top_builddir)/src/cacao/cacao
27 JAVAH    = $(CACAOH)
28 JAVACMD  = $(JAVA) -Xbootclasspath:$(BOOTCLASSPATH)
29 JAVACCMD = $(JAVAC) -bootclasspath $(BOOTCLASSPATH)
30 JAVAHCMD = $(JAVAH) -bootclasspath $(BOOTCLASSPATH)
31
32 SOURCE_FILES = \
33         checkjni.java \
34         testarguments.java
35
36 EXTRA_DIST = \
37         $(SOURCE_FILES) \
38         checkjni.c \
39         testarguments.c \
40         \
41         checkjni.output \
42         testarguments.output
43
44 CLEANFILES = \
45         *.class \
46         *.h \
47         *.so \
48         *.thisoutput \
49         *.this2output
50
51 NOTESTNAMES = \
52         test
53
54 TESTNAMES = \
55         checkjni \
56         testarguments
57
58 check: $(TESTNAMES)
59
60 $(TESTNAMES) $(NOTESTNAMES):
61         @$(JAVACCMD) -d . $(srcdir)/$@.java
62         @$(JAVAHCMD) $@
63         @$(CC) -shared $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(srcdir)/$@.c -o lib$@.so -fPIC
64         @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs:. $(SHELL) $(srcdir)/../Test.sh "$(JAVACMD)" $@ $(srcdir)
65
66
67 ## Local variables:
68 ## mode: Makefile
69 ## indent-tabs-mode: t
70 ## c-basic-offset: 4
71 ## tab-width: 8
72 ## compile-command: "automake --add-missing"
73 ## End: