Add IPv6 support to tids.
[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 common/tests/thread_test trp/msgtst trp/test/rtbl_test trp/test/ptbl_test common/tests/cfg_test common/tests/commtest
4 AM_CPPFLAGS=-I$(srcdir)/include $(GLIB_CFLAGS)
5 AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror -Wno-parentheses $(GLIB_CFLAGS)
6 SUBDIRS = gsscon 
7 common_srcs = common/tr_name.c \
8         common/tr_constraint.c \
9         common/jansson_iterators.h \
10         common/tr_msg.c \
11         common/tr_dh.c \
12         common/tr_debug.c \
13         common/tr_util.c \
14         common/tr_apc.c \
15         common/tr_comm.c \
16         common/tr_rp.c \
17         common/tr_idp.c \
18         common/tr_filter.c \
19         common/tr_gss.c
20
21 tid_srcs = tid/tid_resp.c \
22 tid/tid_req.c \
23 tid/tids.c \
24 tid/tidc.c
25
26 trp_srcs = trp/trp_conn.c \
27 trp/trps.c \
28 trp/trpc.c \
29 trp/trp_ptable.c \
30 trp/trp_rtable.c \
31 trp/trp_req.c \
32 trp/trp_upd.c \
33 tid/tid_resp.c \
34 tid/tid_req.c \
35 common/tr_gss.c \
36 common/tr_config.c \
37 common/tr_idp.c \
38 common/tr_apc.c \
39 common/tr_comm.c \
40 common/tr_filter.c \
41 common/tr_rp.c \
42 common/tr_msg.c \
43 common/tr_constraint.c \
44 common/tr_name.c \
45 common/tr_mq.c
46
47 check_PROGRAMS = common/t_constraint
48 TESTS = common/t_constraint
49
50 lib_LTLIBRARIES = libtr_tid.la
51
52 libtr_tid_la_SOURCES = $(tid_srcs) \
53 $(common_srcs) \
54 trp/trp_req.c \
55 trp/trp_upd.c
56
57 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
58 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
59 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2 -no-undefined
60
61 common_t_constraint_SOURCES = common/t_constraint.c \
62 common/tr_debug.c \
63 common/tr_name.c \
64 common/tr_constraint.c \
65 tid/tid_req.c \
66 tid/tid_resp.c
67
68 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
69 common_t_constraint_LDADD = gsscon/libgsscon.la 
70
71 tr_trust_router_SOURCES =tr/tr_main.c \
72 tr/tr.c \
73 tr/tr_event.c \
74 tr/tr_cfgwatch.c \
75 tr/tr_tid.c \
76 tr/tr_trp.c \
77 $(trp_srcs)
78
79 tr_trust_router_CFLAGS = $(AM_CFLAGS) -pthread
80 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
81 tr_trust_router_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
82
83 tr_trpc_SOURCES =tr/trpc_main.c \
84 tr/tr_trp.c \
85 $(trp_srcs)
86 tr_trpc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
87 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
88 tr_trpc_CFLAGS = $(AM_CFLAGS) -pthread
89
90 trp_msgtst_SOURCES = trp/msgtst.c \
91 common/tr_msg.c \
92 common/tr_comm.c \
93 common/tr_apc.c \
94 common/tr_rp.c \
95 common/tr_idp.c \
96 common/tr_gss.c \
97 common/tr_filter.c \
98 trp/trp_req.c \
99 trp/trp_upd.c \
100 tid/tid_resp.c \
101 tid/tid_req.c
102 trp_msgtst_LDADD = libtr_tid.la $(GLIB_LIBS)
103
104 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
105 common/tr_name.c \
106 common/tr_gss.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 $(trp_srcs) 
113 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
114
115 tid_example_tidc_SOURCES = tid/example/tidc_main.c
116 tid_example_tidc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
117
118 tid_example_tids_SOURCES = tid/example/tids_main.c
119 tid_example_tids_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
120
121 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
122 common/tr_debug.c \
123 common/tests/dh_test.c
124
125 common_tests_mq_test_SOURCES = common/tr_mq.c \
126 common/tests/mq_test.c
127
128 common_tests_mq_test_CFLAGS = -pthread
129 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
130
131 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
132 $(trp_srcs)
133
134 common_tests_cfg_test_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
135 common_tests_cfg_test_CFLAGS = -pthread
136 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
137
138 common_tests_thread_test_SOURCES = common/tr_mq.c \
139 common/tr_debug.c \
140 common/tests/thread_test.c
141
142 common_tests_thread_test_CFLAGS = -pthread
143 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
144
145 common_tests_commtest_SOURCES = common/tests/commtest.c \
146 $(trp_srcs)
147 common_tests_commtest_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
148 common_tests_commtest_CFLAGS = -pthread
149 common_test_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc
150
151 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
152         include/tr_debug.h \
153         include/trust_router/tr_dh.h \
154         include/trust_router/tr_constraint.h \
155         include/trust_router/tr_versioning.h 
156
157 noinst_HEADERS = include/gsscon.h include/tr_config.h \
158         include/tr_msg.h include/tr.h \
159         include/tr_idp.h include/tr_rp.h \
160         include/tr_comm.h include/tr_apc.h \
161         include/tr_tid.h include/tr_trp.h \
162         include/tr_filter.h \
163         include/tid_internal.h
164
165 pkgdata_DATA=schema.sql
166 nobase_dist_pkgdata_DATA=redhat/init redhat/sysconfig redhat/trusts.cfg redhat/tidc-wrapper redhat/trust_router-wrapper redhat/tr-test-main.cfg redhat/default-main.cfg redhat/tids-wrapper redhat/sysconfig.tids
167
168 if HAVE_SYSTEMD
169 systemdsystemunit_DATA = tids.service
170 endif
171
172 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
173         tr/manual.cfg tr/portal.cfg \
174         redhat/tids.init