added first part of myopac, minor changes
[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 INCDIR = "$(INCLUDEDIR)/openils/"
8
9 all: msg mod_xmltools mod_ils_rest_gateway c_apps
10
11
12
13 install:        perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install c_apps-install
14
15 web-install:    webcore-install autojs-install  mod_xmltools-install mod_ils_rest_gateway-install
16
17
18 # -----------------------------------------------------------------------------------
19 # Web stuff
20 # -----------------------------------------------------------------------------------
21 mod_ils_rest_gateway:
22         @echo $@
23         make -C apachemods mod_ils_rest_gateway.so
24
25 mod_ils_rest_gateway-install:
26         @echo $@
27         make -C apachemods libfieldmapper-install
28         make -C apachemods mod_ils_rest_gateway-install
29
30 mod_xmltools:
31         @echo $@
32         make -C apachemods mod_xmltools.so
33
34 mod_xmltools-install:
35         @echo $@
36         make -C apachemods mod_xmltools-install
37
38 webcore-install:
39         @echo $@
40         echo "Copying web into $(WEBDIR)"
41         # XXX put these back
42         #mkdir -p $(WEBDIR)
43         #cp -r ../web/* $(WEBDIR)
44
45 libfieldmapper: 
46         make -C apachemods libfieldmapper.so
47
48 libfieldmapper-install: 
49         make -C apachemods libfieldmapper-install
50
51 c_apps: libfieldmapper
52         @echo $@
53         make -C c-apps
54
55 c_apps-install: libfieldmapper-install
56         @echo $@
57         make -C c-apps install
58
59 autojs-install:
60         @echo $@
61         cp extras/fieldmapper.pl $(BINDIR)
62         cp extras/org_tree_js.pl $(BINDIR)
63         cp extras/autogen.sh $(BINDIR)
64 # -----------------------------------------------------------------------------------
65
66 marcdumper:
67         @echo $@
68         make -C extras/marcdumper
69
70 marcdumper-install:
71         @echo $@
72         make -C extras/marcdumper install
73
74 # -----------------------------------------------------------------------------------
75
76 perl-install:
77         @echo $@
78         @echo "Installing Perl modules to $(PERLDIR)"
79         mkdir -p $(PERLDIR)
80         cp -r perlmods/* $(PERLDIR)
81         cp ../examples/openils.xml.example $(ETCDIR)
82         mkdir -p $(TEMPLATEDIR)
83         cp -r templates/marc $(TEMPLATEDIR)
84
85 # -----------------------------------------------------------------------------------
86
87 cgi-bootstrap:
88         @echo "Installing cgi's to $(CGIDIR)"
89         mkdir -p $(TMP)/cgi-bin
90         mkdir -p $(CGIDIR)
91         for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $$i > $(TMP)/$$i; done
92         cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
93         cp -r cgi-bin/support $(CGIDIR)
94         cp cgi-bin/setup.pl $(ETCDIR)/live-db-setup.pl
95
96 storage-bootstrap:
97         ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBNAME) $(DBUSER) $(DBPW)
98
99 # -----------------------------------------------------------------------------------
100
101
102 string-templates-install:
103         @echo "Installing string templates to $(TEMPLATEDIR)"
104         mkdir -p $(TEMPLATEDIR)
105         cp -r templates/strings $(TEMPLATEDIR)
106
107 xsl-install:    
108         @echo "Installing XSL files to $(XSLDIR)"
109         mkdir -p $(XSLDIR)
110         cp ../xsl/*.xsl $(XSLDIR)
111
112 clean:
113         @echo $@
114         make -C extras clean
115         make -C apachemods clean
116