Refactor liblttng-ust-jul in liblttng-ust-agent
[lttng-ust.git] / doc / examples / java-log4j / Makefile
1 #
2 # Copyright (C) 2014 - Christian Babeux <christian.babeux@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 JFLAGS = -g
20
21 # Default JUL jar name.
22 JARFILE=liblttng-ust-agent.jar
23 LOG4J=/usr/share/java/log4j.jar
24
25 # Check if the top level makefile overrides the JUL Jar file name.
26 ifneq "$(JAVA_JARFILE_OVERRIDE)" ""
27 JARFILE=$(JAVA_JARFILE_OVERRIDE)
28 endif
29
30 # Check if the top level makefile overrides the JUL classpath.
31 ifeq "$(JAVA_CLASSPATH_OVERRIDE)" ""
32 CLASSPATH=/usr/local/share/java/$(JARFILE):/usr/share/java/$(JARFILE):$(LOG4J)
33 else
34 CLASSPATH=$(JAVA_CLASSPATH_OVERRIDE)/$(JARFILE):$(LOG4J)
35 endif
36
37 JC = javac -cp "$(CLASSPATH):."
38 .SUFFIXES: .java .class
39 .java.class:
40 $(JC) $(JFLAGS) $*.java
41
42 CLASSES = Hello.java
43
44 all: classes
45
46 classes: $(CLASSES:.java=.class)
47
48 .PHONY: clean
49 clean:
50 $(RM) *.class
This page took 0.030254 seconds and 4 git commands to generate.