Fix: out of tree build for lib Java and JUL
[lttng-ust.git] / liblttng-ust-java / Makefile.am
1 LTTNG_JUST_SRCDIR = $(srcdir)/org/lttng/ust
2 LTTNG_JUST_DESTDIR = $(builddir)/org/lttng/ust
3
4 if BUILD_JNI_INTERFACE
5
6 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(builddir) -I$(top_builddir)/include
7
8 BUILT_SOURCES = org_lttng_ust_LTTngUst.h
9 lib_LTLIBRARIES = liblttng-ust-java.la
10 liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
11 nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
12 dist_noinst_DATA = $(LTTNG_JUST_SRCDIR)/LTTngUst.java
13 liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust
14
15 if HAVE_JAVA_JDK
16 JCC=$(JAVA_JDK)/bin
17 else
18 JCC=javac
19 endif
20
21 all: $(LTTNG_JUST_DESTDIR)/LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar
22
23 clean-local:
24 rm -f org_lttng_ust_LTTngUst.h
25 rm -f liblttng-ust-java.jar
26 rm -rf org/lttng/ust/*.class
27
28 $(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_SRCDIR)/LTTngUst.java
29 $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_SRCDIR)/LTTngUst.java"
30
31 org_lttng_ust_LTTngUst.h: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
32 $(JCC)/javah org.lttng.ust.LTTngUst
33
34 liblttng-ust-java.jar: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
35 $(JCC)/jar cf liblttng-ust-java.jar $(LTTNG_JUST_DESTDIR)/*.class
36
37 endif
This page took 0.036215 seconds and 6 git commands to generate.