Bump package and ABI version numbers
[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 common/tests/filt_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 TEST_CFLAGS = -Wno-missing-prototypes
41
42 lib_LTLIBRARIES = libtr_tid.la
43
44 libtr_tid_la_SOURCES = $(tid_srcs) \
45 $(common_srcs) \
46 trp/trp_req.c \
47 trp/trp_upd.c
48
49 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
50 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
51 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:1:2 -no-undefined
52
53 common_t_constraint_SOURCES = common/t_constraint.c \
54 common/tr_debug.c \
55 common/tr_name.c \
56 common/tr_constraint.c \
57 common/tr_dh.c \
58 tid/tid_req.c \
59 tid/tid_resp.c
60
61 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
62 common_t_constraint_LDADD = gsscon/libgsscon.la 
63
64 tr_trust_router_SOURCES =tr/tr_main.c \
65 tr/tr.c \
66 tr/tr_event.c \
67 tr/tr_cfgwatch.c \
68 tr/tr_tid.c \
69 tr/tr_trp.c \
70 $(tid_srcs) \
71 $(trp_srcs) \
72 $(common_srcs)
73
74 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
75 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
76 tr_trpc_SOURCES =tr/trpc_main.c \
77 tr/tr_trp.c \
78 $(trp_srcs) \
79 $(tid_srcs) \
80 $(common_srcs)
81
82 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
83 tr_trpc_LDFLAGS = $(AM_LDFLAGS) -pthread
84
85 trp_msgtst_SOURCES = trp/msgtst.c \
86 $(common_srcs) \
87 trp/trp_req.c \
88 trp/trp_upd.c \
89 tid/tid_resp.c \
90 tid/tid_req.c
91 trp_msgtst_LDADD =  $(GLIB_LIBS)
92
93 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
94 common/tr_name.c \
95 common/tr_gss.c \
96 common/tr_debug.c \
97 trp/trp_rtable.c
98 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
99
100 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
101 $(tid_srcs) \
102 $(trp_srcs) \
103 $(common_srcs)
104 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
105 trp_test_ptbl_test_LDFLAGS = $(AM_LDFLAGS) -pthread
106
107 tid_example_tidc_SOURCES = tid/example/tidc_main.c \
108 $(tid_srcs) \
109 $(trp_srcs) \
110 $(common_srcs)
111 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
112 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
113
114 tid_example_tids_SOURCES = tid/example/tids_main.c \
115 $(tid_srcs) \
116 $(trp_srcs) \
117 $(common_srcs)
118 tid_example_tids_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
119 tid_example_tids_LDFLAGS = $(AM_LDFLAGS) -pthread
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 common/tr_debug.c
128
129 common_tests_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
130
131 common_tests_cfg_test_SOURCES = common/tests/cfg_test.c \
132 $(common_srcs) \
133 $(tid_srcs) \
134 $(trp_srcs)
135 common_tests_cfg_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
136 common_tests_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
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_commtest_SOURCES = common/tests/commtest.c \
143 $(common_srcs) \
144 $(tid_srcs) \
145 $(trp_srcs)
146 common_tests_commtest_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
147 common_tests_commtest_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
148
149 common_tests_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
150
151 common_tests_name_test_SOURCES = common/tests/name_test.c \
152               $(common_srcs) \
153               $(tid_srcs) \
154               $(trp_srcs)
155 common_tests_name_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
156 common_tests_name_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
157 common_tests_name_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
158
159 common_tests_filt_test_SOURCES = common/tests/filt_test.c \
160               $(common_srcs) \
161               $(tid_srcs) \
162               $(trp_srcs)
163 common_tests_filt_test_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
164 common_tests_filt_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc -pthread
165 common_tests_filt_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
166
167 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
168         include/tr_debug.h include/trust_router/trp.h \
169         include/trust_router/tr_dh.h \
170         include/trust_router/tr_constraint.h \
171         include/trust_router/tr_versioning.h 
172
173 noinst_HEADERS = include/gsscon.h include/tr_config.h \
174         include/tr_msg.h include/tr.h \
175         include/tr_idp.h include/tr_rp.h \
176         include/tr_comm.h include/tr_apc.h \
177         include/tr_tid.h include/tr_trp.h \
178         include/tr_filter.h include/tr_gss.h \
179         include/tid_internal.h include/trp_internal.h \
180         include/tr_cfgwatch.h include/tr_event.h \
181         include/tr_mq.h include/trp_ptable.h \
182         include/trp_rtable.h include/tr_util.h \
183         include/tr_name_internal.h
184
185 pkgdata_DATA=schema.sql
186 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
187
188 if HAVE_SYSTEMD
189 systemdsystemunit_DATA = tids.service
190 endif
191
192 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
193         tr/internal.cfg tr/organizations.cfg \
194         redhat/tids.init