-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.am
136 lines (114 loc) · 2.73 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
# ------------------------------------------------------------------------------
# autotools
SHELL = bash
ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = color-tests parallel-tests
AM_MAKEFLAGS = --no-print-directory
AM_TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(abs_builddir)
check_PROGRAMS = $(default_tests)
TESTS = $(default_tests)
CLEANFILES =
EXTRA_DIST =
# remove targets if the command fails
.DELETE_ON_ERROR:
# keep intermediate files
.SECONDARY:
# keep the test-suite.log and Makefile around at all times
.PRECIOUS: $(TEST_SUITE_LOG) Makefile
AM_CPPFLAGS = \
-include $(top_builddir)/build/config.h \
-I $(top_srcdir)/src \
-I $(top_builddir)/src \
-DFIRMWARE_PATH="$(FIRMWARE_PATH)"
AM_CFLAGS = \
-fdata-sections \
-ffunction-sections \
-fvisibility=hidden \
-fno-common \
-fPIC \
-g \
-O2 \
-Wall \
-Wundef \
-Wextra \
-Wshadow \
-Winit-self \
-Wformat=2 \
-Wformat-security \
-Wformat-nonliteral \
-Wmissing-prototypes \
-Wmissing-declarations \
-Wdeclaration-after-statement \
-Wredundant-decls \
-Wno-missing-field-initializers \
-Wno-unused-parameter \
-Wno-inline
AM_LDFLAGS = \
-Wl,--as-needed \
-Wl,--no-undefined \
-Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now \
-pie
# ------------------------------------------------------------------------------
# libfirmware.a
libfirmware_a_SOURCES = \
src/firmware.h \
src/firmware.c
# ------------------------------------------------------------------------------
# firmwared
firmwared_SOURCES = \
src/firmwared.c \
src/firmwared.h \
src/manager.h \
src/manager.c \
src/log-util.h
firmwared_LDADD = \
libfirmware.a \
$(LIBUDEV_LIBS)
firmwared_CFLAGS = \
$(LIBUDEV_CFLAGS) \
$(AM_CFLAGS)
# ------------------------------------------------------------------------------
# test-basic
test_basic_SOURCES = src/test-basic.c
test_basic_LDADD = libfirmware.a
# ------------------------------------------------------------------------------
# test-runner
if TEST_RUNNER
test_runner_SOURCES = \
tools/test-runner.c
libtester_a_SOURCES = \
tools/tester.c \
tools/tester.h \
tools/util.h \
tools/util.c
libtester_a_CFLAGS = \
$(GLIB_CFLAGS) \
$(AM_CFLAGS)
libtester_a_LDLAGS = \
$(GLIB_LDLAGS)
firmware_tester_SOURCES = \
tools/firmware-tester.c
firmware_tester_CFLAGS = \
$(GLIB_CFLAGS) \
$(AM_CFLAGS)
firmware_tester_LDADD = \
libtester.a \
$(GLIB_LIBS)
endif
# ------------------------------------------------------------------------------
# targets
noinst_LIBRARIES = libfirmware.a
if TEST_RUNNER
noinst_LIBRARIES += \
libtester.a
noinst_PROGRAMS = \
test-runner \
firmware_tester
endif
bin_PROGRAMS = firmwared
default_tests = \
test-basic
EXTRA_DIST += src/test-build.sh
TESTS += src/test-build.sh