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