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