File: Makefile.am

package info (click to toggle)
zabbix 1%3A4.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 83,104 kB
  • sloc: php: 162,280; ansic: 154,778; sql: 96,479; sh: 5,281; makefile: 1,340; java: 1,068; cpp: 227; perl: 41; xml: 29
file content (45 lines) | stat: -rw-r--r-- 1,323 bytes parent folder | download | duplicates (3)
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 = zabbix-java-gateway.jar
LIB = /usr/share/java/com.android.json.jar:/usr/share/java/logback-core.jar:/usr/share/java/logback-classic.jar:/usr/share/java/slf4j-api.jar
JUNIT = /usr/share/java/junit4.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/*