2 export TMPDIR = $(TMP)/opensrf
3 export LDFLAGS = -L $(TMPDIR) -L .
4 export CFLAGS = -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) \
5 -I$(LIBXML2_HEADERS)/libxml -I$(TMP) -I$(TMPDIR)
7 all: mod_xmltools mod_ils_rest_gateway
10 install: perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install
12 web-install: webcore-install autojs-install mod_xmltools-install mod_ils_rest_gateway-install
15 # -----------------------------------------------------------------------------------
17 # -----------------------------------------------------------------------------------
20 make -C apachemods mod_ils_rest_gateway.so
22 mod_ils_rest_gateway-install:
24 make -C apachemods mod_ils_rest_gateway-install
28 make -C apachemods mod_xmltools.so
32 make -C apachemods mod_xmltools-install
36 echo "Copying web into $(WEBDIR)"
38 cp -r ../web/* $(WEBDIR)
42 cp extras/fieldmapper.pl $(BINDIR)
43 cp extras/org_tree_js.pl $(BINDIR)
44 cp extras/autogen.sh $(BINDIR)
45 # -----------------------------------------------------------------------------------
49 make -C extras/marcdumper
53 make -C extras/marcdumper install
55 # -----------------------------------------------------------------------------------
59 @echo "Installing Perl modules to $(PERLDIR)"
61 cp -r perlmods/* $(PERLDIR)
62 cp ../examples/openils.xml.example $(ETCDIR)
63 mkdir -p $(TEMPLATEDIR)
64 cp -r templates/marc $(TEMPLATEDIR)
66 # -----------------------------------------------------------------------------------
69 @echo "Installing cgi's to $(CGIDIR)"
70 mkdir -p $(TMP)/cgi-bin
72 for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $i > $(TMP)/$i; done
73 cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
74 cp -r cgi-bin/support $(CGIDIR)
75 cp cgi-bin/setup.pl $(ETCDIR)
78 ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBNAME) $(DBUSER) $(DBPW)
80 # -----------------------------------------------------------------------------------
83 string-templates-install:
84 @echo "Installing string templates to $(TEMPLATEDIR)"
85 mkdir -p $(TEMPLATEDIR)
86 cp -r templates/strings $(TEMPLATEDIR)
89 @echo "Installing XSL files to $(XSLDIR)"
91 cp ../xsl/*.xsl $(XSLDIR)
96 make -C apachemods clean