]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/Makefile.am
Patch from Kevin Beswick to use autotools for OpenSRF configuration and build
[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)/opensrf
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 AM_LDFLAGS = $(DEF_LDFLAGS)
27 AM_CFLAGS = $(DEF_CFLAGS)
28
29 if DEBUG
30 AM_CFLAGS += -DNDEBUG
31 endif
32
33 if BUILDJSON
34 LDADD = -lobjson
35 BJSON=1
36 endif
37
38 if BUILDPYTHON
39 MAYBE_PY = python
40 endif 
41
42 if BUILDJAVA
43 MAYBE_JA = java
44 endif
45
46 SUBDIRS = libopensrf c-apps router srfsh jserver gateway $(MAYBE_PY) $(MAYBE_JA)
47
48 install-data-local:
49         mkdir -p $(JSDIR)
50         mkdir -p $(PERLDIR)
51         mkdir -p $(ETCDIR)
52         cp -r ../include/opensrf $(INCLUDEDIR)
53         mv $(BINDIR)/opensrf $(BINDIR)/opensrf-c
54         cp ../bin/osrf_config $(BINDIR)
55         cp ../bin/osrf_ctl.sh $(BINDIR)
56         cp ../examples/opensrf.xml.example $(ETCDIR)
57         cp ../examples/opensrf_core.xml.example $(ETCDIR)
58         cp ../examples/srfsh.xml.example $(ETCDIR)
59         cp -r ../include/objson $(INCLUDEDIR)
60         cp -r javascript/* $(JSDIR)/
61         cp -r perlmods/* $(PERLDIR)/
62         mv $(INCLUDEDIR)/apachetools.h $(INCLUDEDIR)/opensrf/apachetools.h
63
64