fix: Java examples CLASSPATH override
[lttng-ust.git] / doc / examples / java-jul / Makefile
CommitLineData
a60af3a5 1#
849202d4
DG
2# Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
3#
4# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR
5# IMPLIED. ANY USE IS AT YOUR OWN RISK.
6#
7# Permission is hereby granted to use or copy this program for any purpose,
8# provided the above notices are retained on all copies. Permission to modify
9# the code and to distribute modified code is granted, provided the above
10# notices are retained, and a notice that the code was modified is included
11# with the above copyright notice.
12#
13# This Makefile is not using automake so that users may see how to build a
14# program with tracepoint provider probes as stand-alone shared objects.
15#
16# This makefile is purposefully kept simple to support GNU and BSD make.
17#
18
8e57e02f
AM
19# Required JAR files for JUL
20JARFILE_JUL=lttng-ust-agent-jul.jar
21JARFILE_COMMON=lttng-ust-agent-common.jar
849202d4 22
8e57e02f
AM
23# Check if the top level makefile overrides the JUL Jar file's path.
24ifeq "$(JAVA_CLASSPATH_OVERRIDE_JUL)" ""
9f1d7029 25 JUL_CP = /usr/local/share/java/$(JARFILE_JUL):/usr/share/java/$(JARFILE_JUL)
8e57e02f 26else
9f1d7029 27 JUL_CP = $(JAVA_CLASSPATH_OVERRIDE_JUL)/$(JARFILE_JUL)
849202d4
DG
28endif
29
8e57e02f
AM
30# Check if the top level makefile overrides the Common Jar file's path.
31ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" ""
9f1d7029 32 COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON)
849202d4 33else
9f1d7029 34 COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON)
849202d4
DG
35endif
36
37JFLAGS = -g
9f1d7029 38JC = javac -classpath "$(CLASSPATH):$(JUL_CP):$(COMMON_CP):."
849202d4
DG
39.SUFFIXES: .java .class
40.java.class:
41 $(JC) $(JFLAGS) $*.java
42
8ab5c06b 43CLASSES = Hello.java FilterChangeListenerExample.java ApplicationContextExample.java
849202d4
DG
44
45all: classes
46
47classes: $(CLASSES:.java=.class)
48
49.PHONY: clean
50clean:
51 $(RM) *.class
This page took 0.02685 seconds and 4 git commands to generate.