]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/apachemods/Makefile
adding new open-ils.cstore app; moving new IDL generator to a better home; added...
[Evergreen.git] / Open-ILS / src / apachemods / Makefile
1
2 LDLIBS  += -lxml2 -lopensrf -lxslt
3
4 all:    mod_ils_rest_gateway.so mod_xmlent.so
5
6 install:        mod_ils_rest_gateway-install libfieldmapper-install mod_xmlent-install
7
8
9 apachetools.o: 
10         cp ../../../OpenSRF/src/gateway/apachetools.o .
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 mod_xmlent.o:   mod_xmlent.c
21 mod_xmlent.so: mod_xmlent.o
22         @echo $@
23         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 mod_xmlent.o -lexpat -o $@
24
25
26 # ------------------------------------------------------
27
28 libfieldmapper.so:      fieldmapper_lookup.o
29         @echo $@
30         mkdir -p $(TMPDIR)/openils/
31         cp fieldmapper_lookup.h $(TMPDIR)/openils/
32         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 fieldmapper_lookup.o -o $@
33         cp libfieldmapper.so $(TMPDIR)/libfieldmapper.so
34
35 mod_ils_rest_gateway.so:        libfieldmapper.so ils_rest_gateway.o json_xml.o
36         @echo $@
37         $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 json_xml.o ils_rest_gateway.o -lfieldmapper -o $@
38
39 # ------------------------------------------------------
40
41
42 libfieldmapper-install: libfieldmapper.so
43         echo installing libfieldmapper.so
44         mkdir -p $(INCDIR)/
45         @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
46         cp fieldmapper_lookup.h $(INCDIR)/
47         cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
48
49
50 mod_ils_rest_gateway-install:
51         $(APXS2) -i -a -n ils_rest_gateway mod_ils_rest_gateway.so
52         echo "-----------------------------------------------";
53         echo -e "* Important * : Change httpd.conf from this: \n \
54                 LoadModule mod_ils_rest_gateway_module modules/mod_ils_rest_gateway.so \n \
55                 to this: \n \
56                 LoadModule mod_ils_rest_gateway    modules/mod_ils_rest_gateway.so"
57         echo -e "Supported configuration options:\
58                         \nILSRestGatewayConfig <config-file>"
59         echo "-----------------------------------------------";
60         echo ""
61
62 mod_xmlent-install:
63         $(APXS2) -i -a -n xmlent mod_xmlent.so
64
65
66 clean:
67         echo $@
68         /bin/rm -f *.o *.so 
69         /bin/rm -f fieldmapper_lookup.c
70