forked from rauc/rauc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
262 lines (215 loc) · 6.98 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
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 -include ${top_builddir}/config.h $(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/mark.c \
src/mbr.c \
src/mount.c \
src/service.c \
src/signature.c \
src/slot.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/emmc.h \
include/install.h \
include/manifest.h \
include/mark.h \
include/mbr.h \
include/mount.h \
include/service.h \
include/signature.h \
include/slot.h \
include/update_handler.h \
include/utils.h
if WANT_EMMC_BOOT_SUPPORT
librauc_la_SOURCES += src/emmc.c
endif
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
dbussystemservicedir = $(DBUS_SYSTEMSERVICEDIR)
nodist_dbussystemservice_DATA = data/de.pengutronix.rauc.service
dbuspolicydir = $(DBUS_POLICYDIR)
dist_dbuspolicy_DATA = data/de.pengutronix.rauc.conf
dbuswrapperdir = $(libexecdir)
nodist_dbuswrapper_SCRIPTS = data/rauc-service.sh
EXTRA_DIST += data/rauc.service.in \
data/de.pengutronix.rauc.service.in \
data/rauc-service.sh.in \
README.rst \
CHANGES \
contrib \
build-uncrustify.sh \
.uncrustify.cfg \
uncrustify.sh \
rauc_logo.png \
rauc_logo_small.png
dist_man_MANS = rauc.1
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 \
test/slot.test
if WANT_NETWORK
check_PROGRAMS += test/network.test
endif
noinst_PROGRAMS = test/fakerand
test_fakerand_SOURCES = test/fakerand.c
check_LTLIBRARIES = librauctest.la
EXTRA_DIST += tap-t \
tap-test \
uml-test uml-test-init \
test/Dockerfile \
test/bin \
test/install-content \
test/openssl-ca \
$(wildcard test/*.raucb) \
$(wildcard test/*.raucm) \
test/rauc.t \
test/rootfs.raucs \
test/sharness.sh \
test/system.conf \
test/test.conf \
test/test-global.conf \
test/get-coverity.sh \
test/openssl-ca.sh \
test/run-coverity.sh
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_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
test_slot_test_SOURCES = test/slot.c
test_slot_test_LDADD = librauctest.la
SED_REPLACE = $(SED) \
-e 's|[@]bindir[@]|$(bindir)|g' \
-e 's|[@]libexecdir[@]|$(libexecdir)|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 = $(top_srcdir)/docs
SPHINXBUILDDIR = $(top_builddir)/docs/build
.PHONY: check-valgrind check-valgrind-tool
doc:
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(DOCDIR) $(SPHINXBUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(SPHINXBUILDDIR)/html."
EXTRA_DIST += docs/conf.py
EXTRA_DIST += docs/images
EXTRA_DIST += docs/extensions
EXTRA_DIST += docs/release-checklist.txt
EXTRA_DIST += $(wildcard docs/*.rst)
AM_DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdunitdir=$$dc_install_base/$(systemdunitdir) \
--with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
--with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir)
CLEANFILES = $(gdbus_installer_generated) \
$(nodist_systemdunit_DATA) \
$(nodist_dbussystemservice_DATA) \
$(nodist_dbuswrapper_SCRIPTS) \
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 \
test/system.raucs \
test/global.raucs