# $Id: Makefile,v 1.5 2006/10/22 08:43:23 mbalmer Exp $

NAME=mod_ldapvhost
VERSION!=grep MODULE_VERSION mod_ldapvhost.c | awk '{print $$3}' | tr -d \"

DIST=${NAME}-${VERSION:S/ //}.tgz
MD5=${NAME}-${VERSION:S/ //}.md5

all: mod_ldapvhost.so

mod_ldapvhost.so:	mod_ldapvhost.c
	apxs -Wc,-Wall -DLDAP_DEPRECATED -I/usr/local/include -L/usr/local/lib \
	    -lldap -llber -c mod_ldapvhost.c

install: mod_ldapvhost.so
	apxs -i -a mod_ldapvhost.so

dist: clean
	echo -${VERSION}-
	(cd ..; tar czvfs ${DIST} /${NAME}/${NAME}-${VERSION:S/ //}/ \
		`find ${NAME} -type f | grep -v CVS`; md5 ${DIST} > ${MD5})

clean:
	rm -f *.o mod_ldapvhost.so
