]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/libopensrf/Makefile.am
Merge the following patches from Kevin Beswick:
[OpenSRF.git] / src / libopensrf / 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 AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS  -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing -DOSRF_JSON_ENABLE_XML_UTILS
16 AM_LDFLAGS = $(DEF_LDFLAGS)
17 LDADD = -lxml2 -ldl -lmemcache -lopensrf -lobjson
18
19 OSRF_INC = @top_srcdir@/include/opensrf
20
21 TARGS =                 osrf_message.c \
22                         osrf_app_session.c \
23                         osrf_stack.c \
24                         osrf_system.c \
25                         osrf_settings.c \
26                         osrf_prefork.c \
27                         osrfConfig.c \
28                         osrf_application.c \
29                         osrf_cache.c \
30                         osrf_transgroup.c \
31                         osrf_list.c \
32                         osrf_hash.c \
33                         xml_utils.c \
34                         transport_message.c\
35                         transport_session.c\
36                         transport_client.c\
37                         md5.c\
38                         log.c\
39                         utils.c\
40                         socket_bundle.c\
41                         sha.c\
42                         string_array.c
43
44 TARGS_HEADS =    $(OSRF_INC)/transport_message.h \
45                  $(OSRF_INC)/transport_session.h \
46                  $(OSRF_INC)/transport_client.h \
47                  $(OSRF_INC)/osrf_message.h \
48                  $(OSRF_INC)/osrf_app_session.h \
49                  $(OSRF_INC)/osrf_stack.h \
50                  $(OSRF_INC)/osrf_system.h \
51                  $(OSRF_INC)/osrf_settings.h \
52                  $(OSRF_INC)/osrf_prefork.h \
53                  $(OSRF_INC)/osrfConfig.h \
54                  $(OSRF_INC)/osrf_application.h \
55                  $(OSRF_INC)/osrf_cache.h \
56                  $(OSRF_INC)/osrf_list.h \
57                  $(OSRF_INC)/osrf_hash.h \
58                  $(OSRF_INC)/md5.h \
59                  $(OSRF_INC)/log.h \
60                  $(OSRF_INC)/utils.h \
61                  $(OSRF_INC)/socket_bundle.h \
62                  $(OSRF_INC)/sha.h \
63                  $(OSRF_INC)/string_array.h \
64                  $(OSRF_INC)/osrf_json_utils.h \
65                  $(OSRF_INC)/osrf_json_xml.h 
66
67 JSON_TARGS =                    osrf_json_object.c\
68                                 osrf_json_parser.c \
69                                 osrf_json_tools.c \
70                                 osrf_legacy_json.c \
71                                 osrf_json_xml.c
72
73 # use these when building the standalone JSON module
74 JSON_DEP =              osrf_list.c\
75                         osrf_hash.c\
76                         utils.c\
77                         log.c\
78                         md5.c\
79                         string_array.c
80
81 JSON_TARGS_HEADS =      $(OSRF_INC)/osrf_legacy_json.h \
82                         $(OSRF_INC)/osrf_json_xml.h
83
84 JSON_DEP_HEADS =        $(OSRF_INC)/osrf_list.h \
85                         $(OSRF_INC)/osrf_hash.h \
86                         $(OSRF_INC)/utils.h \
87                         $(OSRF_INC)/log.h \
88                         $(OSRF_INC)/md5.h \
89                         $(OSRF_INC)/string_array.h
90
91 noinst_PROGRAMS = osrf_json_test
92
93 bin_PROGRAMS = opensrf
94 opensrf_SOURCES = opensrf.c
95 opensrf_DEPENDENCIES = libopensrf.la
96
97 osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
98
99 noinst_LTLIBRARIES = libosrf_json.la
100 lib_LTLIBRARIES = libobjson.la libopensrf.la
101
102 if BUILDJSON
103 libobjson_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
104 libobjson_la_CFLAGS = $(AM_CFLAGS)
105 endif
106
107 libosrf_json_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
108 libosrf_json_la_CFLAGS = $(AM_CFLAGS)
109
110 if BUILDJSON
111 libosrf_json_la_DEPENDENCIES = libobjson.la
112 endif
113
114 libopensrf_la_CFLAGS = $(AM_CFLAGS)
115 libopensrf_la_DEPENDENCIES = libosrf_json.la
116
117 if BUILDJSON
118 libopensrf_la_SOURCES = $(TARGS) $(TARGS_HEADS)
119 else
120 libopensrf_la_SOURCES = $(TARGS) $(TARGS_HEADS) $(JSON_TARGS) $(JSON_TARGS_HEADS)
121 endif
122