2 LDLIBS += -lxml2 -lopensrf -lxslt
4 all: mod_xmlbuilder.so mod_ils_rest_gateway.so mod_xmlent.so
6 install: mod_xmlbuilder-install mod_ils_rest_gateway-install libfieldmapper-install mod_xmlent-install
9 mod_xmlbuilder.o: mod_xmlbuilder.h mod_xmlbuilder.c
11 cp ../../../OpenSRF/src/gateway/apachetools.o .
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 $@
18 ./fieldmapper_lookup-gen.pl fieldmapper_lookup.c
21 mod_xmlent.o: mod_xmlent.c
22 mod_xmlent.so: mod_xmlent.o
24 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 mod_xmlent.o -lexpat -o $@
27 # ------------------------------------------------------
29 mod_xmlbuilder.so: mod_xmlbuilder.o apachetools.o
30 #mod_xmlbuilder.so: mod_xmlbuilder.o
32 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 apachetools.o mod_xmlbuilder.o -o $@
34 libfieldmapper.so: fieldmapper_lookup.o
36 mkdir -p $(TMPDIR)/openils/
37 cp fieldmapper_lookup.h $(TMPDIR)/openils/
38 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 fieldmapper_lookup.o -o $@
39 cp libfieldmapper.so $(TMPDIR)/libfieldmapper.so
41 mod_ils_rest_gateway.so: libfieldmapper.so ils_rest_gateway.o json_xml.o
43 $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 json_xml.o ils_rest_gateway.o -lfieldmapper -o $@
45 # ------------------------------------------------------
48 libfieldmapper-install: libfieldmapper.so
49 echo installing libfieldmapper.so
51 @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
52 cp fieldmapper_lookup.h $(INCDIR)/
53 cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
56 mod_ils_rest_gateway-install:
57 $(APXS2) -i -a -n ils_rest_gateway mod_ils_rest_gateway.so
58 echo "-----------------------------------------------";
59 echo -e "* Important * : Change httpd.conf from this: \n \
60 LoadModule mod_ils_rest_gateway_module modules/mod_ils_rest_gateway.so \n \
62 LoadModule mod_ils_rest_gateway modules/mod_ils_rest_gateway.so"
63 echo -e "Supported configuration options:\
64 \nILSRestGatewayConfig <config-file>"
65 echo "-----------------------------------------------";
68 mod_xmlbuilder-install:
69 $(APXS2) -i -a -n xmlbuilder mod_xmlbuilder.so
72 $(APXS2) -i -a -n xmlent mod_xmlent.so
78 /bin/rm -f fieldmapper_lookup.c