]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/Makefile.am
Linking:
[OpenSRF.git] / src / Makefile.am
1 # Copyright (C) 2008 Equinox Software, Inc.
2 # Kevin Beswick <kevinbeswick00@gmail.com>
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14
15 # Declare some directory variables
16
17 export TMPDIR   = $(TMP)
18 export OPENSRF  = opensrf
19 export BINDIR   = @bindir@
20 export LIBDIR   = @libdir@
21 export PERLDIR  = $(LIBDIR)/perl5
22 export JSDIR    = $(LIBDIR)/javascript
23 export INCLUDEDIR= @includedir@
24 export OSRF_JAVA_DEPSDIR = @OSRF_JAVA_DEPSDIR@
25
26
27
28 AM_LDFLAGS = $(DEF_LDFLAGS)
29 AM_CFLAGS = $(DEF_CFLAGS)
30
31 if BUILDJSON
32 LDADD = -lobjson
33 BJSON=1
34 endif
35
36 if BUILDPYTHON
37 MAYBE_PY = python
38 endif 
39
40 if BUILDJAVA
41 MAYBE_JA = java
42 endif
43
44 SUBDIRS = libopensrf c-apps router srfsh jserver gateway $(MAYBE_PY) $(MAYBE_JA)
45
46 install-data-local:
47         mkdir -p $(VAR)
48         mkdir -p $(PID)
49         mkdir -p $(LOG)
50         mkdir -p $(SOCK)
51         mkdir -p $(JSDIR)
52         mkdir -p $(PERLDIR)
53         mkdir -p $(ETCDIR)
54         cp -r ../include/opensrf $(INCLUDEDIR)
55         mv $(BINDIR)/opensrf $(BINDIR)/opensrf-c
56         cp ../bin/osrf_config $(BINDIR)
57         cp ../bin/osrf_ctl.sh $(BINDIR)
58         cp ../examples/opensrf.xml.example $(ETCDIR)
59         cp ../examples/opensrf_core.xml.example $(ETCDIR)
60         cp ../examples/srfsh.xml.example $(ETCDIR)
61         sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/opensrf.xml.example'
62         sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/opensrf.xml.example'
63         sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/opensrf_core.xml.example'
64         sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/opensrf_core.xml.example'
65         sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(ETCDIR)/srfsh.xml.example'
66         sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(ETCDIR)/srfsh.xml.example'
67         cp -r ../include/objson $(INCLUDEDIR)
68         cp -r javascript/* $(JSDIR)/
69         cp -r perlmods/* $(PERLDIR)/
70         mv $(INCLUDEDIR)/apachetools.h $(INCLUDEDIR)/opensrf/apachetools.h
71
72