Use json_is_true() in place of json_boolean_value() for compatibility
[trust_router.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 DISTCHECK_CONFIGURE_FLAGS = \
3         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
4 bin_PROGRAMS= tr/trust_router tr/trpc tid/example/tidc tid/example/tids common/tests/tr_dh_test common/tests/mq_test \
5               common/tests/thread_test trp/msgtst trp/test/rtbl_test trp/test/ptbl_test common/tests/cfg_test \
6               common/tests/commtest common/tests/name_test common/tests/filt_test mon/tests/test_mon_req_encode \
7               mon/tests/test_mon_req_decode mon/tests/test_mon_resp_encode tr/trmon
8 AM_CPPFLAGS=-I$(srcdir)/include $(GLIB_CFLAGS)
9 AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror -Wno-parentheses $(GLIB_CFLAGS)
10 SUBDIRS = gsscon 
11 common_srcs = common/tr_name.c \
12         common/tr_constraint.c \
13         common/jansson_iterators.h \
14         common/tr_msg.c \
15         common/tr_dh.c \
16     common/tr_debug.c \
17         common/tr_util.c \
18         common/tr_inet_util.c \
19         common/tr_apc.c \
20         common/tr_comm.c \
21         common/tr_comm_encoders.c \
22         common/tr_rp.c \
23         common/tr_rp_client.c \
24         common/tr_rp_client_encoders.c \
25         common/tr_idp.c \
26         common/tr_aaa_server.c \
27         common/tr_idp_encoders.c \
28         common/tr_filter.c \
29         common/tr_filter_encoders.c \
30         common/tr_gss_names.c \
31         common/tr_socket.c \
32         common/tr_list.c \
33         $(mon_srcs)
34
35 tid_srcs = tid/tid_resp.c \
36 tid/tid_req.c \
37 tid/tids.c \
38 tid/tidc.c \
39 common/tr_rand_id.c
40
41 trp_srcs = trp/trp_conn.c \
42 trp/trps.c \
43 trp/trpc.c \
44 trp/trp_peer.c \
45 trp/trp_peer_encoders.c \
46 trp/trp_ptable.c \
47 trp/trp_ptable_encoders.c \
48 trp/trp_route.c \
49 trp/trp_route_encoders.c \
50 trp/trp_rtable.c \
51 trp/trp_rtable_encoders.c \
52 trp/trp_req.c \
53 trp/trp_upd.c \
54 common/tr_mq.c \
55 $(config_srcs)
56
57 # configuration parsing sources
58 config_srcs = \
59     common/tr_config.c \
60     common/tr_config_comms.c \
61     common/tr_config_encoders.c \
62     common/tr_config_filters.c \
63     common/tr_config_internal.c \
64     common/tr_config_orgs.c \
65     common/tr_config_realms.c \
66     common/tr_config_rp_clients.c
67
68 # general monitoring message sources
69 mon_srcs =                   \
70     mon/mon_common.c         \
71     mon/mon_req.c            \
72     mon/mon_req_encode.c     \
73     mon/mon_req_decode.c     \
74     mon/mon_resp.c           \
75     mon/mon_resp_decode.c    \
76     mon/mon_resp_encode.c
77
78 # monitoring server sources
79 mons_srcs = \
80     mon/mons.c \
81     mon/mons_handlers.c
82
83 check_PROGRAMS = common/t_constraint
84 TESTS = common/t_constraint
85 TEST_CFLAGS = -Wno-missing-prototypes
86
87 lib_LTLIBRARIES = libtr_tid.la
88
89 libtr_tid_la_SOURCES = $(tid_srcs) \
90 $(common_srcs) \
91 trp/trp_req.c \
92 trp/trp_upd.c
93
94 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
95 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
96 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:2:2 -no-undefined
97
98 common_t_constraint_SOURCES = common/t_constraint.c \
99 common/tr_debug.c \
100 common/tr_name.c \
101 common/tr_list.c \
102 common/tr_constraint.c \
103 common/tr_dh.c \
104 common/tr_rand_id.c \
105 tid/tid_req.c \
106 tid/tid_resp.c
107
108 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
109 common_t_constraint_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
110
111 tr_trust_router_SOURCES =tr/tr_main.c \
112 tr/tr.c \
113 tr/tr_event.c \
114 tr/tr_cfgwatch.c \
115 tr/tr_tid.c \
116 tr/tr_tid_mons.c \
117 tr/tr_trp.c \
118 tr/tr_trp_mons.c \
119 tr/tr_mon.c \
120 common/tr_gss.c \
121 common/tr_gss_client.c \
122 $(tid_srcs) \
123 $(trp_srcs) \
124 $(common_srcs) \
125 $(mons_srcs)
126
127 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
128 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
129
130 tr_trpc_SOURCES =tr/trpc_main.c \
131 tr/tr_trp.c \
132 common/tr_gss.c \
133 common/tr_gss_client.c \
134 $(trp_srcs) \
135 $(tid_srcs) \
136 $(common_srcs)
137
138 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
139 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
140
141 tr_trmon_SOURCES = tr/trmon_main.c \
142 common/tr_gss.c \
143 common/tr_gss_client.c \
144 $(tid_srcs) \
145 $(trp_srcs) \
146 $(common_srcs) \
147 mon/monc.c
148
149 tr_trmon_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
150 tr_trmon_LDFLAGS = $(AM_LDFLAGS) -pthread
151
152 trp_msgtst_SOURCES = trp/msgtst.c \
153 $(common_srcs) \
154 common/tr_rand_id.c \
155 trp/trp_req.c \
156 trp/trp_upd.c \
157 tid/tid_resp.c \
158 tid/tid_req.c
159 trp_msgtst_LDADD =  $(GLIB_LIBS)
160
161 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
162 common/tr_name.c \
163 common/tr_gss_names.c \
164 common/tr_debug.c \
165 common/tr_util.c \
166 common/tr_inet_util.c \
167 common/tr_list.c \
168 trp/trp_route.c \
169 trp/trp_route_encoders.c \
170 trp/trp_rtable.c \
171 trp/trp_rtable_encoders.c
172 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
173
174 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
175 common/tr_gss.c \
176 common/tr_gss_client.c \
177 $(tid_srcs) \
178 $(trp_srcs) \
179 $(common_srcs)
180 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
181 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
182
183 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
184 common/tr_gss.c \
185 common/tr_gss_client.c \
186 $(tid_srcs) \
187 $(trp_srcs) \
188 $(common_srcs)
189 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
190 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
191
192 tid_example_tids_SOURCES = tid/example/tids_main.c \
193 common/tr_gss.c \
194 common/tr_gss_client.c \
195 $(tid_srcs) \
196 $(trp_srcs) \
197 $(common_srcs)
198 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
199 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
200
201 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
202 common/tr_debug.c \
203 common/tests/dh_test.c
204
205 common_tests_mq_test_SOURCES = common/tr_mq.c \
206 common/tests/mq_test.c \
207 common/tr_debug.c
208
209 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
210
211 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
212 $(common_srcs) \
213 common/tr_gss.c \
214 common/tr_gss_client.c \
215 $(tid_srcs) \
216 $(trp_srcs)
217 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
218 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
219
220 common_tests_thread_test_SOURCES = common/tr_mq.c \
221 common/tr_debug.c \
222 common/tests/thread_test.c
223
224 common_tests_commtest_SOURCES = common/tests/commtest.c \
225 $(common_srcs) \
226 common/tr_gss.c \
227 common/tr_gss_client.c \
228 $(tid_srcs) \
229 $(trp_srcs)
230 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
231 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
232
233 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
234
235 common_tests_name_test_SOURCES = common/tests/name_test.c \
236               $(common_srcs) \
237               common/tr_gss.c \
238               common/tr_gss_client.c \
239               $(tid_srcs) \
240               $(trp_srcs)
241 common_tests_name_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
242 common_tests_name_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
243 common_tests_name_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
244
245 common_tests_filt_test_SOURCES = common/tests/filt_test.c \
246               $(common_srcs) \
247               common/tr_gss.c \
248               common/tr_gss_client.c \
249               $(tid_srcs) \
250               $(trp_srcs)
251 common_tests_filt_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
252 common_tests_filt_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
253 common_tests_filt_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
254
255 mon_tests_test_mon_req_encode_SOURCES = mon/tests/test_mon_req_encode.c \
256     $(mon_srcs) \
257     common/tr_name.c
258 mon_tests_test_mon_req_encode_LDADD = $(GLIB_LIBS)
259 mon_tests_test_mon_req_encode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
260
261 mon_tests_test_mon_req_decode_SOURCES = mon/tests/test_mon_req_decode.c \
262     $(mon_srcs) \
263     common/tr_name.c
264 mon_tests_test_mon_req_decode_LDADD = $(GLIB_LIBS)
265 mon_tests_test_mon_req_decode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
266
267 mon_tests_test_mon_resp_encode_SOURCES = mon/tests/test_mon_resp_encode.c \
268     $(mon_srcs) \
269     common/tr_name.c
270 mon_tests_test_mon_resp_encode_LDADD = $(GLIB_LIBS)
271 mon_tests_test_mon_resp_encode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
272
273 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
274         include/tr_debug.h include/trust_router/trp.h \
275         include/trust_router/tr_dh.h \
276         include/trust_router/tr_constraint.h \
277         include/trust_router/tr_versioning.h 
278
279 noinst_HEADERS = include/gsscon.h \
280     include/tr_config.h include/tr_cfgwatch.h \
281         include/tr.h \
282         include/tr_msg.h \
283         include/tr_idp.h \
284         include/tr_aaa_server.h \
285         include/tr_rp.h include/tr_rp_client.h \
286         include/tr_comm.h \
287         include/tr_apc.h \
288         include/tr_tid.h include/tid_internal.h \
289         include/tr_trp.h include/trp_internal.h \
290     include/tr_mon.h include/mon.h include/mon_internal.h include/mons_handlers.h \
291         include/tr_filter.h \
292         include/tr_gss.h include/tr_gss_client.h \
293     include/tr_gss_names.h \
294         include/tr_event.h \
295         include/tr_mq.h \
296         include/trp_peer.h include/trp_ptable.h \
297         include/trp_route.h include/trp_rtable.h \
298         include/tr_list.h \
299         include/tr_name_internal.h \
300         include/tr_util.h include/tr_json_util.h include/tr_inet_util.h\
301         include/tr_rand_id.h include/tr_socket.h \
302         include/tr_constraint_internal.h
303
304 pkgdata_DATA=schema.sql
305 nobase_dist_pkgdata_DATA=redhat/init redhat/sysconfig redhat/organizations.cfg redhat/tidc-wrapper redhat/trust_router-wrapper redhat/tr-test-internal.cfg redhat/default-internal.cfg redhat/tids-wrapper redhat/sysconfig.tids
306
307 if HAVE_SYSTEMD
308 systemdsystemunit_DATA = tids.service
309 endif
310
311 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
312         tr/internal.cfg tr/organizations.cfg \
313         redhat/tids.init