# $Progeny$

all: ${srcdir}/discover-modprobe ${srcdir}/init

###############################################################################
# Clean

clean_FILES=		#none
distclean_FILES=	Makefile

clean:

distclean:
	rm -rf ${clean_FILES} ${distclean_FILES}

maintainer-clean:
	rm -rf ${clean_FILES} ${distclean_FILES}

###############################################################################
# Installation

install: ${srcdir}/discover-modprobe ${srcdir}/discover-pkginstall install-init
	${INSTALL_DIR} ${DESTDIR}${sbindir}
	${INSTALL_SCRIPT} ${srcdir}/discover-modprobe \
		${DESTDIR}${sbindir}/discover-modprobe
	${INSTALL_SCRIPT} ${srcdir}/discover-pkginstall \
		${DESTDIR}${sbindir}/discover-pkginstall

install-init: ${srcdir}/init
	${INSTALL_DIR} ${DESTDIR}${datadir}/discover
	${INSTALL_SCRIPT} ${srcdir}/init ${DESTDIR}${datadir}/discover/init-discover

uninstall: # uninstall-init
	rm -f ${DESTDIR}${sbindir}/discover-modprobe
	rm -f ${DESTDIR}${sbindir}/discover-pkginstall
uninstall-init:
	rm -f ${DESTDIR}${sysconfdir}/init.d/discover

###############################################################################
# Distribution

DISTFILES=		Makefile.in discover-modprobe init discover-pkginstall

distdir: ${DISTFILES}
	${top_srcdir}/buildtools/distdir ${distdir}/${_THISDIR_} ${DISTFILES}
