2 # Copyright (C) 2014 - Christian Babeux <christian.babeux@efficios.com>
4 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR
5 # IMPLIED. ANY USE IS AT YOUR OWN RISK.
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.
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.
16 # This makefile is purposefully kept simple to support GNU and BSD make.
19 # Required JAR files for Log4j
20 JARFILE_LOG4J
=lttng-ust-agent-log4j.jar
21 JARFILE_COMMON
=lttng-ust-agent-common.jar
23 # If system classpath is empty, try to guess log4j location
24 ifeq "$(CLASSPATH)" ""
25 CLASSPATH
="/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar"
28 # Check if the top level makefile overrides the Log4j Jar file's path.
29 ifeq "$(JAVA_CLASSPATH_OVERRIDE_LOG4J)" ""
30 CLASSPATH
:=$(CLASSPATH
):/usr
/local
/share
/java
/$(JARFILE_LOG4J
):/usr
/share
/java
/$(JARFILE_LOG4J
)
32 CLASSPATH
:=$(CLASSPATH
):$(JAVA_CLASSPATH_OVERRIDE_LOG4J
)/$(JARFILE_LOG4J
)
35 # Check if the top level makefile overrides the Common Jar file's path.
36 ifeq "$(JAVA_CLASSPATH_OVERRIDE_COMMON)" ""
37 CLASSPATH
:=$(CLASSPATH
):/usr
/local
/share
/java
/$(JARFILE_COMMON
):/usr
/share
/java
/$(JARFILE_COMMON
)
39 CLASSPATH
:=$(CLASSPATH
):$(JAVA_CLASSPATH_OVERRIDE_COMMON
)/$(JARFILE_COMMON
)
43 JC
= javac
-classpath
"$(CLASSPATH):."
44 .SUFFIXES
: .java .class
46 $(JC
) $(JFLAGS
) $*.java
52 classes
: $(CLASSES
:.java
=.class
)