diff options
Diffstat (limited to 'www/php3/Makefile.module')
-rw-r--r-- | www/php3/Makefile.module | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/www/php3/Makefile.module b/www/php3/Makefile.module new file mode 100644 index 00000000000..ae66139d2c7 --- /dev/null +++ b/www/php3/Makefile.module @@ -0,0 +1,49 @@ +# $NetBSD: Makefile.module,v 1.1 2002/01/10 13:17:11 jlam Exp $ + +.include "../../www/php3/Makefile.common" + +PKGNAME= php-${MODNAME}-${BASE_VERS} +PKGREVISION?= # empty + +BUILD_DEPENDS+= perl>=${PERL5_REQD}:../../lang/perl5 +DEPENDS+= php-${BASE_VERS}:../../www/php3 + +PKGMODNAME= ${MODNAME:S/-/_/} +MODULESDIR= ${WRKSRC}/functions +PLIST_SUBST+= MODNAME=${PKGMODNAME} + +.include "../../mk/bsd.prefs.mk" + +# LD_SHAREABLE_FLAG is the flag to pass to "ld" to create a shared library +# module. +# +.if ${OPSYS} == "SunOS" +LD_SHAREABLE_FLAG= -G +.else +LD_SHAREABLE_FLAG= -Bshareable +.endif + +# Ensure we export symbols in the linked shared objects. +LDFLAGS+= -Wl,--export-dynamic + +MOD_CPPFLAGS+= -I${WRKSRC} -I${MODULESDIR} -fPIC -DPIC -DCOMPILE_DL +MOD_LDFLAGS+= ${LDFLAGS:S/-Wl,//g} +MOD_LIBS+= # empty + +PLIST_SRC= ${.CURDIR}/../../www/php3/PLIST.module +MESSAGE_SRC= ${.CURDIR}/../../www/php3/MESSAGE.module +MESSAGE_SUBST+= MODNAME=${PKGMODNAME} +MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} + +do-build: + cd ${MODULESDIR}; \ + ${COMPILE.c} ${MOD_CPPFLAGS} ${PKGMODNAME}.c; \ + ${LD} ${LD_SHAREABLE_FLAG} -o ${PKGMODNAME}.so ${PKGMODNAME}.o \ + ${MOD_LDFLAGS} ${MOD_LIBS} + +do-install: do-module-install + +do-module-install: + ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR} + ${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \ + ${PREFIX}/${PHP_EXTENSION_DIR} |