projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor Java agent to let applications manage the log handlers
[lttng-ust.git]
/
liblttng-ust-java
/
Makefile.am
diff --git
a/liblttng-ust-java/Makefile.am
b/liblttng-ust-java/Makefile.am
index e52bf0e2a27937b9c5bf5ab6c28a696790d4c740..baada571bf8d75ae3219fd362a62fef7e48e9b8b 100644
(file)
--- a/
liblttng-ust-java/Makefile.am
+++ b/
liblttng-ust-java/Makefile.am
@@
-1,38
+1,28
@@
-if BUILD_JNI_INTERFACE
+JAVAROOT = .
+jarfile = liblttng-ust-java.jar
+jardir = $(datadir)/java
+pkgpath = org/lttng/ust
-AM_CPPFLAGS = -I$(top_srcdir)/include
+dist_noinst_JAVA = $(pkgpath)/LTTngUst.java
+jar_DATA = $(jarfile)
+BUILT_SOURCES = org_lttng_ust_LTTngUst.h
+AM_CPPFLAGS = -I$(top_srcdir)/include
lib_LTLIBRARIES = liblttng-ust-java.la
liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
lib_LTLIBRARIES = liblttng-ust-java.la
liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
-dist_noinst_DATA = $(LTTNG_JUST_SRCDIR)/LTTngUst.java
-liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust
-
-LTTNG_JUST_SRCDIR = $(srcdir)/org/lttng/ust
-LTTNG_JUST_DESTDIR = $(builddir)/org/lttng/ust
-if HAVE_JAVA_JDK
-JCC=$(JAVA_JDK)/bin
-else
-JCC=javac
-endif
-
-all: $(LTTNG_JUST_DESTDIR)/LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar
-
-clean-local:
- rm -f org_lttng_ust_LTTngUst.h
- rm -f liblttng-ust-java.jar
- rm -rf org/lttng/ust/*.class
+liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust
-LTTngUst.c: org_lttng_ust_LTTngUst.h
+$(jarfile): classnoinst.stamp
+ $(JAR) cf $(JARFLAGS) $@ $(pkgpath)/*.class
-$(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_DESTDIR)/LTTngUst.java
- $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_DESTDIR)/LTTngUst.java"
+org_lttng_ust_LTTngUst.h: jni-header.stamp
-org_lttng_ust_LTTngUst.h: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
- $(JCC)/javah org.lttng.ust.LTTngUst
+jni-header.stamp: $(dist_noinst_JAVA)
+ $(JAVAH) -classpath $(srcdir) $(JAVAHFLAGS) org.lttng.ust.LTTngUst && \
+ echo "JNI header generated" > jni-header.stamp
-liblttng-ust-java.jar: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
- $(JCC)/jar cf liblttng-ust-java.jar $(LTTNG_JUST_DESTDIR)/*.class
+all-local: org_lttng_ust_LTTngUst.h
-endif
+CLEANFILES = $(jarfile) $(pkgpath)/*.class jni-header.stamp org_lttng_ust_LTTngUst.h
This page took
0.023509 seconds
and
4
git commands to generate.