summaryrefslogtreecommitdiffstatsabout
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile147
1 files changed, 65 insertions, 82 deletions
diff --git a/Makefile b/Makefile
index ed31430..8c654a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,88 +1,71 @@
1# $Id: Makefile,v 1.11 2002/09/04 18:46:00 helios Exp $ 1# $Id: Makefile,v 1.12 2002/11/14 03:51:34 helios Exp $
2MLMVERS = 1.17 2
3 3#####################################
4# Where you unpacked your Apache tarball -- the source. 4# Important:
5APACHESOURCE = /usr/local/src/apache_1.3.26 5# Adjust these values as outlined in the INSTALL file.
6 6# Not all are needed at all times.
7# Where Apache [got|will get] installed 7
8APACHEINST = /usr/local/Apache 8APACHEINST = /usr/local/Apache
9 9MYSQLLIBS = /usr/lib
10# Do you want to log SSL information? 10MYSQLHDRS = /usr/include/mysql
11# Yes? 11#MODSSLHDRS = /usr/local/src/apache_1.3.27-dso/src/modules/ssl
12# - #define WANT_SSL_LOGGING in mod_log_sql.c 12
13# - pick (A) below 13APACHESOURCE = /usr/local/src/apache_1.3.27-dso
14# No? 14OPNSSLHDRS = /usr/include/openssl
15# - #undef WANT_SSL_LOGGING in mod_log_sql.c 15DB1HDRS = /usr/include/db1
16# - pick (B) below 16
17 17
18 18#####################################
19# (A) 19# Shouldn't have to touch below here.
20# 20
21# Modify "/usr/include/mysql" to where YOUR mysql.h can be found, 21MLMVERS = 1.17
22# Modify "/usr/local/ssl/include" to where YOUR openssl/*.h files are, 22APXS = $(APACHEINST)/bin/apxs
23# Modify "/usr/include/db1" to where YOUR ndbm.h can be found, 23#APXSGDB = -Wc,-g
24# Modify "/usr/local/src/apache_1.3.22/src/modules/ssl" to where YOUR mod_ssl.h can be found. 24APXSOPTS = -Wc,-O2 -Wc,-Wall -Wc,-DEAPI
25# 25CC = gcc
26# How to find your directories: 26INSTALL = /usr/bin/install -m 664
27# 27RM = /bin/rm
28# $ locate mysql.h 28
29# /usr/include/mysql/mysql.h 29ifdef MODSSLHDRS
30# ^^^^^^^^^^^^^^^^^^ 30 SSLDEF = -DWANT_SSL_LOGGING
31# 31 CFLAGS = -fPIC -O2 -Wall -I$(APACHEINST)/include -I$(MYSQLHDRS) -I$(MODSSLHDRS) -I$(OPNSSLHDRS) $(SSLDEF) -I$(DB1HDRS)
32# $ locate x509.h 32else
33# /usr/local/ssl/include/openssl/x509.h 33 CFLAGS = -fPIC -O2 -Wall -I$(APACHEINST)/include -I$(MYSQLHDRS)
34# ^^^^^^^^^^^^^^^^^^^^^^ 34endif
35# 35
36# $ locate ndbm.h 36all:
37# /usr/include/db1/ndbm.h 37 @echo "You can choose to make mod_log_sql as a static or dynamic module."
38# ^^^^^^^^^^^^^^^^ 38 @echo "Either 'make dso' or 'make static'."
39# 39 @echo
40# $ locate mod_ssl.h 40 @echo "Please read the INSTALL file carefully!"
41# /usr/local/src/apache_1.3.22/src/modules/ssl/mod_ssl.h 41
42# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 42dso: mod_log_sql.so
43# Now uncomment this CFLAGS and comment out the one further down: 43
44 44static: mod_log_sql.o
45CFLAGS = -fpic -O2 -Wall -I${APACHEINST}/include -I/usr/include/mysql -I/usr/local/ssl/include -I/usr/include/db1 -I${APACHESOURCE}/src/modules/ssl 45
46 46mod_log_sql.so: mod_log_sql.c Makefile
47# (B) 47 $(APXS) $(APXSGDB) $(APXOPTS) -c -I$(MYSQLHDRS) -I$(MODSSLHDRS) $(SSLDEF) -L$(MYSQLLIBS) -lmysqlclient -lz mod_log_sql.c
48#
49# Modify "/usr/include/mysql" to where YOUR mysql.h can be found,
50#
51# How to find your directories:
52#
53# $ locate mysql.h
54# /usr/include/mysql/mysql.h
55# ^^^^^^^^^^^^^^^^^^
56#
57# Comment out CFLAGS above and uncomment CFLAGS below:
58
59#CFLAGS = -fpic -O2 -Wall -I${APACHEINST}/include -I/usr/include/mysql
60
61
62# ---------------------------------------------------------
63# You shouldn't have to touch below here.
64
65CC = gcc
66INSTALL = /usr/bin/install -m 664
67
68all: mod_log_sql.o
69 48
70mod_log_sql.o: mod_log_sql.c Makefile 49mod_log_sql.o: mod_log_sql.c Makefile
71 $(CC) ${CFLAGS} -c mod_log_sql.c 50 $(CC) ${CFLAGS} -c mod_log_sql.c
72
73install: all
74 $(INSTALL) -d -m 755 ${APACHESOURCE}/src/modules/sql
75 $(INSTALL) mod_log_sql.c ${APACHESOURCE}/src/modules/sql/mod_log_sql.c
76 $(INSTALL) Makefile ${APACHESOURCE}/src/modules/sql/Makefile
77 $(INSTALL) mod_log_sql.o ${APACHESOURCE}/src/modules/sql/mod_log_sql.o
78 51
79distro: all 52dsoinstall: dso
80 cp -f INSTALL ${APACHEINST}/html/mod_log_sql/ 53 $(APXS) -i mod_log_sql.so
81 cp -f README ${APACHEINST}/html/mod_log_sql/ 54
82 cp -f CHANGELOG ${APACHEINST}/html/mod_log_sql/ 55statinstall: static
83 cd ..; tar zcf mod_log_sql-${MLMVERS}.tar.gz --exclude mod_log_sql/CVS mod_log_sql/; $(INSTALL) mod_log_sql-${MLMVERS}.tar.gz ${APACHEINST}/html/mod_log_sql/; rm -f mod_log_sql-${MLMVERS}.tar.gz 56 $(INSTALL) -d -m 755 $(APACHESOURCE)/src/modules/sql
84 rm -f ${APACHEINST}/html/mod_log_sql/mod_log_sql.tar.gz 57 $(INSTALL) mod_log_sql.c $(APACHESOURCE)/src/modules/sql/mod_log_sql.c
85 ln -s mod_log_sql-${MLMVERS}.tar.gz ${APACHEINST}/html/mod_log_sql/mod_log_sql.tar.gz 58 $(INSTALL) Makefile $(APACHESOURCE)/src/modules/sql/Makefile
59 $(INSTALL) mod_log_sql.o $(APACHESOURCE)/src/modules/sql/mod_log_sql.o
86 60
87clean: 61clean:
88 rm -f *.o *~ 62 $(RM) -rf *.o *.so
63
64distro: all
65 cp -f INSTALL $(APACHEINST)/html/mod_log_sql/
66 cp -f README $(APACHEINST)/html/mod_log_sql/
67 cp -f CHANGELOG $(APACHEINST)/html/mod_log_sql/
68 cd ..; tar zcf mod_log_sql-$(MLMVERS).tar.gz --exclude mod_log_sql/CVS mod_log_sql/; $(INSTALL) mod_log_sql-$(MLMVERS).tar.gz $(APACHEINST)/html/mod_log_sql/; rm -f mod_log_sql-$(MLMVERS).tar.gz
69 rm -f $(APACHEINST)/html/mod_log_sql/mod_log_sql.tar.gz
70 ln -s mod_log_sql-$(MLMVERS).tar.gz $(APACHEINST)/html/mod_log_sql/mod_log_sql.tar.gz
71