summaryrefslogtreecommitdiff
path: root/src/checksum/Makefile.am
blob: a22e91ed1ff3da2039ff01133911fab0f26f95c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# this lib is not built until make install is called (see rules at the bottom)
EXTRA_LTLIBRARIES = libchecksum.la
ipseclib_LTLIBRARIES = $(LIBCHECKSUM_LIBS)
nodist_libchecksum_la_SOURCES = checksum.c
libchecksum_la_LDFLAGS = -module -avoid-version -rpath '$(ipseclibdir)'

noinst_PROGRAMS = checksum_builder
checksum_builder_SOURCES = checksum_builder.c
checksum_builder_LDADD = \
	$(top_builddir)/src/libstrongswan/libstrongswan.la \
	$(top_builddir)/src/libhydra/libhydra.la \
	$(top_builddir)/src/libcharon/libcharon.la \
	$(DLLIB)

CLEANFILES = checksum.c

AM_CPPFLAGS = \
	-I$(top_srcdir)/src/libstrongswan \
	-I$(top_srcdir)/src/libhydra \
	-I$(top_srcdir)/src/libcharon \
	-DPLUGINDIR=\"${DESTDIR}${plugindir}\"

AM_CFLAGS = \
	-rdynamic

# we keep track of build dependencies in deps and use libs to store the paths
# to the installed libraries. for executables we use the built files directly
# as these are not relinked during installation.
deps = $(top_builddir)/src/libstrongswan/libstrongswan.la
libs = $(DESTDIR)$(ipseclibdir)/libstrongswan.so
exes =

if !MONOLITHIC
  AM_CPPFLAGS += -DS_PLUGINS=\""${s_plugins}\""
endif

if USE_LIBHYDRA
  deps += $(top_builddir)/src/libhydra/libhydra.la
  libs += $(DESTDIR)$(ipseclibdir)/libhydra.so
if !MONOLITHIC
  AM_CPPFLAGS += -DH_PLUGINS=\""${h_plugins}\""
endif
endif

if USE_LIBIPSEC
  deps += $(top_builddir)/src/libipsec/libipsec.la
  libs += $(DESTDIR)$(ipseclibdir)/libipsec.so
endif

if USE_TLS
  deps += $(top_builddir)/src/libtls/libtls.la
  libs += $(DESTDIR)$(ipseclibdir)/libtls.so
endif

if USE_RADIUS
  deps += $(top_builddir)/src/libradius/libradius.la
  libs += $(DESTDIR)$(ipseclibdir)/libradius.so
endif

if USE_LIBPTTLS
  deps += $(top_builddir)/src/libpttls/libpttls.la
  libs += $(DESTDIR)$(ipseclibdir)/libpttls.so
endif

if USE_LIBTNCCS
  deps += $(top_builddir)/src/libtnccs/libtnccs.la
  libs += $(DESTDIR)$(ipseclibdir)/libtnccs.so
if !MONOLITHIC
  AM_CPPFLAGS += -DT_PLUGINS=\""${t_plugins}\""
endif
endif

if USE_SIMAKA
  deps += $(top_builddir)/src/libsimaka/libsimaka.la
  libs += $(DESTDIR)$(ipseclibdir)/libsimaka.so
endif

if USE_IMCV
  deps += $(top_builddir)/src/libimcv/libimcv.la
  libs += $(DESTDIR)$(ipseclibdir)/libimcv.so
endif

if USE_PTS
  deps += $(top_builddir)/src/libpts/libpts.la
  libs += $(DESTDIR)$(ipseclibdir)/libpts.so
endif

if USE_CHARON
  deps += $(top_builddir)/src/libcharon/libcharon.la
  libs += $(DESTDIR)$(ipseclibdir)/libcharon.so
  exes += $(top_builddir)/src/charon/.libs/charon
if !MONOLITHIC
  AM_CPPFLAGS += -DC_PLUGINS=\""${c_plugins}\""
endif
endif

if USE_CMD
  exes += $(top_builddir)/src/charon-cmd/.libs/charon-cmd
endif

if USE_TOOLS
  exes += $(top_builddir)/src/openac/.libs/openac
  exes += $(top_builddir)/src/pki/.libs/pki
  exes += $(top_builddir)/src/scepclient/.libs/scepclient
endif

if USE_ATTR_SQL
  exes += $(top_builddir)/src/pool/.libs/pool
endif

if USE_IMV_ATTESTATION
  exes += $(top_builddir)/src/libpts/plugins/imv_attestation/.libs/attest
endif

checksum.c : checksum_builder $(deps) $(exes)
		./checksum_builder $(libs) $(exes) > checksum.c

install-data-hook : $(EXTRA_LTLIBRARIES)
	$(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES

uninstall-hook :
	$(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES

clean-local :
	$(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES