Implement message queue and test program.
[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 trp/msgtst
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 check_PROGRAMS = common/t_constraint
16 TESTS = common/t_constraint
17
18 lib_LTLIBRARIES = libtr_tid.la
19
20 common_t_constraint_SOURCES = common/t_constraint.c
21 common_t_constraint_CPPFLAGS = $(AM_CPPFLAGS) -DTESTS=\"$(srcdir)/common/tests.json\"
22 common_t_constraint_LDADD = gsscon/libgsscon.la libtr_tid.la
23
24 tr_trust_router_SOURCES = tr/tr_main.c \
25 common/tr_config.c \
26 common/tr_idp.c \
27 common/tr_comm.c \
28 common/tr_filter.c \
29 common/tr_rp.c \
30 tr/tr.c \
31 tr/tr_event.c \
32 tr/tr_cfgwatch.c \
33 tr/tr_tid.c \
34 tr/tr_trp.c
35
36 tr_trust_router_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
37
38 tr_trpc_SOURCES = tr/trpc_main.c \
39 common/tr_rp.c \
40 tr/tr_trp.c
41
42 tr_trpc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
43
44 trp_msgtst_SOURCES = trp/msgtst.c \
45 trp/trp_upd.c \
46 trp/trp_req.c \
47 tid/tid_req.c \
48 tid/tid_resp.c \
49 common/tr_msg.c \
50 common/tr_name.c \
51 common/tr_idp.c \
52 common/tr_comm.c \
53 common/tr_filter.c \
54 common/tr_rp.c \
55 common/tr_config.c \
56 common/tr_debug.c 
57
58 trp_msgtst_LDADD = libtr_tid.la $(GLIB_LIBS)
59
60 tid_example_tidc_SOURCES = tid/example/tidc_main.c 
61
62 tid_example_tidc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
63
64 tid_example_tids_SOURCES = tid/example/tids_main.c 
65
66 tid_example_tids_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
67
68 common_dh_test_tr_dh_test_SOURCES = common/tr_dh.c \
69 common/tr_debug.c \
70 common/dh_test/dh_test.c
71
72 common_mq_test_mq_test_SOURCES = common/tr_mq.c \
73 common/mq_test/mq_test.c
74
75 common_mq_test_mq_test_LDFLAGS = -pthread -ltalloc
76
77 libtr_tid_la_SOURCES = tid/tids.c tid/tidc.c tid/tid_req.c tid/tid_resp.c \
78 $(common_srcs)
79
80 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
81 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
82 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2 -no-undefined
83
84 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
85         include/tr_debug.h \
86         include/trust_router/tr_dh.h \
87         include/trust_router/tr_constraint.h \
88         include/trust_router/tr_versioning.h 
89
90 noinst_HEADERS = include/gsscon.h include/tr_config.h \
91         include/tr_msg.h include/tr.h \
92         include/tr_idp.h include/tr_rp.h \
93         include/tr_comm.h include/tr_apc.h \
94         include/tr_tid.h include/tr_trp.h \
95         include/tr_filter.h \
96         include/tid_internal.h
97
98 pkgdata_DATA=schema.sql
99 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
100
101 if HAVE_SYSTEMD
102 systemdsystemunit_DATA = tids.service
103 endif
104
105 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
106         tr/manual.cfg tr/portal.cfg \
107         redhat/tids.init