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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# Makefile to build shared modules to be loaded by Apache at startup by
# the LoadModule directive.
#
# Yves Arrouye <arrouye@debian.org>
# Modified for Apache 1.1.3 by Johnie Ingram <johnie@debian.org>
# Note: the .so files for the modules should have the name of the module
# (e.g. mod_log_config compiles to config_log_module.so); the Debian
# installation script for Apache will use nm if available to get the real
# name of a module, but nothing tells you nm will be available then...
prefix = /usr
INCDIR = . -I $(prefix)/include/apache
LIBDIR = $(prefix)/lib/apache
MODDIR = $(LIBDIR)/modules
CC = gcc
CFLAGS = -fPIC -O2 -I$(INCDIR) -DDEBIAN -DLINUX -DHAVE_POSIX_REGEX
LDFLAGS = -shared -Wl,-S
MODSRCS = $(wildcard mod_*.c)
MODOBJS = $(MODSRCS:.c=.so)
MODNAMES = $(MODSRCS:.c=)
INSTALL = install
.SUFFIXES: .gz .so
%: %.gz
gunzip -c $< >$@
%.so: %.c
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
all: modules
modules: $(MODOBJS)
mod_auth_db.so: mod_auth_db.c
$(CC) -I/usr/include/db $(CFLAGS) $(LDFLAGS) $< -o $@ -ldb
mod_auth_dbm.so: mod_auth_dbm.c
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -lgdbm
mod_auth_msql.so: mod_auth_msql.c
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -lmsql
mod_rewrite.so: mod_rewrite.o
$(CC) $(LDFLAGS) $< -o $@ -lgdbm regexp/libregexp.a
install:
$(INSTALL) -s -m 644 $(MODOBJS) $(MODDIR)
clean:
$(RM) $(MODSRCS:.c=.o)
distclean: clean
$(RM) $(MODOBJS) *~ \#*\# *%
.PHONY: all modules install clean distclean
|