bug fixes after testing
[Evergreen.git] / Open-ILS / src / apachemods / Makefile
1
2 LDLIBS  += -lxml2 -lopensrf -lxslt
3
4 all:    mod_xmlbuilder.so mod_ils_rest_gateway.so
5
6 install:        mod_xmlbuilder-install mod_ils_rest_gateway-install libfieldmapper-install
7
8
9 mod_xmlbuilder.o: mod_xmlbuilder.h mod_xmlbuilder.c
10 apachetools.o: apachetools.c apachetools.h
11 json_xml.o:     json_xml.c json_xml.h
12 fieldmapper_lookup.o:   fieldmapper_lookup.c fieldmapper_lookup.h
13 ils_rest_gateway.o:     mod_rest_gateway.c mod_rest_gateway.h
14         $(CC) -c $(CFLAGS) mod_rest_gateway.c -o $@
15
16 fieldmapper_lookup.c:   
17         ./fieldmapper_lookup-gen.pl fieldmapper_lookup.c
18
19
20 # ------------------------------------------------------
21
22 mod_xmlbuilder.so: mod_xmlbuilder.o apachetools.o 
23         @echo $@
24         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 apachetools.o mod_xmlbuilder.o -o $@
25
26 libfieldmapper.so:      fieldmapper_lookup.o
27         @echo $@
28         mkdir -p $(TMPDIR)/openils/
29         cp fieldmapper_lookup.h $(TMPDIR)/openils/
30         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 fieldmapper_lookup.o -o $@
31         cp libfieldmapper.so $(TMPDIR)/libfieldmapper.so
32
33 mod_ils_rest_gateway.so:        libfieldmapper.so ils_rest_gateway.o json_xml.o
34         @echo $@
35         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 json_xml.o ils_rest_gateway.o -lfieldmapper -o $@
36
37 # ------------------------------------------------------
38
39
40 libfieldmapper-install: libfieldmapper.so
41         echo installing libfieldmapper.so
42         mkdir -p $(INCDIR)/
43         @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
44         cp fieldmapper_lookup.h $(INCDIR)/
45         cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
46
47
48 mod_ils_rest_gateway-install:
49         $(APXS2) -i -a -n ils_rest_gateway mod_ils_rest_gateway.so
50         echo "-----------------------------------------------";
51         echo -e "* Important * : Change httpd.conf from this: \n \
52                 LoadModule mod_ils_rest_gateway_module modules/mod_ils_rest_gateway.so \n \
53                 to this: \n \
54                 LoadModule mod_ils_rest_gateway    modules/mod_ils_rest_gateway.so"
55         echo -e "Supported configuration options:\
56                         \nILSRestGatewayConfig <config-file>"
57         echo "-----------------------------------------------";
58         echo ""
59
60 mod_xmlbuilder-install:
61         $(APXS2) -i -a -n xmlbuilder mod_xmlbuilder.so
62
63
64 clean:
65         echo $@
66         /bin/rm -f *.o mod_xmlbuilder.so libfieldmapper.so mod_ils_rest_gateway.so
67         /bin/rm -f fieldmapper_lookup.c
68