blob: c9e5cab48b26fac6cc618ae69580d68b90d4741d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# $NetBSD: Makefile.module,v 1.3 2002/07/24 19:45:31 jlam Exp $
.include "../../www/php3/Makefile.common"
PKGNAME= php-${MODNAME}-${BASE_VERS}
PKGREVISION?= # empty
DEPENDS+= php-${BASE_VERS}*:../../www/php3
USE_PERL5= build
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}
|