1 # libguestfs Java bindings
2 # Copyright (C) 2009 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 CPTH = com/redhat/et/libguestfs
21 $(CPTH)/LibGuestFSException.java \
22 $(CPTH)/IntBool.java \
27 $(CPTH)/StatVFS.java \
31 t/GuestFS005Load.java \
32 t/GuestFS010Launch.java
39 CLEANFILES = *~ doc-stamp
45 libguestfs_jardir = $(JAR_INSTALL_DIR)
46 libguestfs_jar_DATA = libguestfs-${VERSION}.jar
47 libguestfs_jar_class_files = $(java_sources:.java=.class)
48 $(libguestfs_jar_class_files): %.class: %.java
49 $(JAVAC) $(JAVAC_FLAGS) -classpath $(CPTH) $(java_sources)
51 libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files)
56 lib_LTLIBRARIES = libguestfs_jni.la
57 libguestfs_jni_la_SOURCES = \
58 com_redhat_et_libguestfs_GuestFS.h \
59 com_redhat_et_libguestfs_GuestFS.c
61 libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la
62 libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO)
63 libguestfs_jni_la_CFLAGS = -Wall -I$(top_builddir)/src $(JNI_CFLAGS)
65 BUILT_SOURCES = com_redhat_et_libguestfs_GuestFS.h
67 com_redhat_et_libguestfs_GuestFS.h: $(CPTH)/GuestFS.class
68 $(JAVAH) -classpath .:$(CPTH) com.redhat.et.libguestfs.GuestFS
72 noinst_SCRIPTS = doc-stamp
74 doc-stamp: $(java_sources)
75 $(JAVADOC) $(JAVADOC_FLAGS) -d api \
76 -sourcepath $(srcdir) \
77 -windowtitle "libguestfs java $(VERSION) API reference" \
78 -doctitle "libguestfs java $(VERSION) API reference" \
79 com.redhat.et.libguestfs
82 # Tests (not comprehensive).
84 TESTS = $(java_tests:.java=.class)
87 CLASSPATH=t:libguestfs-$(VERSION).jar \
88 LIBGUESTFS_PATH=$(abs_top_builddir) \
92 $(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<