2 LDLIBS += -lxml2 -lopensrf -lxslt
4 all: mod_ils_rest_gateway.so mod_xmlent.so
6 install: mod_ils_rest_gateway-install libfieldmapper-install mod_xmlent-install
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 $@
17 ./fieldmapper_lookup-gen.pl fieldmapper_lookup.c
20 mod_xmlent.o: mod_xmlent.c
21 mod_xmlent.so: mod_xmlent.o
23 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 mod_xmlent.o -lexpat -o $@
26 # ------------------------------------------------------
28 libfieldmapper.so: fieldmapper_lookup.o
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
35 mod_ils_rest_gateway.so: libfieldmapper.so ils_rest_gateway.o json_xml.o
37 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 json_xml.o ils_rest_gateway.o -lfieldmapper -o $@
39 # ------------------------------------------------------
42 libfieldmapper-install: libfieldmapper.so
43 echo installing libfieldmapper.so
45 @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
46 cp fieldmapper_lookup.h $(INCDIR)/
47 cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
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 \
56 LoadModule mod_ils_rest_gateway modules/mod_ils_rest_gateway.so"
57 echo -e "Supported configuration options:\
58 \nILSRestGatewayConfig <config-file>"
59 echo "-----------------------------------------------";
63 $(APXS2) -i -a -n xmlent mod_xmlent.so
69 /bin/rm -f fieldmapper_lookup.c