Add a Log4j 2.x Java agent
[deliverable/lttng-ust.git] / doc / examples / java-jul / Makefile
CommitLineData
e5ea8cce 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)" ""
72e6e036 25 JUL_CP = /usr/local/share/java/$(JARFILE_JUL):/usr/share/java/$(JARFILE_JUL)
8e57e02f 26else
72e6e036 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)" ""
72e6e036 32 COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON)
849202d4 33else
72e6e036 34 COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON)
849202d4
DG
35endif
36
37JFLAGS = -g
72e6e036 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:
6e8e8cb8 51 $(RM) $(CLASSES:.java=.class)
This page took 0.032311 seconds and 5 git commands to generate.