LIBNAME=wysedef
VERSION=1.0

#Allow the user to install where he wants
LIBDIR=${WYLIB}
ifeq (${LIBDIR},"")
    LIBDIR=/usr/lib
endif
BINDIR=${WYBIN}
ifeq (${BINDIR},"")
    BINDIR=/usr/local/bin
endif

PKGNAME=${LIBNAME}-${VERSION}
INSTDIR=${LIBDIR}/${PKGNAME}

all: pkgIndex.tcl

pkgIndex.tcl: *.tcl
	tcl -c "pkg_mkIndex -lazy . *.tcl"

install: all
	if ! [ -d ${INSTDIR} ] ; then mkdir ${INSTDIR} ; fi
	install -m 644 *.tcl ${INSTDIR}
	install -m 644 pkgIndex.tcl ${INSTDIR}/pkgIndex.tcl

uninstall:
	rm -r ${INSTDIR}

clean:
	rm -f *.tcl
