-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (50 loc) · 1.59 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
##
## Makefile -- Build procedure for sample cutest Apache module
## Autogenerated via ``apxs -n cutest -g''.
##
builddir=.
include ./definition.mk
include $(top_builddir)/build/special.mk
# additional defines, includes and libraries
#DEFS=-Dmy_define=my_value
#INCLUDES=-Imy/include/dir
#LIBS=-Lmy/lib/dir -lmylib
CFLAGS = `pkg-config --cflags --libs apr-1` `apreq2-config --ldflags --includes` -lapreq2
# the default target
all: local-shared-build
modcutest-config:
cat modcutest-config.sh | \
sed -e "s#%MODCUTEST_INCLUDEDIR%#$(modcutest_includedir)#g" | \
sed -e "s#%MODCUTEST_LIBEXECDIR%#$(modcutest_libexecdir)#g" \
> modcutest-config
chmod +x modcutest-config
# install the shared object file into Apache
install: modcutest-config install-modules-yes
install -d $(modcutest_includedir) $(modcutest_bindir)
cp ModCuTest.h $(modcutest_includedir)/ModCuTest.h
install -D modcutest-config $(modcutest_bindir)
ldconfig
uninstall:
rm -f $(modcutest_includedir)/ModCuTest.h
rm -f $(modcutest_bindir)/modcutest-config
rm -f $(modcutest_libexecdir)/mod_cutest.so
rm -f $(modcutest_libexecdir)/libmodcutest.so
# cleanup
clean:
-rm -f mod_cutest.o mod_cutest.lo mod_cutest.slo mod_cutest.la
rm -f modcutest-config
# simple test
test: reload
lynx -mime_header http://localhost/cutest
refresh: uninstall clean all reload
# 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