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

ifdef COMSPEC
UID=18
GID=545
endif

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
	[ -f /etc/pam.d/httpd ] || install -m 644 -o $(UID) -g $(GID) samples/httpd /etc/pam.d/

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