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