Update test programs. All now succeed.
[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 common/tr_config.c \
34 common/tr_mq.c
35
36 check_PROGRAMS = common/t_constraint
37 TESTS = common/t_constraint
38
39 common_t_constraint_SOURCES = common/t_constraint.c \
40 common/tr_debug.c \
41 common/tr_name.c \
42 common/tr_constraint.c \
43 tid/tid_req.c \
44 tid/tid_resp.c
45
46 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
47 common_t_constraint_LDADD = gsscon/libgsscon.la 
48
49 tr_trust_router_SOURCES =tr/tr_main.c \
50 tr/tr.c \
51 tr/tr_event.c \
52 tr/tr_cfgwatch.c \
53 tr/tr_tid.c \
54 tr/tr_trp.c \
55 $(tid_srcs) \
56 $(trp_srcs) \
57 $(common_srcs)
58
59 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
60 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
61 tr_trpc_SOURCES =tr/trpc_main.c \
62 tr/tr_trp.c \
63 $(trp_srcs) \
64 $(tid_srcs) \
65 $(common_srcs)
66
67 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
68 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
69
70 trp_msgtst_SOURCES = trp/msgtst.c \
71 $(common_srcs) \
72 trp/trp_req.c \
73 trp/trp_upd.c \
74 tid/tid_resp.c \
75 tid/tid_req.c
76 trp_msgtst_LDADD =  $(GLIB_LIBS)
77
78 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
79 common/tr_name.c \
80 common/tr_gss.c \
81 common/tr_debug.c \
82 trp/trp_rtable.c
83 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
84
85 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
86 $(tid_srcs) \
87 $(trp_srcs) \
88 $(common_srcs)
89 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
90 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
91
92 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
93 $(tid_srcs) \
94 $(trp_srcs) \
95 $(common_srcs)
96 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
97 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
98
99 tid_example_tids_SOURCES = tid/example/tids_main.c \
100 $(tid_srcs) \
101 $(trp_srcs) \
102 $(common_srcs)
103 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
104 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
105
106 common_tests_tr_dh_test_SOURCES = common/tr_dh.c \
107 common/tr_debug.c \
108 common/tests/dh_test.c
109
110 common_tests_mq_test_SOURCES = common/tr_mq.c \
111 common/tests/mq_test.c \
112 common/tr_debug.c
113
114 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
115
116 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
117 $(common_srcs) \
118 $(tid_srcs) \
119 $(trp_srcs)
120 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
121 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
122
123 common_tests_thread_test_SOURCES = common/tr_mq.c \
124 common/tr_debug.c \
125 common/tests/thread_test.c
126
127 common_tests_commtest_SOURCES = common/tests/commtest.c \
128 $(common_srcs) \
129 $(tid_srcs) \
130 $(trp_srcs)
131 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
132 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
133
134 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
135
136 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
137         include/tr_debug.h \
138         include/trust_router/tr_dh.h \
139         include/trust_router/tr_constraint.h \
140         include/trust_router/tr_versioning.h 
141
142 noinst_HEADERS = include/gsscon.h include/tr_config.h \
143         include/tr_msg.h include/tr.h \
144         include/tr_idp.h include/tr_rp.h \
145         include/tr_comm.h include/tr_apc.h \
146         include/tr_tid.h include/tr_trp.h \
147         include/tr_filter.h \
148         include/tid_internal.h
149
150 pkgdata_DATA=schema.sql
151 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
152
153 if HAVE_SYSTEMD
154 systemdsystemunit_DATA = tids.service
155 endif
156
157 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
158         tr/manual.cfg tr/portal.cfg \
159         redhat/tids.init