forked from rauc/rauc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
208 lines (168 loc) · 5.57 KB
/
Makefile.am
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AUTOMAKE_OPTIONS = color-tests parallel-tests
EXTRA_DIST = $(top_srcdir)/.version
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
CODE_COVERAGE_IGNORE_PATTERN = "*-generated.c"
@CODE_COVERAGE_RULES@
@VALGRIND_CHECK_RULES@
AM_CFLAGS = -DG_LOG_DOMAIN=\"rauc\" $(WARN_CFLAGS) $(GLIB_CFLAGS) $(CURL_CFLAGS)
AM_LDFLAGS = $(WARN_LDFLAGS) $(GLIB_LDFLAGS) $(CURL_LDFLAGS) $(OPENSSL_LDFLAGS)
AM_CPPFLAGS = -I${top_srcdir}/include $(OPENSSL_INCLUDES)
gdbus_installer_generated = \
rauc-installer-generated.c \
rauc-installer-generated.h
BUILT_SOURCES += $(gdbus_installer_generated)
EXTRA_DIST += src/rauc-installer.xml
$(gdbus_installer_generated): src/rauc-installer.xml
$(AM_V_GEN) gdbus-codegen \
--generate-c-code rauc-installer-generated \
--c-namespace R \
--interface-prefix de.pengutronix.rauc. \
$<
noinst_LTLIBRARIES = librauc.la
librauc_la_SOURCES = \
src/bootchooser.c \
src/bundle.c \
src/checksum.c \
src/config_file.c \
src/context.c \
src/install.c \
src/manifest.c \
src/mount.c \
src/service.c \
src/signature.c \
src/utils.c \
src/update_handler.c \
include/bootchooser.h \
include/bundle.h \
include/checksum.h \
include/config_file.h \
include/context.h \
include/install.h \
include/manifest.h \
include/mount.h \
include/service.h \
include/signature.h \
include/update_handler.h \
include/utils.h
if WANT_NETWORK
librauc_la_SOURCES += src/network.c include/network.h
endif
nodist_librauc_la_SOURCES = \
$(gdbus_installer_generated)
librauc_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
librauc_la_LDFLAGS = $(AM_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
librauc_la_LIBADD = $(GLIB_LIBS) $(CURL_LIBS) $(OPENSSL_LIBS)
bin_PROGRAMS = rauc
rauc_SOURCES = \
src/main.c
rauc_CFLAGS = $(AM_CFLAGS) $(JSON_GLIB_CFLAGS) $(CODE_COVERAGE_CFLAGS)
rauc_LDFLAGS = $(AM_LDFLAGS) $(JSON_GLIB_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
rauc_LDADD = $(JSON_GLIB_LIBS) $(librauc_la_LIBADD) librauc.la
if SYSTEMD
systemdunitdir=$(SYSTEMD_UNITDIR)
nodist_systemdunit_DATA = data/rauc.service
endif
dbussystemdir = $(DBUS_SYSTEMSERVICEDIR)
nodist_dbussystem_DATA = data/de.pengutronix.rauc.service
dbuspolicydir = $(DBUS_POLICYDIR)
dist_dbuspolicy_DATA = data/de.pengutronix.rauc.conf
EXTRA_DIST += data/rauc.service.in \
data/de.pengutronix.rauc.service.in
AM_TESTS_ENVIRONMENT = \
AM_TAP_AWK='$(AWK)'; export AM_TAP_AWK; \
CATCHSEGV='$(CATCHSEGV)'; export CATCHSEGV;
TEST_EXTENSIONS = .t .test
T_LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
T_LOG_COMPILER = $(top_srcdir)/tap-t
TEST_LOG_DRIVER = $(top_srcdir)/build-aux/tap-driver.sh
TEST_LOG_COMPILER = $(top_srcdir)/tap-test
check_PROGRAMS = \
test/bootchooser.test \
test/checksum.test \
test/config_file.test \
test/manifest.test \
test/signature.test \
test/update_handler.test \
test/install.test \
test/service.test \
test/bundle.test \
test/progress.test
if WANT_NETWORK
check_PROGRAMS += test/network.test
endif
check_LTLIBRARIES = librauctest.la
EXTRA_DIST += tap-t \
tap-test \
test/bin \
test/install-content \
test/openssl-ca \
test/manifest.raucm \
test/rauc.t \
test/rootfs.raucs \
test/sharness.sh \
test/test.conf
librauctest_la_SOURCES = \
test/common.c \
test/common.h \
test/install-fixtures.c \
test/install-fixtures.h
librauctest_la_LIBADD = $(GLIB_LIBS) librauc.la
TESTS = $(check_PROGRAMS) test/rauc.t
test_bootchooser_test_SOURCES = test/bootchooser.c
test_bootchooser_test_LDADD = librauctest.la
test_bundle_test_SOURCES = test/bundle.c
test_bundle_test_LDADD = librauctest.la
test_checksum_test_SOURCES = test/checksum.c
test_checksum_test_LDADD = librauctest.la
test_config_file_test_SOURCES = test/config_file.c
test_config_file_test_LDADD = librauctest.la
test_manifest_test_SOURCES = test/manifest.c
test_manifest_test_LDADD = librauctest.la
test_service_test_CFLAGS = $(AM_CFLAGS) -DTEST_SERVICES=\""$(abs_top_builddir)/test/services"\"
test_service_test_SOURCES = test/service.c rauc-installer-generated.h
test_service_test_LDADD = librauctest.la
test_signature_test_SOURCES = test/signature.c
test_signature_test_LDADD = librauctest.la
test_update_handler_test_SOURCES = test/update_handler.c
test_update_handler_test_LDADD = librauc.la librauctest.la
test_install_test_SOURCES = test/install.c
test_install_test_LDADD = librauctest.la
test_network_test_SOURCES = test/network.c
test_network_test_LDADD = librauctest.la
test_progress_test_SOURCES = test/progress.c
test_progress_test_LDADD = librauctest.la
SED_REPLACE = $(SED) \
-e 's|[@]bindir[@]|$(bindir)|g' \
-e 's|[@]datadir[@]|$(pkgdatadir)|g' \
-e 's|[@]prefix[@]|$(prefix)|g'
data/%: data/%.in
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(SED_REPLACE) $< > $@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
DOCDIR = docs
SPHINXBUILDDIR = $(DOCDIR)/build
.PHONY: check-valgrind check-valgrind-tool
doc:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCDIR) $(SPHINXBUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(SPHINXBUILDDIR)/html."
AM_DISTCHECK_CONFIGURE_FLAGS = "--without-systemdunitdir"
CLEANFILES = $(gdbus_installer_generated) \
$(nodist_systemdunit_DATA) \
$(nodist_dbussystem_DATA) \
data/rauc.service \
test/empty.dat \
test/test-results/rauc.*.counts \
test/savedmanifest.raucm \
test/savedslot.raucs \
test/grubenv.test \
test/random.dat \
test/test-temp.conf