Makefile.am 3.15 KB
Newer Older
1 2
# mtheo

3 4
SUBDIRS = lib src
dist_doc_DATA = BUGS HISTORY README earthworm seiscomp_templates makefile.sol makefile.ux doc/html doc/man
5 6 7 8 9 10 11 12 13

EWMAKEFILESOL=earthworm/makefile.ux.nognu
EWMAKEFILEUX=earthworm/makefile.ux.nognu

dist-hook:
	ln -f -s ${EWMAKEFILESOL} makefile.sol
	ln -f -s ${EWMAKEFILEUX} makefile.ux
	rm -rf `find $(distdir)/earthworm -name CVS`
	rm -rf `find $(distdir)/seiscomp_templates -name CVS`
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
binary_dist_FILES= \
	AUTHORS \
        BUGS \
        COPYING \
        HISTORY  \
        INSTALL \
        README  \
        README_DISTBIN \
        bin/nmxptool${EXEEXT} \
        earthworm/nmxptool.d \
        earthworm/nmxptool.desc \
	earthworm/nmxptool_cmd.html \
	earthworm/nmxptool_ovr.html \
        seiscomp_templates

binary_dist_name_suffix=${BINARY_DIST_NAME_SUFFIX}
binary_dist_name=${distdir}-bin-${binary_dist_name_suffix}

dist-bin:
	echo ${binary_dist_name}
	uname -a > README_DISTBIN
	rm -fr bin && mkdir bin && cp src/nmxptool${EXEEXT} bin/
Matteo Quintiliani's avatar
Matteo Quintiliani committed
37 38 39 40 41
	rm -fr ${binary_dist_name}
	mkdir ${binary_dist_name}
	${AMTAR} -cf - --exclude "CVS" ${binary_dist_FILES}  | ${AMTAR} xpf - -C ${binary_dist_name}
	${AMTAR} chvf - ${binary_dist_name} |  GZIP=$(GZIP_ENV) gzip -c > ${binary_dist_name}.tar.gz
	rm -fr ${binary_dist_name}
42
#
43 44 45 46
# http://www.gnu.org/software/automake/manual/html_node/Extending.html#Extending
clean-local:
	@echo "example of clean-local"

47 48
NMXPTOOLBINNAME=nmxptool${EXEEXT}
NMXPTOOLBINSRC=src/${NMXPTOOLBINNAME}
49 50

DIRBINEW=${EW_HOME}/${EW_VERSION}/bin
51
NMXPTOOLBINEW=${DIRBINEW}/${NMXPTOOLBINNAME}
52 53 54

SEISCOMPDIRTEMPLATES=${SEISCOMPDIR}/acquisition/templates/source
DIRBINSEISCOMP=${SEISCOMPDIR}/acquisition/bin
55
NMXPTOOLBINSEISCOMP=${DIRBINSEISCOMP}/${NMXPTOOLBINNAME}
56

Matteo Quintiliani's avatar
Matteo Quintiliani committed
57
if WITHEW
58 59 60 61 62 63 64 65
install-ew-bin: ${NMXPTOOLBINSRC}
	test -d "${DIRBINEW}"
	${INSTALL_PROGRAM} '${NMXPTOOLBINSRC}' '${NMXPTOOLBINEW}'

install-ew-conf:
	test -d "${EW_PARAMS}"
	${INSTALL_DATA} 'earthworm/nmxptool.d' '${EW_PARAMS}/nmxptool.d'
	${INSTALL_DATA} 'earthworm/nmxptool.desc' '${EW_PARAMS}/nmxptool.desc'
66 67 68

uninstall-ew-bin:
	rm -f ${NMXPTOOLBINEW}
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
endif

if WITHSEEDLINK
install-seiscomp-bin: ${NMXPTOOLBINSRC}
	test -d "${DIRBINSEISCOMP}"
	${INSTALL_PROGRAM} '${NMXPTOOLBINSRC}' '${NMXPTOOLBINSEISCOMP}'

install-seiscomp-templates:
	test -d "${SEISCOMPDIRTEMPLATES}" 
	test -d "${SEISCOMPDIRTEMPLATES}/135_nmxptool"  || ./install-sh -c -d '${SEISCOMPDIRTEMPLATES}/135_nmxptool'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/chain_digiserv_station.tpl' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/chain_digiserv_station.tpl'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/chain_digiserv_station_trig.tpl' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/chain_digiserv_station_trig.tpl'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/key' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/key'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/plugins.ini.tpl' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/plugins.ini.tpl'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/seedlink_plugin.tpl' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/seedlink_plugin.tpl'
	${INSTALL_DATA} 'seiscomp_templates/135_nmxptool/seedlink_station.tpl' '${SEISCOMPDIRTEMPLATES}/135_nmxptool/seedlink_station.tpl'
85 86 87

uninstall-seiscomp-bin:
	rm -f ${NMXPTOOLBINSEISCOMP}
88 89
endif