Merge the following patches from Kevin Beswick:
[OpenSRF.git] / 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 if !DEBUG
16 MAYBE_DEBUG = -DNDEBUG
17 endif
18
19 export PREFIX                   = @prefix@
20 export TMP                      = @TMP@
21 export LIBXML2_HEADERS          = @LIBXML2_HEADERS@
22 export APR_HEADERS              = @APR_HEADERS@
23 export ETCDIR                   = @sysconfdir@
24 export APXS2                    = @APXS2@
25 export APACHE2_HEADERS          = @APACHE2_HEADERS@
26 export DEF_CFLAGS               = -D_LARGEFILE64_SOURCE $(MAYBE_DEBUG) -pipe -g -Wall -O2 -fPIC -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) @INCLUDES@
27 export DEF_LDLIBS               = -lobjson -lopensrf
28 export VAR                      = @localstatedir@
29 export PID                      = @localstatedir@/run/opensrf
30 export SOCK                     = @localstatedir@/lock/opensrf
31 export LOG                      = @localstatedir@/log/opensrf
32 export srcdir                   = @srcdir@
33
34 AM_CFLAGS = $(DEF_CFLAGS)
35
36 DOC_FILES = doc/Application-HOWTO.txt \
37             doc/dokuwiki-doc-stubber.pl \
38             doc/OpenSRF-Messaging-Protocol.html \
39             doc/Persist-API.html \
40             doc/Roadmap.txt
41
42 EXAMPLES_FILES = examples/fieldmapper2cdbi.xsl \
43                  examples/fieldmapper2javascript.xsl \
44                  examples/fieldmapper2perl.xsl \
45                  examples/gen-fieldmapper.xml \
46                  examples/math_bench.pl \
47                  examples/multisession-test.pl \
48                  examples/register.pl \
49                  examples/srfsh_config.xsd \
50                  examples/math_xul_client/math \
51                  examples/math_xul_client/install.js
52
53 strn_compat_FILES = src/ports/strn_compat/strndup.c \
54                     src/ports/strn_compat/strndup.h \
55                     src/ports/strn_compat/strnlen.c \
56                     src/ports/strn_compat/strnlen.h
57
58 python_FILES = src/python/opensrf.py \
59                src/python/setup.py \
60                src/python/srfsh.py \
61                src/python/osrf
62
63 java_FILES = src/java/deps.inc \
64              src/java/deps.sh \
65              src/java/org
66
67 libosrf_FILES = src/libopensrf/basic_client.c \
68                 src/libopensrf/osrf_big_hash.c \
69                 src/libopensrf/osrf_big_list.c \
70                 src/libopensrf/osrfConfig.c
71
72
73 EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript
74
75 objsonincludedir = @includedir@/objson
76 opensrfincludedir = @includedir@/opensrf
77
78 OBJINC=@srcdir@/include/objson
79 OSRFINC=@srcdir@/include/opensrf
80
81 opensrfinclude_HEADERS = $(OSRFINC)/log.h \
82                                 $(OSRFINC)/md5.h \
83                                 $(OSRFINC)/osrf_application.h \
84                                 $(OSRFINC)/osrf_app_session.h \
85                                 $(OSRFINC)/osrf_big_hash.h \
86                                 $(OSRFINC)/osrf_big_list.h \
87                                 $(OSRFINC)/osrf_cache.h \
88                                 $(OSRFINC)/osrfConfig.h \
89                                 $(OSRFINC)/osrf_hash.h \
90                                 $(OSRFINC)/osrf_json.h \
91                                 $(OSRFINC)/osrf_json_utils.h \
92                                 $(OSRFINC)/osrf_json_xml.h \
93                                 $(OSRFINC)/osrf_legacy_json.h \
94                                 $(OSRFINC)/osrf_list.h \
95                                 $(OSRFINC)/osrf_message.h \
96                                 $(OSRFINC)/osrf_prefork.h \
97                                 $(OSRFINC)/osrf_settings.h \
98                                 $(OSRFINC)/osrf_stack.h \
99                                 $(OSRFINC)/osrf_system.h \
100                                 $(OSRFINC)/osrf_transgroup.h \
101                                 $(OSRFINC)/sha.h \
102                                 $(OSRFINC)/socket_bundle.h \
103                                 $(OSRFINC)/string_array.h \
104                                 $(OSRFINC)/transport_client.h \
105                                 $(OSRFINC)/transport_message.h \
106                                 $(OSRFINC)/transport_session.h \
107                                 $(OSRFINC)/utils.h \
108                                 $(OSRFINC)/xml_utils.h
109
110 objsoninclude_HEADERS = $(OBJINC)/json2xml.h $(OBJINC)/json_parser.h $(OBJINC)/object.h $(OBJINC)/xml2json.h
111
112
113 SUBDIRS = src
114
115 jserver:
116         make -s -C src jserver
117
118 jserver-install:
119         make -s -C src jserver-install
120
121 javascript-install:
122         make -s -C src javascript-install
123
124 install-data-hook:
125         mv @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
126