X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=doc%2Fexamples%2Fjava-jul%2FMakefile;h=aff2f8e8a975f77daff8f6da1a51f0474d2c7239;hb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;hp=1431b60bf716c56c7fd8e4d1e2db808891fd28ed;hpb=631dc14c99a187453b9c46aca090fcf3b7ed8ec9;p=lttng-ust.git diff --git a/doc/examples/java-jul/Makefile b/doc/examples/java-jul/Makefile index 1431b60b..aff2f8e8 100644 --- a/doc/examples/java-jul/Makefile +++ b/doc/examples/java-jul/Makefile @@ -1,14 +1,6 @@ -# -# Copyright (C) 2013 - David Goulet +# SPDX-License-Identifier: MIT # -# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR -# IMPLIED. ANY USE IS AT YOUR OWN RISK. -# -# Permission is hereby granted to use or copy this program for any purpose, -# provided the above notices are retained on all copies. Permission to modify -# the code and to distribute modified code is granted, provided the above -# notices are retained, and a notice that the code was modified is included -# with the above copyright notice. +# Copyright (C) 2013 David Goulet # # This Makefile is not using automake so that users may see how to build a # program with tracepoint provider probes as stand-alone shared objects. @@ -16,28 +8,31 @@ # This makefile is purposefully kept simple to support GNU and BSD make. # -# Default JUL jar name. -JARFILE=liblttng-ust-agent.jar +# Required JAR files for JUL +JARFILE_JUL=lttng-ust-agent-jul.jar +JARFILE_COMMON=lttng-ust-agent-common.jar -# Check if the top level makefile overrides the JUL Jar file name. -ifneq "$(JAVA_JARFILE_OVERRIDE)" "" - JARFILE=$(JAVA_JARFILE_OVERRIDE) +# Check if the top level makefile overrides the JUL Jar file's path. +ifeq "$(JAVA_CLASSPATH_OVERRIDE_JUL)" "" + JUL_CP = /usr/local/share/java/$(JARFILE_JUL):/usr/share/java/$(JARFILE_JUL) +else + JUL_CP = $(JAVA_CLASSPATH_OVERRIDE_JUL)/$(JARFILE_JUL) endif -# Check if the top level makefile overrides the JUL classpath. -ifeq "$(JAVA_CLASSPATH_OVERRIDE)" "" - CLASSPATH=/usr/local/share/java/$(JARFILE):/usr/share/java/$(JARFILE) +# Check if the top level makefile overrides the Common Jar file's path. +ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" "" + COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON) else - CLASSPATH=$(JAVA_CLASSPATH_OVERRIDE)/$(JARFILE) + COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON) endif JFLAGS = -g -JC = javac -classpath "$(CLASSPATH):." +JC = javac -classpath "$(CLASSPATH):$(JUL_CP):$(COMMON_CP):." .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $*.java -CLASSES = Hello.java +CLASSES = Hello.java FilterChangeListenerExample.java ApplicationContextExample.java all: classes