libraries are now filtered on id (there are duplicate names, such as "Bookmobile")
[Evergreen.git] / Open-ILS / src / Makefile
1
2 export TMPDIR                   = $(TMP)/opensrf
3 export LDFLAGS                  = -L $(TMPDIR) -L .
4 export CFLAGS                   = -pipe -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) \
5                                                                 -I$(LIBXML2_HEADERS)/libxml  -I$(TMP) -I$(TMPDIR)
6
7 export INCDIR = "$(INCLUDEDIR)/openils/"
8
9 all: mod_xmlbuilder mod_ils_rest_gateway c_apps
10
11 install:        perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install c_apps-install
12
13 web-install:    webcore-install autojs-install  mod_xmlbuilder-install mod_ils_rest_gateway-install
14
15
16 # -----------------------------------------------------------------------------------
17 # Web stuff
18 # -----------------------------------------------------------------------------------
19 mod_ils_rest_gateway:
20         @echo $@
21         make -C apachemods mod_ils_rest_gateway.so
22
23 mod_ils_rest_gateway-install:
24         @echo $@
25         make -C apachemods libfieldmapper-install
26         make -C apachemods mod_ils_rest_gateway-install
27
28 mod_xmlbuilder:
29         @echo $@
30         make -C apachemods mod_xmlbuilder.so
31
32 mod_xmlbuilder-install:
33         @echo $@
34         make -C apachemods mod_xmlbuilder-install
35
36 webcore-install:
37         @echo $@
38         echo "Copying web into $(WEBDIR)"
39         mkdir -p $(WEBDIR)
40         cp -r ../web/* $(WEBDIR)
41
42 libfieldmapper: 
43         make -C apachemods libfieldmapper.so
44
45 libfieldmapper-install: 
46         make -C apachemods libfieldmapper-install
47
48 c_apps: libfieldmapper
49         @echo $@
50         make -C c-apps
51
52 c_apps-install: libfieldmapper-install
53         @echo $@
54         make -C c-apps install
55
56 autojs-install:
57         @echo $@
58         cp extras/fieldmapper.pl $(BINDIR)
59         cp extras/org_tree_js.pl $(BINDIR)
60         cp extras/autogen.sh $(BINDIR)
61 # -----------------------------------------------------------------------------------
62
63 marcdumper:
64         @echo $@
65         make -C extras/marcdumper
66
67 marcdumper-install:
68         @echo $@
69         make -C extras/marcdumper install
70
71 # -----------------------------------------------------------------------------------
72
73 perl-install:
74         @echo $@
75         @echo "Installing Perl modules to $(PERLDIR)"
76         mkdir -p $(PERLDIR)
77         cp -r perlmods/* $(PERLDIR)
78         cp ../examples/openils.xml.example $(ETCDIR)
79         mkdir -p $(TEMPLATEDIR)
80         cp -r templates/marc $(TEMPLATEDIR)
81
82 # -----------------------------------------------------------------------------------
83
84 reporter-install:
85         @echo $@
86         @echo "Installing Reporter templates to $(REPORTERDIR) and example configs to $(ETCDIR)"
87         cp reporter/report_base.example.xml $(ETCDIR)/reporter.example.xml
88         cp reporter/tables.example.xml $(ETCDIR)
89         cp reporter/widgets.example.xml $(ETCDIR)
90         mkdir -p $(REPORTERDIR)
91         cp -r reporter/templates/* $(REPORTERDIR)
92
93 # -----------------------------------------------------------------------------------
94
95 cgi-bootstrap:
96         @echo "Installing cgi's to $(CGIDIR)"
97         mkdir -p $(TMP)/cgi-bin
98         mkdir -p $(CGIDIR)
99         for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $$i > $(TMP)/$$i; done
100         cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
101         cp -r cgi-bin/support $(CGIDIR)
102         cp cgi-bin/setup.pl $(ETCDIR)/live-db-setup.pl
103
104 storage-bootstrap:
105         ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBNAME) $(DBUSER) $(DBPW)
106
107 # -----------------------------------------------------------------------------------
108
109
110 string-templates-install:
111         @echo "Installing string templates to $(TEMPLATEDIR)"
112         mkdir -p $(TEMPLATEDIR)
113         cp -r templates/strings $(TEMPLATEDIR)
114
115 xsl-install:    
116         @echo "Installing XSL files to $(XSLDIR)"
117         mkdir -p $(XSLDIR)
118         cp ../xsl/*.xsl $(XSLDIR)
119
120 clean:
121         @echo $@
122         make -C extras clean
123         make -C apachemods clean
124