5a594ff3e2f200ef3d62f5cfa25d2c78fa5826e2
[lttng-ust.git] / doc / examples / java-jul / Makefile
1 #
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
19 # Required JAR files for JUL
20 JARFILE_JUL=lttng-ust-agent-jul.jar
21 JARFILE_COMMON=lttng-ust-agent-common.jar
22
23 # Check if the top level makefile overrides the JUL Jar file's path.
24 ifeq "$(JAVA_CLASSPATH_OVERRIDE_JUL)" ""
25 JUL_CP = /usr/local/share/java/$(JARFILE_JUL):/usr/share/java/$(JARFILE_JUL)
26 else
27 JUL_CP = $(JAVA_CLASSPATH_OVERRIDE_JUL)/$(JARFILE_JUL)
28 endif
29
30 # Check if the top level makefile overrides the Common Jar file's path.
31 ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" ""
32 COMMON_CP = /usr/local/share/java/$(JARFILE_COMMON):/usr/share/java/$(JARFILE_COMMON)
33 else
34 COMMON_CP = $(JAVA_CLASSPATH_OVERRIDE_COMMON)/$(JARFILE_COMMON)
35 endif
36
37 JFLAGS = -g
38 JC = javac -classpath "$(CLASSPATH):$(JUL_CP):$(COMMON_CP):."
39 .SUFFIXES: .java .class
40 .java.class:
41 $(JC) $(JFLAGS) $*.java
42
43 CLASSES = Hello.java FilterChangeListenerExample.java ApplicationContextExample.java
44
45 all: classes
46
47 classes: $(CLASSES:.java=.class)
48
49 .PHONY: clean
50 clean:
51 $(RM) *.class
This page took 0.028408 seconds and 3 git commands to generate.