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