2006-07-02 12:43:18 +02:00
|
|
|
# $NetBSD: module.mk,v 1.11 2006/07/02 10:43:18 rillig 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
|
|
|
|
2005-03-24 23:42:58 +01:00
|
|
|
.include "../../www/apache/buildlink3.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
|
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:
|
2003-05-31 16:31:14 +02:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
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
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA}
|
|
|
|
|
2006-07-02 12:43:18 +02:00
|
|
|
.PHONY: apache-module-install
|
2003-02-17 18:32:08 +01:00
|
|
|
apache-module-install:
|
|
|
|
${_PKG_SILENT}${PKG_DEBUG} \
|
|
|
|
cd ${APACHE_MODULE_SRCDIR} && ${APXS} -i ${APACHE_MODULE_NAME}
|
|
|
|
|
|
|
|
do-install: apache-module-install
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA}
|
|
|
|
|
|
|
|
.endif # _APACHE_MODULE_MK
|