Add a 'request_id' to TID requests and responses
[trust_router.git] / Makefile.am
1 DISTCHECK_CONFIGURE_FLAGS = \
2         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
3 bin_PROGRAMS= tr/trust_router tr/trpc tid/example/tidc tid/example/tids common/tests/tr_dh_test common/tests/mq_test \
4               common/tests/thread_test trp/msgtst trp/test/rtbl_test trp/test/ptbl_test common/tests/cfg_test \
5               common/tests/commtest common/tests/name_test common/tests/filt_test
6 AM_CPPFLAGS=-I$(srcdir)/include $(GLIB_CFLAGS)
7 AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror -Wno-parentheses $(GLIB_CFLAGS)
8 SUBDIRS = gsscon 
9 common_srcs = common/tr_name.c \
10         common/tr_constraint.c \
11         common/jansson_iterators.h \
12         common/tr_msg.c \
13         common/tr_dh.c \
14     common/tr_debug.c \
15         common/tr_util.c \
16         common/tr_apc.c \
17         common/tr_comm.c \
18         common/tr_rp.c \
19         common/tr_idp.c \
20         common/tr_filter.c \
21         common/tr_gss.c
22
23 tid_srcs = tid/tid_resp.c \
24 tid/tid_req.c \
25 tid/tids.c \
26 tid/tidc.c \
27 common/tr_rand_id.c
28
29 trp_srcs = trp/trp_conn.c \
30 trp/trps.c \
31 trp/trpc.c \
32 trp/trp_ptable.c \
33 trp/trp_rtable.c \
34 trp/trp_req.c \
35 trp/trp_upd.c \
36 common/tr_config.c \
37 common/tr_mq.c
38
39 check_PROGRAMS = common/t_constraint
40 TESTS = common/t_constraint
41 TEST_CFLAGS = -Wno-missing-prototypes
42
43 lib_LTLIBRARIES = libtr_tid.la
44
45 libtr_tid_la_SOURCES = $(tid_srcs) \
46 $(common_srcs) \
47 trp/trp_req.c \
48 trp/trp_upd.c
49
50 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
51 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
52 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:1:2 -no-undefined
53
54 common_t_constraint_SOURCES = common/t_constraint.c \
55 common/tr_debug.c \
56 common/tr_name.c \
57 common/tr_constraint.c \
58 common/tr_dh.c \
59 common/tr_rand_id.c \
60 tid/tid_req.c \
61 tid/tid_resp.c
62
63 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
64 common_t_constraint_LDADD = gsscon/libgsscon.la 
65
66 tr_trust_router_SOURCES =tr/tr_main.c \
67 tr/tr.c \
68 tr/tr_event.c \
69 tr/tr_cfgwatch.c \
70 tr/tr_tid.c \
71 tr/tr_trp.c \
72 $(tid_srcs) \
73 $(trp_srcs) \
74 $(common_srcs)
75
76 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
77 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
78 tr_trpc_SOURCES =tr/trpc_main.c \
79 tr/tr_trp.c \
80 $(trp_srcs) \
81 $(tid_srcs) \
82 $(common_srcs)
83
84 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
85 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
86
87 trp_msgtst_SOURCES = trp/msgtst.c \
88 $(common_srcs) \
89 common/tr_rand_id.c \
90 trp/trp_req.c \
91 trp/trp_upd.c \
92 tid/tid_resp.c \
93 tid/tid_req.c
94 trp_msgtst_LDADD =  $(GLIB_LIBS)
95
96 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
97 common/tr_name.c \
98 common/tr_gss.c \
99 common/tr_debug.c \
100 trp/trp_rtable.c
101 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
102
103 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
104 $(tid_srcs) \
105 $(trp_srcs) \
106 $(common_srcs)
107 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
108 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
109
110 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
111 $(tid_srcs) \
112 $(trp_srcs) \
113 $(common_srcs)
114 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
115 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
116
117 tid_example_tids_SOURCES = tid/example/tids_main.c \
118 $(tid_srcs) \
119 $(trp_srcs) \
120 $(common_srcs)
121 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
122 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
123
124 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
125 common/tr_debug.c \
126 common/tests/dh_test.c
127
128 common_tests_mq_test_SOURCES = common/tr_mq.c \
129 common/tests/mq_test.c \
130 common/tr_debug.c
131
132 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
133
134 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
135 $(common_srcs) \
136 $(tid_srcs) \
137 $(trp_srcs)
138 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
139 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
140
141 common_tests_thread_test_SOURCES = common/tr_mq.c \
142 common/tr_debug.c \
143 common/tests/thread_test.c
144
145 common_tests_commtest_SOURCES = common/tests/commtest.c \
146 $(common_srcs) \
147 $(tid_srcs) \
148 $(trp_srcs)
149 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
150 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
151
152 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
153
154 common_tests_name_test_SOURCES = common/tests/name_test.c \
155               $(common_srcs) \
156               $(tid_srcs) \
157               $(trp_srcs)
158 common_tests_name_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
159 common_tests_name_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
160 common_tests_name_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
161
162 common_tests_filt_test_SOURCES = common/tests/filt_test.c \
163               $(common_srcs) \
164               $(tid_srcs) \
165               $(trp_srcs)
166 common_tests_filt_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
167 common_tests_filt_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
168 common_tests_filt_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
169
170 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
171         include/tr_debug.h include/trust_router/trp.h \
172         include/trust_router/tr_dh.h \
173         include/trust_router/tr_constraint.h \
174         include/trust_router/tr_versioning.h 
175
176 noinst_HEADERS = include/gsscon.h include/tr_config.h \
177         include/tr_msg.h include/tr.h \
178         include/tr_idp.h include/tr_rp.h \
179         include/tr_comm.h include/tr_apc.h \
180         include/tr_tid.h include/tr_trp.h \
181         include/tr_filter.h include/tr_gss.h \
182         include/tid_internal.h include/trp_internal.h \
183         include/tr_cfgwatch.h include/tr_event.h \
184         include/tr_mq.h include/trp_ptable.h \
185         include/trp_rtable.h include/tr_util.h \
186         include/tr_name_internal.h
187
188 pkgdata_DATA=schema.sql
189 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
190
191 if HAVE_SYSTEMD
192 systemdsystemunit_DATA = tids.service
193 endif
194
195 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
196         tr/internal.cfg tr/organizations.cfg \
197         redhat/tids.init