816a885b34a9c417dd0f9af17b93724805ad0078
[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         mkdir -p $(TMPDIR)/openils/
30         cp fieldmapper_lookup.h $(TMPDIR)/openils/
31         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 fieldmapper_lookup.o -o $@
32         cp libfieldmapper.so $(TMPDIR)/libfieldmapper.so
33
34 mod_ils_rest_gateway.so:        libfieldmapper.so ils_rest_gateway.o json_xml.o
35         @echo $@
36         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 json_xml.o ils_rest_gateway.o -lfieldmapper -o $@
37
38 # ------------------------------------------------------
39
40
41 libfieldmapper-install: libfieldmapper.so
42         echo installing libfieldmapper.so
43         mkdir -p $(INCDIR)/
44         @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
45         cp fieldmapper_lookup.h $(INCDIR)/
46         cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
47
48
49 mod_ils_rest_gateway-install:
50         $(APXS2) -i -a -n ils_rest_gateway mod_ils_rest_gateway.so
51         echo "-----------------------------------------------";
52         echo -e "* Important * : Change httpd.conf from this: \n \
53                 LoadModule mod_ils_rest_gateway_module modules/mod_ils_rest_gateway.so \n \
54                 to this: \n \
55                 LoadModule mod_ils_rest_gateway    modules/mod_ils_rest_gateway.so"
56         echo -e "Supported configuration options:\
57                         \nILSRestGatewayConfig <config-file>"
58         echo "-----------------------------------------------";
59         echo ""
60
61 mod_xmltools-install:
62         $(APXS2) -i -a -n mod_xmltools mod_xmltools.so
63         echo "-----------------------------------------------";
64         echo -e "* Important * : Change httpd.conf from this: \n \
65                 LoadModule mod_xmltools_module modules/mod_xmltools.so \n \
66                 to this: \n \
67                 LoadModule mod_xmltools    modules/mod_xmltools.so"
68         echo -e "Supported configuration options:\
69                         \nXMLToolsDefaultLocale <locale>\
70                         \nXMLToolsLocaleDir  <web-locale-dir>\
71                         \nXMLToolsPreXSL <pre_xsl_file>\
72                         \nXMLToolsPostXSL <post_xsl_file>"
73         echo "-----------------------------------------------";
74         echo ""
75
76 clean:
77         echo $@
78         /bin/rm -f *.o xmltools mod_xmltools.so libfieldmapper.so mod_ils_rest_gateway.so
79         /bin/rm -f fieldmapper_lookup.c
80