New-style configuration file loading partially implemented.
[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/dh_test/tr_dh_test common/mq_test/mq_test common/mq_test/thread_test trp/msgtst trp/test/rtbl_test trp/test/ptbl_test common/cfg_test/cfg_test
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
15 tid_srcs = trp/trpc.c \
16 tid/tid_resp.c \
17 tid/tid_req.c \
18 tid/tids.c \
19 tid/tidc.c
20
21 trp_srcs = trp/trp_upd.c \
22 trp/trp_req.c \
23 trp/trp_conn.c \
24 trp/trps.c \
25 trp/trp_ptable.c \
26 trp/trp_rtable.c
27
28 check_PROGRAMS = common/t_constraint
29 TESTS = common/t_constraint
30
31 #lib_LTLIBRARIES = libtr_tid.la libtr_trp.la
32
33 common_t_constraint_SOURCES = common/t_constraint.c
34 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
35 common_t_constraint_LDADD = gsscon/libgsscon.la libtr_tid.la
36
37 tr_trust_router_SOURCES = $(common_srcs) \
38 tr/tr_main.c \
39 common/tr_config.c \
40 common/tr_idp.c \
41 common/tr_apc.c \
42 common/tr_comm.c \
43 common/tr_filter.c \
44 common/tr_rp.c \
45 common/tr_mq.c \
46 tr/tr.c \
47 tr/tr_event.c \
48 tr/tr_cfgwatch.c \
49 tr/tr_tid.c \
50 tr/tr_trp.c \
51 $(trp_srcs) \
52 $(tid_srcs)
53
54 tr_trust_router_CFLAGS = $(AM_CFLAGS) -pthread -v -da -Q
55 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads
56 #tr_trust_router_LDADD = gsscon/libgsscon.la libtr_tid.la libtr_trp.la $(GLIB_LIBS)
57 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
58
59 tr_trpc_SOURCES = $(common_srcs) \
60 tr/trpc_main.c \
61 common/tr_rp.c \
62 common/tr_mq.c \
63 tr/tr_trp.c \
64 $(trp_srcs) \
65 $(tid_srcs)
66
67 #tr_trpc_LDADD = gsscon/libgsscon.la libtr_tid.la libtr_trp.la $(GLIB_LIBS)
68 tr_trpc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
69
70 trp_msgtst_SOURCES = trp/msgtst.c \
71 trp/trp_upd.c \
72 trp/trp_req.c \
73 tid/tid_req.c \
74 tid/tid_resp.c \
75 common/tr_msg.c \
76 common/tr_name.c \
77 common/tr_idp.c \
78 common/tr_apc.c \
79 common/tr_comm.c \
80 common/tr_filter.c \
81 common/tr_rp.c \
82 common/tr_config.c \
83 common/tr_debug.c 
84
85 trp_msgtst_LDADD =  $(GLIB_LIBS)
86
87 trp_test_rtbl_test_SOURCES = trp/test/rtbl_test.c \
88 common/tr_name.c \
89 common/tr_debug.c \
90 trp/trp_rtable.c
91
92 trp_test_rtbl_test_LDADD =  $(GLIB_LIBS)
93
94 trp_test_ptbl_test_SOURCES = trp/test/ptbl_test.c \
95 $(common_srcs) \
96 $(trp_srcs) \
97 $(tid_srcs) \
98 common/tr_mq.c
99
100 trp_test_ptbl_test_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
101
102 tid_example_tidc_SOURCES = tid/example/tidc_main.c 
103
104 #tid_example_tidc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
105 tid_example_tidc_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
106
107 tid_example_tids_SOURCES = tid/example/tids_main.c 
108
109 #tid_example_tids_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
110 tid_example_tids_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
111
112 common_dh_test_tr_dh_test_SOURCES = common/tr_dh.c \
113 common/tr_debug.c \
114 common/dh_test/dh_test.c
115
116 common_mq_test_mq_test_SOURCES = common/tr_mq.c \
117 common/mq_test/mq_test.c
118
119 common_mq_test_mq_test_CFLAGS = -pthread
120 common_mq_test_mq_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
121
122 common_cfg_test_cfg_test_SOURCES = common/tr_config.c \
123 common/tr_rp.c \
124 common/tr_idp.c \
125 common/tr_filter.c \
126 common/tr_constraint.c \
127 common/tr_debug.c \
128 common/tr_name.c \
129 common/tr_apc.c \
130 common/tr_comm.c \
131 tid/tid_req.c \
132 common/cfg_test/cfg_test.c
133
134 common_cfg_test_cfg_test_CFLAGS = -pthread
135 common_cfg_test_cfg_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
136
137 common_mq_test_thread_test_SOURCES = common/tr_mq.c \
138 common/tr_debug.c \
139 common/mq_test/thread_test.c
140
141 common_mq_test_thread_test_CFLAGS = -pthread
142 common_mq_test_thread_test_LDFLAGS = $(AM_LDFLAGS) -ltalloc
143
144 # libtr_tid_la_SOURCES = tid/tids.c tid/tidc.c tid/tid_req.c tid/tid_resp.c \
145 # $(common_srcs)
146
147 # libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
148 # libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
149 # libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2 -no-undefined
150
151 # libtr_trp_la_SOURCES = trp/trps.c trp/trpc.c trp/trp_req.c trp/trp_upd.c trp/trp_conn.c \
152 # $(common_srcs)
153
154 # libtr_trp_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
155 # libtr_trp_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
156 # libtr_trp_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2 -no-undefined
157
158 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
159         include/tr_debug.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 \
170         include/tid_internal.h
171
172 pkgdata_DATA=schema.sql
173 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
174
175 if HAVE_SYSTEMD
176 systemdsystemunit_DATA = tids.service
177 endif
178
179 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
180         tr/manual.cfg tr/portal.cfg \
181         redhat/tids.init