In-progress check-in.
[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
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
28 trp_srcs = trp/trp_conn.c \
29 trp/trps.c \
30 trp/trpc.c \
31 trp/trp_ptable.c \
32 trp/trp_rtable.c \
33 trp/trp_req.c \
34 trp/trp_upd.c \
35 common/tr_config.c \
36 common/tr_mq.c
37
38 check_PROGRAMS = common/t_constraint
39 TESTS = common/t_constraint
40
41 lib_LTLIBRARIES = libtr_tid.la
42
43 libtr_tid_la_SOURCES = $(tid_srcs) \
44 $(common_srcs) \
45 trp/trp_req.c \
46 trp/trp_upd.c
47
48 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
49 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
50 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 3:0:1 -no-undefined
51
52 common_t_constraint_SOURCES = common/t_constraint.c \
53 common/tr_debug.c \
54 common/tr_name.c \
55 common/tr_constraint.c \
56 common/tr_dh.c \
57 tid/tid_req.c \
58 tid/tid_resp.c
59
60 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
61 common_t_constraint_LDADD = gsscon/libgsscon.la 
62
63 tr_trust_router_SOURCES =tr/tr_main.c \
64 tr/tr.c \
65 tr/tr_event.c \
66 tr/tr_cfgwatch.c \
67 tr/tr_tid.c \
68 tr/tr_trp.c \
69 $(tid_srcs) \
70 $(trp_srcs) \
71 $(common_srcs)
72
73 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
74 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
75 tr_trpc_SOURCES =tr/trpc_main.c \
76 tr/tr_trp.c \
77 $(trp_srcs) \
78 $(tid_srcs) \
79 $(common_srcs)
80
81 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
82 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
83
84 trp_msgtst_SOURCES = trp/msgtst.c \
85 $(common_srcs) \
86 trp/trp_req.c \
87 trp/trp_upd.c \
88 tid/tid_resp.c \
89 tid/tid_req.c
90 trp_msgtst_LDADD =  $(GLIB_LIBS)
91
92 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
93 common/tr_name.c \
94 common/tr_gss.c \
95 common/tr_debug.c \
96 trp/trp_rtable.c
97 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
98
99 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
100 $(tid_srcs) \
101 $(trp_srcs) \
102 $(common_srcs)
103 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
104 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
105
106 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
107 $(tid_srcs) \
108 $(trp_srcs) \
109 $(common_srcs)
110 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
111 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
112
113 tid_example_tids_SOURCES = tid/example/tids_main.c \
114 $(tid_srcs) \
115 $(trp_srcs) \
116 $(common_srcs)
117 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
118 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
119
120 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
121 common/tr_debug.c \
122 common/tests/dh_test.c
123
124 common_tests_mq_test_SOURCES = common/tr_mq.c \
125 common/tests/mq_test.c \
126 common/tr_debug.c
127
128 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
129
130 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
131 $(common_srcs) \
132 $(tid_srcs) \
133 $(trp_srcs)
134 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
135 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
136
137 common_tests_thread_test_SOURCES = common/tr_mq.c \
138 common/tr_debug.c \
139 common/tests/thread_test.c
140
141 common_tests_commtest_SOURCES = common/tests/commtest.c \
142 $(common_srcs) \
143 $(tid_srcs) \
144 $(trp_srcs)
145 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
146 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
147
148 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
149
150 common_tests_name_test_SOURCES = common/tests/name_test.c \
151               $(common_srcs) \
152               $(tid_srcs) \
153               $(trp_srcs)
154 common_tests_name_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
155 common_tests_name_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
156
157
158 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
159         include/tr_debug.h include/trust_router/trp.h \
160         include/trust_router/tr_dh.h \
161         include/trust_router/tr_constraint.h \
162         include/trust_router/tr_versioning.h 
163
164 noinst_HEADERS = include/gsscon.h include/tr_config.h \
165         include/tr_msg.h include/tr.h \
166         include/tr_idp.h include/tr_rp.h \
167         include/tr_comm.h include/tr_apc.h \
168         include/tr_tid.h include/tr_trp.h \
169         include/tr_filter.h include/tr_gss.h \
170         include/tid_internal.h include/trp_internal.h \
171         include/tr_cfgwatch.h include/tr_event.h \
172         include/tr_mq.h include/trp_ptable.h \
173         include/trp_rtable.h include/tr_util.h
174
175 pkgdata_DATA=schema.sql
176 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
177
178 if HAVE_SYSTEMD
179 systemdsystemunit_DATA = tids.service
180 endif
181
182 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
183         tr/internal.cfg tr/organizations.cfg \
184         redhat/tids.init