Move all sources to 'src/'
[lttng-ust.git] / src / liblttng-ust-java / Makefile.am
1 # SPDX-License-Identifier: LGPL-2.1-only
2
3 JAVAROOT = .
4 jarfile = liblttng-ust-java.jar
5 jardir = $(datadir)/java
6 pkgpath = org/lttng/ust
7
8 dist_noinst_JAVA = $(pkgpath)/LTTngUst.java
9 jar_DATA = $(jarfile)
10 BUILT_SOURCES = org_lttng_ust_LTTngUst.h
11
12 AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS)
13 lib_LTLIBRARIES = liblttng-ust-java.la
14 liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
15 nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
16
17 liblttng_ust_java_la_LIBADD = -lc \
18 $(top_builddir)/src/liblttng-ust/liblttng-ust.la
19
20 $(jarfile): classnoinst.stamp
21 $(JAR) cf $(JARFLAGS) $@ $(pkgpath)/*.class
22
23 if !HAVE_JAVAH
24 # If we don't have javah, assume we are running openjdk >= 10 and use javac
25 # to generate the jni header file.
26 AM_JAVACFLAGS = -h .
27
28 org_lttng_ust_LTTngUst.h: $(jarfile)
29 else
30 org_lttng_ust_LTTngUst.h: jni-header.stamp
31
32 jni-header.stamp: $(dist_noinst_JAVA)
33 $(JAVAH) -classpath $(srcdir) $(JAVAHFLAGS) org.lttng.ust.LTTngUst && \
34 echo "JNI header generated" > jni-header.stamp
35 endif
36
37 all-local: org_lttng_ust_LTTngUst.h
38
39 EXTRA_DIST = README
40
41 CLEANFILES = $(jarfile) $(pkgpath)/*.class jni-header.stamp org_lttng_ust_LTTngUst.h
This page took 0.030519 seconds and 4 git commands to generate.