1 # SPDX-License-Identifier: MIT
3 # Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
5 # This Makefile is not using automake so that users may see how to build a
6 # program with tracepoint provider probes as stand-alone shared objects.
8 # This makefile is purposefully kept simple to support GNU and BSD make.
11 # Required JAR files for JUL
12 JARFILE_JUL
=lttng-ust-agent-jul.jar
13 JARFILE_COMMON
=lttng-ust-agent-common.jar
15 # Check if the top level makefile overrides the JUL Jar file's path.
16 ifeq "$(JAVA_CLASSPATH_OVERRIDE_JUL)" ""
17 JUL_CP
= /usr
/local
/share
/java
/$(JARFILE_JUL
):/usr
/share
/java
/$(JARFILE_JUL
)
19 JUL_CP
= $(JAVA_CLASSPATH_OVERRIDE_JUL
)/$(JARFILE_JUL
)
22 # Check if the top level makefile overrides the Common Jar file's path.
23 ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" ""
24 COMMON_CP
= /usr
/local
/share
/java
/$(JARFILE_COMMON
):/usr
/share
/java
/$(JARFILE_COMMON
)
26 COMMON_CP
= $(JAVA_CLASSPATH_OVERRIDE_COMMON
)/$(JARFILE_COMMON
)
30 JC
= javac
-classpath
"$(CLASSPATH):$(JUL_CP):$(COMMON_CP):."
31 .SUFFIXES
: .java .class
33 $(JC
) $(JFLAGS
) $*.java
35 CLASSES
= Hello.java FilterChangeListenerExample.java ApplicationContextExample.java
39 classes
: $(CLASSES
:.java
=.class
)