LIBS=-lpam -ldl
APXS=apxs
# try this, if you're not root and apxs is in the standard place
#APXS=/usr/sbin/apxs

all: mod_auth_pam.so

mod_auth_pam.so: mod_auth_pam.c
	$(APXS) -c mod_auth_pam.c $(LIBS)

install: mod_auth_pam.so
	$(APXS) -i -a mod_auth_pam.so
	[ -d /etc/pam.d/ -a ! -f /etc/pam.d/httpd ] && install -m 644 -o root -g root samples/httpd /etc/pam.d/

clean:
	-rm -f mod_auth_pam.o mod_auth_pam.so *~
