blob: 078993802deff393e91abe216d02c69ec52f26c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
AM_CPPFLAGS = -I$(abs_top_builddir)
JAVASRC = $(top_srcdir)/lang/java
JAVADEST = src/com/wiredtiger/db
JAVADESTFULL = $(JAVASRC)/$(JAVADEST)
JAVAEXAMPLES = $(top_srcdir)/examples/java/com/wiredtiger/examples
JAVATEST = $(top_srcdir)/test/java/com/wiredtiger/test
BUILT_SOURCES = $(JAVASRC)/wiredtiger_wrap.c
SWIG_SOURCES = $(JAVASRC)/wiredtiger.i
JDOCDIR = $(top_srcdir)/docs/java
java_DATA = $(JDOCDIR)/index.html
javadir = $(datadir)/java
JAVA_SRC = \
$(JAVADESTFULL)/Connection.java \
$(JAVADESTFULL)/Cursor.java \
$(JAVADESTFULL)/SearchStatus.java \
$(JAVADESTFULL)/PackFormatInputStream.java \
$(JAVADESTFULL)/PackInputStream.java \
$(JAVADESTFULL)/PackOutputStream.java \
$(JAVADESTFULL)/PackUtil.java \
$(JAVADESTFULL)/Session.java \
$(JAVADESTFULL)/WiredTigerException.java \
$(JAVADESTFULL)/WiredTigerPackingException.java \
$(JAVADESTFULL)/wiredtiger.java \
$(JAVADESTFULL)/wiredtigerConstants.java \
$(JAVADESTFULL)/wiredtigerJNI.java \
$(JAVAEXAMPLES)/ex_access.java
JAVA_JUNIT = \
$(JAVATEST)/CursorTest.java \
$(JAVATEST)/PackTest.java \
$(JAVATEST)/WiredTigerSuite.java
dist_java_JAVA = $(JAVA_SRC) @JAVA_JUNIT@
EXTRA_JAVA = $(JAVA_JUNIT)
java_LTLIBRARIES = libwiredtiger_java.la
TESTS_JUNIT = AllJunitTests
TESTS = @TESTS_JUNIT@
AllJunitTests:
echo "#! /bin/sh" > $@
echo 'SCRIPT_DIR=`dirname $$0`' >> $@
echo 'env LD_LIBRARY_PATH=$$SCRIPT_DIR/../../.libs DYLD_LIBRARY_PATH=$$SCRIPT_DIR/../../.libs JAVA_LIBRARY_PATH=$$SCRIPT_DIR/.libs @JUNIT@ com.wiredtiger.test.WiredTigerSuite' >> $@
chmod +x $@
mkdir -p WT_HOME
CPPFLAGS += $(JNI_CPPFLAGS)
# Some warnings when compiling the generated code are unavoidable
CFLAGS += -w
libwiredtiger_java_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES)
#libwiredtiger_java_la_LDFLAGS = -module
libwiredtiger_java_la_LIBADD = $(abs_top_builddir)/libwiredtiger.la
all-local: wiredtiger.jar
$(JAVASRC)/wiredtiger_wrap.c: $(top_srcdir)/src/include/wiredtiger.in $(SWIG_SOURCES)
(cd $(JAVASRC) && \
$(SWIG) -Wall -v -java -nodefaultctor -nodefaultdtor -package com.wiredtiger.db -I$(abs_top_builddir) -outdir $(JAVADEST) -o wiredtiger_wrap.c wiredtiger.i)
$(JDOCDIR)/index.html: $(dist_java_JAVA)
mkdir -p $(JDOCDIR)
javadoc -public -d $(JDOCDIR) -link http://docs.oracle.com/javase/6/docs/api $(JAVADESTFULL)/wiredtiger.java $(JAVADESTFULL)/wiredtigerConstants.java $(JAVADESTFULL)/[A-Z]*.java
wiredtiger.jar: $(dist_java_JAVA) classjava.stamp
(cd $(top_builddir) && \
$(JAR) -cf wiredtiger.jar com/)
|