d45f492c3530881a2e7fb0a2b8bdbc4937ece055
[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
28 if WITH_CLASSPATH_GNU
29 JAVAFLAGS = -Xbootclasspath:$(top_builddir)/src/lib/classes:$(CLASSPATH_CLASSES)
30 JAVAHFLAGS = -bootclasspath $(top_builddir)/src/lib/classes:$(CLASSPATH_CLASSES)
31 else
32 JAVAFLAGS = -Xbootclasspath:$(CLASSPATH_CLASSES)
33 JAVAHFLAGS = -bootclasspath $(CLASSPATH_CLASSES)
34 endif
35
36 JAVAH     = $(CACAOH)
37
38 SOURCE_FILES = \
39         checkjni.java \
40         testarguments.java
41
42 EXTRA_DIST = \
43         $(SOURCE_FILES) \
44         checkjni.c \
45         testarguments.c \
46         \
47         checkjni.output \
48         testarguments.output
49
50 CLEANFILES = \
51         *.class \
52         *.h \
53         *.so \
54         *.thisoutput \
55         *.this2output
56
57 NOTESTNAMES = \
58         test
59
60 TESTNAMES = \
61         checkjni \
62         testarguments
63
64 check: $(TESTNAMES)
65
66 $(TESTNAMES) $(NOTESTNAMES):
67         @$(JAVAC) -nowarn -d . $(srcdir)/$@.java
68         @$(JAVAH) $(JAVAHFLAGS) $@
69         @$(CC) -shared $(AM_CPPFLAGS) $(CFLAGS) $(srcdir)/$@.c -o lib$@.so -fPIC
70         @LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs:. $(SHELL) $(srcdir)/../Test.sh "$(JAVA) $(JAVAFLAGS)" $@ $(srcdir)
71
72
73 ## Local variables:
74 ## mode: Makefile
75 ## indent-tabs-mode: t
76 ## c-basic-offset: 4
77 ## tab-width: 8
78 ## compile-command: "automake --add-missing"
79 ## End: