-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
70 lines (56 loc) · 2 KB
/
Makefile
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
69
70
##
## Makefile -- Build procedure for sample virgule Apache module
## Autogenerated via ``apxs -n virgule -g'', then heavily edited by RLL.
##
# the used tools
APXS=/usr/sbin/apxs
APACHECTL=sudo /etc/rc.d/init.d/httpd
# Apache APR 0.9 or earlier
#APRCFG=apr-config
# Apache APR 1.0 or later
APRCFG=apr-1-config
# GNU C stack smashing problem
# if apache dies with this error: "undefined symbol: __stack_chk_fail_local"
# you will need to turn off gcc stack protection by adding these CFLAGS:
# -Wc, -fno-stack-protector
CFLAGS=-Wall -Wmissing-prototypes -I`$(APXS) -q INCLUDEDIR` `$(APXS) -q CFLAGS CFLAGS_SHLIB` `pkg-config --cflags glib-2.0` `xml2-config --cflags` `$(APRCFG) --cflags --cppflags` `$(APRCFG) --includes` -fpic -fno-strict-aliasing -fno-stack-protector
LD=ld
LDLIBS=`$(APXS) -q LIBS_SHLIB` `pkg-config --libs glib-2.0` `xml2-config --libs` `$(APRCFG) --link-ld` `$(APRCFG) --libs`
LDFLAGS=`$(APXS) -q LDFLAGS_SHLIB` `$(APRCFG) --ldflags` -shared --strip-debug
OBJS = mod_virgule.o buffer.o site.o apache_util.o \
hashtable.o aggregator.o foaf.o req.o \
acct_maint.o util.o auth.o style.o xml_util.o certs.o \
db.o db_ops.o db_xml.o schema.o \
net_flow.o tmetric.o wiki.o \
diary.o article.o rss_export.o proj.o \
xmlrpc.o xmlrpc-methods.o \
rating.o eigen.o
# the default target
all: mod_virgule.so
# compile the shared object file
mod_virgule.so: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
# install the shared object file into Apache
install: all
#$(APXS) -i -a -n 'virgule' mod_virgule.so
# cleanup
clean:
-rm -f $(OBJS) mod_virgule.so
# simple test
test: reload
lynx -mime_header http://localhost/virgule
# install and activate shared object by reloading Apache to
# force a reload of the shared object file
reload: install restart
# the general Apache start/restart/stop
# procedures
start:
$(APACHECTL) start
restart:
$(APACHECTL) restart
stop:
$(APACHECTL) stop
# make dep maintains all the dependencies in the Makefile
dep:
makedepend -Y *.c 2>/dev/null
# DO NOT DELETE