From 378fa1c78cea8fb56bf759fe3110bbdb1422fac7 Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Fri, 25 Sep 2009 11:55:48 -0400 Subject: [PATCH] Add ust java bindings This first version is less efficient than the native ust. Moreover, all java events share the same native event name. --- configure.ac | 1 + java/Makefile.am | 15 +++++++++++++++ java/UST.java | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 java/Makefile.am create mode 100644 java/UST.java diff --git a/configure.ac b/configure.ac index 88266f5..9137366 100644 --- a/configure.ac +++ b/configure.ac @@ -88,5 +88,6 @@ AC_CONFIG_FILES([ libinterfork/Makefile ustd/Makefile ust/Makefile + java/Makefile ]) AC_OUTPUT diff --git a/java/Makefile.am b/java/Makefile.am new file mode 100644 index 0000000..e818b81 --- /dev/null +++ b/java/Makefile.am @@ -0,0 +1,15 @@ +INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust $(KCOMPAT_CFLAGS) $(URCU_CFLAGS) + +lib_LTLIBRARIES = libustjava.la +libustjava_la_SOURCES = UST.c UST.h +noinst_DATA = UST.java +libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust + +all: UST.class + +clean-local: + rm -rf UST.h UST.class + +UST.class: UST.java + javac UST.java + diff --git a/java/UST.java b/java/UST.java new file mode 100644 index 0000000..be5f7c7 --- /dev/null +++ b/java/UST.java @@ -0,0 +1,9 @@ +import java.util.*; + +class UST { + public static native void ust_java_event(String name, String arg); + static { + System.loadLibrary("ustjava"); + } +} + -- 2.34.1