]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/gateway/Makefile.am
d4f327da6ab2fdbad5a4871f387da9c93b41ec79
[OpenSRF.git] / src / gateway / 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 if APACHE_MIN_24
15 HAVE_APACHE_MIN_24 = -DAPACHE_MIN_24
16 endif
17
18 EXTRA_DIST = @srcdir@/apachetools.c @srcdir@/apachetools.h \
19         @srcdir@/osrf_json_gateway.c @srcdir@/osrf_http_translator.c  \
20         @srcdir@/osrf_websocket_translator.c
21
22 AM_CFLAGS = -D_LARGEFILE64_SOURCE $(HAVE_APACHE_MIN_24) -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS)
23 AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
24 AP_LIBEXECDIR = `$(APXS2) -q LIBEXECDIR`
25
26 DISTCLEANFILES = Makefile.in Makefile
27
28 install-exec-local: 
29         d=`$(APXS2) -q SYSCONFDIR` && \
30                 if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \
31                 then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
32                 >> $${d}/httpd.conf; \
33         fi
34         $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
35         $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so
36         $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_websocket_translator.c apachetools.c apachetools.h libopensrf.so
37         $(MKDIR_P) $(DESTDIR)$(AP_LIBEXECDIR)
38         if [ "$(DESTDIR)" ]; then \
39                 $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) @srcdir@/osrf_json_gateway.la; \
40                 $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) @srcdir@/osrf_http_translator.la; \
41         else \
42                 $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_json_gateway.la; \
43                 $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_http_translator.la; \
44         fi
45         $(APXS2) -n osrf_websocket_translator -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) @srcdir@/osrf_websocket_translator.la
46
47 clean-local:
48         rm -f @srcdir@/osrf_http_translator.la @srcdir@/osrf_http_translator.lo @srcdir@/osrf_http_translator.slo @srcdir@/osrf_json_gateway.la @srcdir@/osrf_json_gateway.lo @srcdir@/osrf_json_gateway.slo  @srcdir@/osrf_websocket_translator.la @srcdir@/osrf_websocket_translator.lo @srcdir@/osrf_websocket_translator.slo