This repository was archived by the owner on Nov 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile.am
More file actions
45 lines (36 loc) · 1.28 KB
/
Makefile.am
File metadata and controls
45 lines (36 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## Process this file with automake to produce Makefile.in
EXTRA_DIST = \
bin \
lib \
src \
Makefile.am \
settings.sh \
shutdown.sh \
startup.sh
ZJG = bin/zabbix-java-gateway-$(VERSION).jar
LIB = lib/org-json-2010-12-28.jar:lib/logback-core-0.9.27.jar:lib/logback-classic-0.9.27.jar:lib/slf4j-api-1.6.1.jar
JUNIT = tests/junit-4.8.2.jar
ZJG_DEST = $(DESTDIR)$(sbindir)/zabbix_java
all: $(ZJG)
$(ZJG): class src/com/zabbix/gateway/*.java
$(JAVAC) -d class/src -classpath $(LIB) src/com/zabbix/gateway/*.java
$(JAR) cf $(ZJG) -C class/src .
test: class
$(JAVAC) -d class/tests -classpath class/src:$(JUNIT) tests/com/zabbix/gateway/*.java
java -classpath class/tests:$(LIB):$(ZJG):$(JUNIT) com.zabbix.gateway.AllTestRunner
class:
$(MKDIR_P) class/src
$(MKDIR_P) class/tests
install: all
$(MKDIR_P) "$(ZJG_DEST)/bin"
$(MKDIR_P) "$(ZJG_DEST)/lib"
cp startup.sh shutdown.sh "$(ZJG_DEST)"
if test ! -f "$(ZJG_DEST)/settings.sh"; then cp settings.sh "$(ZJG_DEST)"; fi
cp $(ZJG) "$(ZJG_DEST)/bin"
cp lib/*.jar "$(ZJG_DEST)/lib"
if test ! -f "$(ZJG_DEST)/lib/logback.xml"; then cp lib/logback.xml "$(ZJG_DEST)/lib"; fi
if test ! -f "$(ZJG_DEST)/lib/logback-console.xml"; then cp lib/logback-console.xml "$(ZJG_DEST)/lib"; fi
clean:
rm -f $(ZJG)
rm -rf class/src/*
rm -rf class/tests/*