1ACLOCAL_AMFLAGS = -I m4
2
3classdir=classes
4VPATH += $(classdir)
5
6lib_LTLIBRARIES = libjrrd.la
7libjrrd_la_SOURCES = rrd_jinterface.c
8libjrrd_la_LDFLAGS = -module -avoid-version $(JAVA_SHREXT_COMMAND)
9
10MAINTAINERCLEANFILES = aclocal.m4 config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing config.h.in *~ *.tar.gz
11CLEANFILES = org_opennms_netmgt_rrd_rrdtool_Interface.h jrrd.jar
12
13clean-local:
14	-rm -rf $(classdir)
15
16.java.class:
17	-mkdir -p $(classdir)
18	$(JAVAC) $(JAVACFLAGS) -d $(classdir) $<
19
20rrd_jinterface.c: org_opennms_netmgt_rrd_rrdtool_Interface.h
21
22org_opennms_netmgt_rrd_rrdtool_Interface.h: org/opennms/netmgt/rrd/rrdtool/Interface.class
23	$(JAVAH) -classpath $(classdir) org.opennms.netmgt.rrd.rrdtool.Interface
24
25jrrd.jar: org/opennms/netmgt/rrd/rrdtool/Interface.class pom.xml
26	cd $(classdir) && \
27	$(JAR) cvf ../$@ *
28
29jardir=$(datadir)/java
30jar_DATA = jrrd.jar
31
32deploy:
33	mvn deploy:deploy-file
34
35.PHONY: deploy rpm srpm
36
37EXTRA_DIST = org/opennms/netmgt/rrd/rrdtool/Interface.java \
38	m4/* \
39	debian/changelog \
40	debian/compat \
41	debian/control \
42	debian/copyright \
43	debian/dirs \
44	debian/getjava \
45	debian/rules \
46	pom.xml
47
48if MAKE_RPMS
49rpm: @RPM_TARGET@
50
51srpm: @SRPM_TARGET@
52
53EXTRA_DIST += jrrd.spec
54
55$(RPM_TARGET): $(DISTFILES)
56	${MAKE} dist
57	-mkdir -p $(SRPM_DIR)
58	-mkdir -p `dirname $(RPM_TARGET)`
59	$(RPMBUILD_PROG) --define 'version $(VERSION)' --define 'rel $(RELEASE)' $(RPM_ARGS) $(RPM_TARBALL)
60	@echo "$(RPM_TARGET) created"
61
62$(SRPM_TARGET): $(DISTFILES)
63	${MAKE} dist
64	-mkdir -p $(SRPM_DIR)
65	$(RPMBUILD_PROG) --define 'version $(VERSION)' --define 'rel $(RELEASE)' $(SRPM_ARGS) $(RPM_TARBALL)
66	@echo "$(SRPM_TARGET) created"
67endif
68