Move TRP messaging to tr_msg.c. Fix old bug.
[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 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_msg.c \
46 tid/tid_req.c \
47 tid/tid_resp.c \
48 common/tr_name.c \
49 common/tr_msg.c \
50 common/tr_idp.c \
51 common/tr_comm.c \
52 common/tr_filter.c \
53 common/tr_rp.c \
54 common/tr_config.c \
55 common/tr_debug.c 
56
57 trp_msgtst_LDADD = libtr_tid.la $(GLIB_LIBS)
58
59 tid_example_tidc_SOURCES = tid/example/tidc_main.c 
60
61 tid_example_tidc_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
62
63 tid_example_tids_SOURCES = tid/example/tids_main.c 
64
65 tid_example_tids_LDADD = gsscon/libgsscon.la libtr_tid.la $(GLIB_LIBS)
66
67 common_dh_test_tr_dh_test_SOURCES = common/tr_dh.c \
68 common/tr_debug.c \
69 common/dh_test/dh_test.c
70
71 libtr_tid_la_SOURCES = tid/tids.c tid/tidc.c tid/tid_req.c tid/tid_resp.c \
72 $(common_srcs)
73
74 libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
75 libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
76 libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2 -no-undefined
77
78 pkginclude_HEADERS = include/trust_router/tid.h include/trust_router/tr_name.h \
79         include/tr_debug.h \
80         include/trust_router/tr_dh.h \
81         include/trust_router/tr_constraint.h \
82         include/trust_router/tr_versioning.h 
83
84 noinst_HEADERS = include/gsscon.h include/tr_config.h \
85         include/tr_msg.h include/tr.h \
86         include/tr_idp.h include/tr_rp.h \
87         include/tr_comm.h include/tr_apc.h \
88         include/tr_tid.h include/tr_trp.h \
89         include/tr_filter.h \
90         include/tid_internal.h
91
92 pkgdata_DATA=schema.sql
93 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
94
95 if HAVE_SYSTEMD
96 systemdsystemunit_DATA = tids.service
97 endif
98
99 EXTRA_DIST = trust_router.spec common/tests.json schema.sql tids.service \
100         tr/manual.cfg tr/portal.cfg \
101         redhat/tids.init