Update build for OpenPAM Lycopsida.
[dragonfly.git] / lib / pam_module / Makefile.inc
index d8b6865..1d1bd9e 100644 (file)
@@ -1,13 +1,14 @@
+LIBPAMDIR=     ${.CURDIR}/../../libpam
+MODULE_SHLIB_MAJOR!=grep -w LIB_MAJ ${LIBPAMDIR}/config.h | awk '{print $$3}'
 SHLIB_NAME= ${LIB}.so.${MODULE_SHLIB_MAJOR}
 SHLIB_MAJOR=   ${MODULE_SHLIB_MAJOR}
 NOINSTALLLIB=  yes
 NOPROFILE=     yes
 
-TARGET_LIBDIR=         /usr/lib/security
-TARGET_SHLIBDIR=       /usr/lib/security
+TARGET_LIBDIR=         ${LIBDIR}/security
+TARGET_SHLIBDIR=       ${LIBDIR}/security
 
+CFLAGS+=       -I${LIBPAMDIR}
 LDADD+=        -lpam
 
 OPENPAM_DIR=   ${.CURDIR}/../../../contrib/openpam
-
-.include "Makefile.shlib"