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