-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 1.07 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
##
## Makefile -- Build procedure for sample mod_myson Apache module
## Autogenerated via ``apxs -n mod_myson -g''.
##
builddir=.
top_srcdir=/usr
top_builddir=/usr
# include /usr/share/httpd/build/special.mk
# the used tools
APXS=sudo apxs
APACHECTL=sudo apachectl
# additional defines, includes and libraries
#DEFS=-Dmy_define=my_value
INCLUDES=-I/usr/local/mysql/include
LIBS=-L/usr/local/mysql/lib -lmysqlclient
# the default target
all:
$(APXS) $(INCLUDES) $(LIBS) -a -c -i mod_myson.c apr_json_decode.c apr_json_encode.c
$(APACHECTL) restart
# install the shared object file into Apache
install:
sudo $(APXS) -i mod_myson.c
# cleanup
clean:
-rm -f mod_mod_myson.o mod_mod_myson.lo mod_mod_myson.slo mod_mod_myson.la
# simple test
test: reload
lynx -mime_header http://localhost/mod_myson
# 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