typo
[working/Evergreen.git] / Open-ILS / src / apachemods / Makefile
1 # ---------------------------------------------------------------------------------
2 #CC_OPTS = -I /usr/include/libxml2 -I /opt/include -g
3 #APXS2 = /home/erickson/sandbox/apache2/bin/apxs
4 # ---------------------------------------------------------------------------------
5
6 LD_OPTS += -lxml2 -lc_utils -lxslt
7
8 all:    mod_xmltools.so mod_ils_rest_gateway.so
9
10 install:        mod_xmltools-install mod_ils_rest_gateway-install libfieldmapper-install
11
12 mod_xmltools.so: apachetools.o  xmltools.o mod_xmltools.c mod_xmltools.h
13         echo $@
14         $(CC) -c $(CC_OPTS) mod_xmltools.c 
15         $(CC) $(LD_OPTS) -shared -W1 apachetools.o xmltools.o mod_xmltools.o -o $@
16
17 apachetools.o: apachetools.c apachetools.h
18         echo $@
19         $(CC) -c $(CC_OPTS)  apachetools.c -o $@
20
21 xmltools.o:     xmltools.c xmltools.h   
22         echo $@
23         $(CC) -c $(CC_OPTS) xmltools.c -o $@
24
25 fieldmapper_lookup.c:   fieldmapper_lookup.h
26         ./fieldmapper_lookup-gen.pl fieldmapper_lookup.c
27
28 json_xml.o:     json_xml.c json_xml.h
29         echo $@
30         $(CC) -c $(CC_OPTS) json_xml.c -o $@
31
32 fieldmapper_lookup.o:   fieldmapper_lookup.c fieldmapper_lookup.h
33         echo $@
34         $(CC) -c $(CC_OPTS) fieldmapper_lookup.c -o $@
35
36 libfieldmapper.so:      fieldmapper_lookup.o
37         echo $@
38         $(CC) $(LD_OPTS) -shared -W1 fieldmapper_lookup.o -o $@
39
40 libfieldmapper-install: libfieldmapper.so
41         echo installing libfieldmapper.so
42         mkdir -p $(INCLUDEDIR)/
43         cp fieldmapper_lookup.h $(INCLUDEDIR)/
44         cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
45
46 ils_rest_gateway.o:     mod_rest_gateway.c mod_rest_gateway.h fieldmapper_lookup.h
47         echo $@
48         $(CC) -c $(CC_OPTS) mod_rest_gateway.c -o $@
49
50 mod_ils_rest_gateway.so:     libfieldmapper.so ils_rest_gateway.o
51         echo $@
52         $(CC) $(LD_OPTS) -shared -W1 ils_rest_gateway.o -lfieldmapper -o $@
53
54
55 mod_ils_rest_gateway-install:
56         echo $@
57         $(APXS2) -i -a -n mod_ils_rest_gateway mod_ils_rest_gateway.so
58         echo "-----------------------------------------------";
59         echo -e "* Important * : Change httpd.conf from this: \n \
60                 LoadModule mod_ils_rest_gateway_module modules/mod_ils_rest_gateway.so \n \
61                 to this: \n \
62                 LoadModule mod_ils_rest_gateway    modules/mod_ils_rest_gateway.so"
63         echo -e "Supported configuration options:\
64                         \nILSRestGatewayConfig <config-file>"
65         echo "-----------------------------------------------";
66         echo ""
67
68 mod_xmltools-install:
69         echo $@
70         $(APXS2) -i -a -n mod_xmltools mod_xmltools.so
71         echo "-----------------------------------------------";
72         echo -e "* Important * : Change httpd.conf from this: \n \
73                 LoadModule mod_xmltools_module modules/mod_xmltools.so \n \
74                 to this: \n \
75                 LoadModule mod_xmltools    modules/mod_xmltools.so"
76         echo -e "Supported configuration options:\
77                         \nXMLToolsDefaultLocale <locale>\
78                         \nXMLToolsLocaleDir  <web-locale-dir>\
79                         \nXMLToolsPreXSL <pre_xsl_file>\
80                         \nXMLToolsPostXSL <post_xsl_file>"
81         echo "-----------------------------------------------";
82         echo ""
83
84 clean:
85         echo $@
86         /bin/rm -f *.o xmltools mod_xmltools.so libfieldmapper.so mod_ils_rest_gateway.so
87         /bin/rm -f fieldmapper_lookup.c