Commit | Line | Data |
---|---|---|
c0c0989a | 1 | # SPDX-License-Identifier: MIT |
a60af3a5 | 2 | # |
c0c0989a | 3 | # Copyright (C) 2013 David Goulet <dgoulet@efficios.com> |
849202d4 DG |
4 | # |
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. | |
7 | # | |
8 | # This makefile is purposefully kept simple to support GNU and BSD make. | |
9 | # | |
10 | ||
8e57e02f AM |
11 | # Required JAR files for JUL |
12 | JARFILE_JUL=lttng-ust-agent-jul.jar | |
13 | JARFILE_COMMON=lttng-ust-agent-common.jar | |
849202d4 | 14 | |
8e57e02f AM |
15 | # Check if the top level makefile overrides the JUL Jar file's path. |
16 | ifeq "$(JAVA_CLASSPATH_OVERRIDE_JUL)" "" | |
9f1d7029 | 17 | JUL_CP = /usr/local/share/java/$(JARFILE_JUL):/usr/share/java/$(JARFILE_JUL) |
8e57e02f | 18 | else |
9f1d7029 | 19 | JUL_CP = $(JAVA_CLASSPATH_OVERRIDE_JUL)/$(JARFILE_JUL) |
849202d4 DG |
20 | endif |
21 | ||
8e57e02f AM |
22 | # Check if the top level makefile overrides the Common Jar file's path. |
23 | ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" "" | |
9f1d7029 | 24 | COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON) |
849202d4 | 25 | else |
9f1d7029 | 26 | COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON) |
849202d4 DG |
27 | endif |
28 | ||
29 | JFLAGS = -g | |
9f1d7029 | 30 | JC = javac -classpath "$(CLASSPATH):$(JUL_CP):$(COMMON_CP):." |
849202d4 DG |
31 | .SUFFIXES: .java .class |
32 | .java.class: | |
33 | $(JC) $(JFLAGS) $*.java | |
34 | ||
8ab5c06b | 35 | CLASSES = Hello.java FilterChangeListenerExample.java ApplicationContextExample.java |
849202d4 DG |
36 | |
37 | all: classes | |
38 | ||
39 | classes: $(CLASSES:.java=.class) | |
40 | ||
41 | .PHONY: clean | |
42 | clean: | |
f99a29ba | 43 | $(RM) $(CLASSES:.java=*.class) |