2014-06-11 14:57:22 +02:00
|
|
|
# $NetBSD: apache.module.mk,v 1.1 2014/06/11 12:57:22 joerg Exp $
|
2003-02-17 18:32:08 +01:00
|
|
|
#
|
|
|
|
# This Makefile fragment is intended to be included by packages that build
|
|
|
|
# and install apache modules.
|
|
|
|
#
|
|
|
|
# The following targets are provided by this file:
|
|
|
|
#
|
|
|
|
# do-build builds the module using APXS.
|
|
|
|
#
|
|
|
|
# do-install installs the module using APXS.
|
|
|
|
#
|
|
|
|
# The following variables may be set prior to including this file:
|
|
|
|
#
|
|
|
|
# APACHE_MODULE_NAME the name of this module, including the .so suffix.
|
|
|
|
#
|
|
|
|
# APACHE_MODULE_SRCDIR the location of the source files for this module,
|
|
|
|
# defaults to WRKSRC.
|
|
|
|
#
|
2003-02-17 21:58:19 +01:00
|
|
|
# APACHE_MODULE_SRC the source files to be compiled for this
|
|
|
|
# module, defaults to *.c.
|
2003-02-17 18:32:08 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
.if !defined(_APACHE_MODULE_MK)
|
|
|
|
_APACHE_MODULE_MK= # defined
|
2005-03-24 23:42:58 +01:00
|
|
|
|
2006-07-02 12:43:18 +02:00
|
|
|
APACHE_MODULE= yes
|
2003-02-17 18:32:08 +01:00
|
|
|
|
2014-06-11 14:57:22 +02:00
|
|
|
.include "../../mk/apache.mk"
|
2003-02-17 18:32:08 +01:00
|
|
|
|
|
|
|
APACHE_MODULE_SRCDIR?= ${WRKSRC}
|
2003-02-17 21:58:19 +01:00
|
|
|
APACHE_MODULE_SRC?= *.c
|
2010-02-20 15:58:44 +01:00
|
|
|
APACHE_MODULE_DESTDIR= ${DESTDIR}${PREFIX}/lib/httpd
|
2003-02-17 18:32:08 +01:00
|
|
|
|
2006-07-02 12:43:18 +02:00
|
|
|
.PHONY: apache-module-build
|
2003-02-17 18:32:08 +01:00
|
|
|
apache-module-build:
|
2007-09-19 19:31:46 +02:00
|
|
|
${RUN} \
|
2003-05-31 16:31:14 +02:00
|
|
|
cd ${APACHE_MODULE_SRCDIR} && \
|
2006-07-02 12:43:18 +02:00
|
|
|
${SETENV} PATH=${PATH:Q} \
|
2003-05-31 16:31:14 +02:00
|
|
|
${APXS} ${CPPFLAGS} ${LDFLAGS} \
|
|
|
|
-c -o ${APACHE_MODULE_NAME} ${APACHE_MODULE_SRC}
|
2003-02-17 18:32:08 +01:00
|
|
|
|
|
|
|
do-build: apache-module-build
|
|
|
|
|
2010-02-20 15:58:44 +01:00
|
|
|
.PHONY: apache-module-install
|
|
|
|
apache-module-install:
|
|
|
|
${INSTALL_LIB_DIR} ${APACHE_MODULE_DESTDIR}
|
|
|
|
${PREFIX}/share/httpd/build/instdso.sh \
|
|
|
|
SH_LIBTOOL=${PREFIX}/share/httpd/build/libtool \
|
|
|
|
${APACHE_MODULE_SRCDIR}/${APACHE_MODULE_NAME} \
|
|
|
|
${APACHE_MODULE_DESTDIR}
|
2003-02-17 18:32:08 +01:00
|
|
|
|
|
|
|
do-install: apache-module-install
|
|
|
|
|
|
|
|
.endif # _APACHE_MODULE_MK
|