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