1 |
|
# |
2 |
|
# dotGNU Project |
3 |
|
# |
4 |
|
# Makefile for dgee apache module |
5 |
|
# |
6 |
|
# This software comes with ABSOLUTELY NO WARRANTY. This is free software, |
7 |
|
# and you are welcome to modify and redistribute it under the GPL licence. |
8 |
|
# |
9 |
|
# $Id$ |
10 |
|
# |
11 |
|
INC = . $(PXLBASE)/include $(GWBASE)/include/goldwater @top_srcdir@/dglib |
12 |
|
ALLINC = $(addprefix -I,$(INC)) |
13 |
|
LFLAG = -L$(PXLBASE)/lib -L$(GWBASE)/lib -lgwtx -lpxtra -lpxtra $(LOCAL_LDFLAGS) |
14 |
|
|
15 |
|
APACHE_DIR := $(shell $(APXS) -q LIBEXECDIR) |
16 |
|
MOD_DGEE = mod_dgee.so |
17 |
|
MOD_DGEE_CONF = mod_dgee.conf |
18 |
|
MOD_DGEE_DIR = $(DESTDIR)$(APACHE_DIR) |
19 |
|
edit = sed \ |
20 |
|
-e 's,$${prefix},$(prefix),g' |
21 |
|
|
22 |
|
.PHONY: all fresh clean install install-mod install-mod-conf |
23 |
|
|
24 |
|
all: $(MOD_DGEE) |
25 |
|
|
26 |
|
fresh: clean all |
27 |
|
|
28 |
|
$(MOD_DGEE): mod_dgee.c replace |
29 |
|
$(APXS) -DEAPI -DDOTGNUVERSION="'\""$(DOTGNUVERSION)"\"'" -DDGVERSION="'\""$(DGVERSION)"\"'" $(ALLINC) -c mod_dgee.c $(LFLAG) |
30 |
|
@( if [ ! -e "$(MOD_DGEE)" ] ; \ |
31 |
|
then \ |
32 |
|
echo Info: ERROR $(MOD_DGEE) not created... ;\ |
33 |
|
echo Info: If this compile fails because apxs cannot be found, then ;\ |
34 |
|
echo Info: reconfigure DGEE with --with-apxs=directory where apache apxs;\ |
35 |
|
echo Info: may be found. If you don\'t have apxs installed, then you may;\ |
36 |
|
echo Info: be able to use the mod_dgee.so in the ./precompiled directory.;\ |
37 |
|
echo Info: Do \"cp apache/precompiled/mod_dgee.so apache\" before doing;\ |
38 |
|
echo Info: the install if this is the case. ;\ |
39 |
|
fi ) |
40 |
|
|
41 |
|
replace: |
42 |
|
$(edit) mod_dgee.conf > mod_dgee.conf.tmp |
43 |
|
mv mod_dgee.conf.tmp mod_dgee.conf |
44 |
|
|
45 |
|
clean: |
46 |
|
rm -f *.o |
47 |
|
rm -f $(MOD_DGEE) |
48 |
|
|
49 |
|
distclean: clean |
50 |
|
rm -f Makefile |
51 |
|
rm -f $(MOD_DGEE_CONF) |
52 |
|
rm -f *~ |
53 |
|
rm -f \#* |
54 |
|
|
55 |
|
|
56 |
|
install: install-mod |
57 |
|
|
58 |
|
install-mod-conf: |
59 |
|
if [ -e $(MOD_DGEE) ] ; \ |
60 |
|
then \ |
61 |
|
$(INSTALL) $(MOD_DGEE_CONF) $(DESTDIR)$(sysconfdir) ; \ |
62 |
|
fi |
63 |
|
|
64 |
|
install-mod: $(MOD_DGEE) install-mod-conf |
65 |
|
$(APXS) -i -S LIBEXECDIR=$(MOD_DGEE_DIR) -a $< |
66 |
|
|
67 |
|
directories: |
68 |
|
|