renaming the setup file for direct DB connection
[working/Evergreen.git] / Open-ILS / src / Makefile
1
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)
6
7 export INCLUDEDIR += "/openils/"
8
9 all: mod_xmltools mod_ils_rest_gateway
10
11
12 install:        perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install
13
14 web-install:    webcore-install autojs-install  mod_xmltools-install mod_ils_rest_gateway-install
15
16
17 # -----------------------------------------------------------------------------------
18 # Web stuff
19 # -----------------------------------------------------------------------------------
20 mod_ils_rest_gateway:
21         @echo $@
22         make -C apachemods mod_ils_rest_gateway.so
23
24 mod_ils_rest_gateway-install:
25         @echo $@
26         make -C apachemods libfieldmapper-install
27         make -C apachemods mod_ils_rest_gateway-install
28
29 mod_xmltools:
30         @echo $@
31         make -C apachemods mod_xmltools.so
32
33 mod_xmltools-install:
34         @echo $@
35         make -C apachemods mod_xmltools-install
36
37 webcore-install:
38         @echo $@
39         echo "Copying web into $(WEBDIR)"
40         #mkdir -p $(WEBDIR)
41         #cp -r ../web/* $(WEBDIR)
42
43 autojs-install:
44         @echo $@
45         cp extras/fieldmapper.pl $(BINDIR)
46         cp extras/org_tree_js.pl $(BINDIR)
47         cp extras/autogen.sh $(BINDIR)
48 # -----------------------------------------------------------------------------------
49
50 marcdumper:
51         @echo $@
52         make -C extras/marcdumper
53
54 marcdumper-install:
55         @echo $@
56         make -C extras/marcdumper install
57
58 # -----------------------------------------------------------------------------------
59
60 perl-install:
61         @echo $@
62         @echo "Installing Perl modules to $(PERLDIR)"
63         mkdir -p $(PERLDIR)
64         cp -r perlmods/* $(PERLDIR)
65         cp ../examples/openils.xml.example $(ETCDIR)
66         mkdir -p $(TEMPLATEDIR)
67         cp -r templates/marc $(TEMPLATEDIR)
68
69 # -----------------------------------------------------------------------------------
70
71 cgi-bootstrap:
72         @echo "Installing cgi's to $(CGIDIR)"
73         mkdir -p $(TMP)/cgi-bin
74         mkdir -p $(CGIDIR)
75         for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $$i > $(TMP)/$$i; done
76         cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
77         cp -r cgi-bin/support $(CGIDIR)
78         cp cgi-bin/setup.pl $(ETCDIR)/live-db-setup.pl
79
80 storage-bootstrap:
81         ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBNAME) $(DBUSER) $(DBPW)
82
83 # -----------------------------------------------------------------------------------
84
85
86 string-templates-install:
87         @echo "Installing string templates to $(TEMPLATEDIR)"
88         mkdir -p $(TEMPLATEDIR)
89         cp -r templates/strings $(TEMPLATEDIR)
90
91 xsl-install:    
92         @echo "Installing XSL files to $(XSLDIR)"
93         mkdir -p $(XSLDIR)
94         cp ../xsl/*.xsl $(XSLDIR)
95
96 clean:
97         @echo $@
98         make -C extras clean
99         make -C apachemods clean
100