Rename tr_gss.[ch] to tr_gss_names.[ch]
[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
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_rp.c \
21         common/tr_idp.c \
22         common/tr_filter.c \
23         common/tr_gss_names.c \
24         common/tr_socket.c
25
26 tid_srcs = tid/tid_resp.c \
27 tid/tid_req.c \
28 tid/tids.c \
29 tid/tidc.c
30
31 trp_srcs = trp/trp_conn.c \
32 trp/trps.c \
33 trp/trpc.c \
34 trp/trp_ptable.c \
35 trp/trp_rtable.c \
36 trp/trp_req.c \
37 trp/trp_upd.c \
38 common/tr_config.c \
39 common/tr_mq.c
40
41 mon_srcs =                      \
42     mon/mon_common.c                \
43     mon/mon_req.c            \
44     mon/mon_req_encode.c     \
45     mon/mon_req_decode.c     \
46     mon/mon_resp.c           \
47     mon/mon_resp_encode.c
48
49 check_PROGRAMS = common/t_constraint
50 TESTS = common/t_constraint
51 TEST_CFLAGS = -Wno-missing-prototypes
52
53 lib_LTLIBRARIES = libtr_tid.la
54
55 libtr_tid_la_SOURCES = $(tid_srcs) \
56 $(common_srcs) \
57 trp/trp_req.c \
58 trp/trp_upd.c
59
60 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
61 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
62 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:1:2 -no-undefined
63
64 common_t_constraint_SOURCES = common/t_constraint.c \
65 common/tr_debug.c \
66 common/tr_name.c \
67 common/tr_constraint.c \
68 common/tr_dh.c \
69 tid/tid_req.c \
70 tid/tid_resp.c
71
72 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
73 common_t_constraint_LDADD = gsscon/libgsscon.la 
74
75 tr_trust_router_SOURCES =tr/tr_main.c \
76 tr/tr.c \
77 tr/tr_event.c \
78 tr/tr_cfgwatch.c \
79 tr/tr_tid.c \
80 tr/tr_trp.c \
81 $(tid_srcs) \
82 $(trp_srcs) \
83 $(common_srcs)
84
85 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
86 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
87 tr_trpc_SOURCES =tr/trpc_main.c \
88 tr/tr_trp.c \
89 $(trp_srcs) \
90 $(tid_srcs) \
91 $(common_srcs)
92
93 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
94 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
95
96 trp_msgtst_SOURCES = trp/msgtst.c \
97 $(common_srcs) \
98 trp/trp_req.c \
99 trp/trp_upd.c \
100 tid/tid_resp.c \
101 tid/tid_req.c
102 trp_msgtst_LDADD =  $(GLIB_LIBS)
103
104 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
105 common/tr_name.c \
106 common/tr_gss_names.c \
107 common/tr_debug.c \
108 trp/trp_rtable.c
109 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
110
111 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
112 $(tid_srcs) \
113 $(trp_srcs) \
114 $(common_srcs)
115 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
116 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
117
118 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
119 $(tid_srcs) \
120 $(trp_srcs) \
121 $(common_srcs)
122 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
123 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
124
125 tid_example_tids_SOURCES = tid/example/tids_main.c \
126 $(tid_srcs) \
127 $(trp_srcs) \
128 $(common_srcs)
129 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
130 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
131
132 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
133 common/tr_debug.c \
134 common/tests/dh_test.c
135
136 common_tests_mq_test_SOURCES = common/tr_mq.c \
137 common/tests/mq_test.c \
138 common/tr_debug.c
139
140 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
141
142 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
143 $(common_srcs) \
144 $(tid_srcs) \
145 $(trp_srcs)
146 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
147 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
148
149 common_tests_thread_test_SOURCES = common/tr_mq.c \
150 common/tr_debug.c \
151 common/tests/thread_test.c
152
153 common_tests_commtest_SOURCES = common/tests/commtest.c \
154 $(common_srcs) \
155 $(tid_srcs) \
156 $(trp_srcs)
157 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
158 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
159
160 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
161
162 common_tests_name_test_SOURCES = common/tests/name_test.c \
163               $(common_srcs) \
164               $(tid_srcs) \
165               $(trp_srcs)
166 common_tests_name_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
167 common_tests_name_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
168 common_tests_name_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
169
170 common_tests_filt_test_SOURCES = common/tests/filt_test.c \
171               $(common_srcs) \
172               $(tid_srcs) \
173               $(trp_srcs)
174 common_tests_filt_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
175 common_tests_filt_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
176 common_tests_filt_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
177
178 mon_tests_test_mon_req_encode_SOURCES = mon/tests/test_mon_req_encode.c \
179     $(mon_srcs) \
180     common/tr_name.c
181 mon_tests_test_mon_req_encode_LDADD = $(GLIB_LIBS)
182 mon_tests_test_mon_req_encode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
183
184 mon_tests_test_mon_req_decode_SOURCES = mon/tests/test_mon_req_decode.c \
185     $(mon_srcs) \
186     common/tr_name.c
187 mon_tests_test_mon_req_decode_LDADD = $(GLIB_LIBS)
188 mon_tests_test_mon_req_decode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
189
190 mon_tests_test_mon_resp_encode_SOURCES = mon/tests/test_mon_resp_encode.c \
191     $(mon_srcs) \
192     common/tr_name.c
193 mon_tests_test_mon_resp_encode_LDADD = $(GLIB_LIBS)
194 mon_tests_test_mon_resp_encode_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
195
196 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
197         include/tr_debug.h include/trust_router/trp.h \
198         include/trust_router/tr_dh.h \
199         include/trust_router/tr_constraint.h \
200         include/trust_router/tr_versioning.h 
201
202 noinst_HEADERS = include/gsscon.h include/tr_config.h \
203         include/tr_msg.h include/tr.h \
204         include/tr_idp.h include/tr_rp.h \
205         include/tr_comm.h include/tr_apc.h \
206         include/tr_tid.h include/tr_trp.h \
207         include/tr_filter.h include/tr_gss_names.h \
208         include/tid_internal.h include/trp_internal.h \
209         include/tr_cfgwatch.h include/tr_event.h \
210         include/tr_mq.h include/trp_ptable.h \
211         include/trp_rtable.h include/tr_util.h \
212         include/tr_name_internal.h
213
214 pkgdata_DATA=schema.sql
215 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
216
217 if HAVE_SYSTEMD
218 systemdsystemunit_DATA = tids.service
219 endif
220
221 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
222         tr/internal.cfg tr/organizations.cfg \
223         redhat/tids.init