# $Id: Makefile 840 2004-06-16 15:23:08Z gonzo $
HWMODULES=\
	  qozap\
	  wctdm24xxp\
	  wctdm\
	  wcte11xp\
	  wcte12xp\
	  wct1xxp
# oct612x zaphfc wcfxs wcfxo wct4xxp
USERLAND=\
	 tools
# ztcfg test
# HWMODULES+=tau32pci
# This is for testing purposes
# MODULES_OF_INTEREST=wcfxo wcfxs wct1xxp wcte11xp wct4xxp
MODULES_OF_INTEREST=wctdm24xxp

SUBDIR=		zaptel ztdummy ${HWMODULES} ${USERLAND}

distclean: clean cleandepend

afterinstall:
	${MAKE} -C ${.CURDIR}/zaptel install_userland

load:
	${MAKE} -C ${.CURDIR}/zaptel load
.for entry in ${MODULES_OF_INTEREST}
.if exists(${entry})
	${MAKE} -C ${.CURDIR}/${entry} load
.endif
.endfor

unload:
.for entry in ${MODULES_OF_INTEREST}
.if exists(${entry})
	${MAKE} -C ${.CURDIR}/${entry} unload
.endif
.endfor
	${MAKE} -C ${.CURDIR}/zaptel unload

reload: unload load

ztdload:
	${MAKE} -C ${.CURDIR}/zaptel load
	${MAKE} -C ${.CURDIR}/ztdummy load

ztdunload:
	${MAKE} -C ${.CURDIR}/ztdummy unload
	${MAKE} -C ${.CURDIR}/zaptel unload

ztdreload: ztdunload ztdload

.include <bsd.subdir.mk>
