1
1
# Makefile.am -- Backtrace Makefile.
2
- # Copyright (C) 2012-2016 Free Software Foundation, Inc.
2
+ # Copyright (C) 2012-2018 Free Software Foundation, Inc.
3
3
4
4
# Redistribution and use in source and binary forms, with or without
5
5
# modification, are permitted provided that the following conditions are
29
29
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
30
# POSSIBILITY OF SUCH DAMAGE.
31
31
32
+ ACLOCAL_AMFLAGS = -I .. -I ../config
33
+
32
34
AM_CFLAGS = $(EXTRA_FLAGS ) $(WARN_FLAGS ) $(PIC_FLAG )
33
35
34
- lib_LTLIBRARIES = libbacktrace.la
35
36
include_HEADERS = backtrace.h backtrace-supported.h
36
37
38
+ noinst_LTLIBRARIES = libbacktrace.la
39
+
37
40
libbacktrace_la_SOURCES = \
38
41
backtrace.h \
39
42
atomic.c \
@@ -53,7 +56,8 @@ BACKTRACE_FILES = \
53
56
FORMAT_FILES = \
54
57
elf.c \
55
58
pecoff.c \
56
- unknown.c
59
+ unknown.c \
60
+ xcoff.c
57
61
58
62
VIEW_FILES = \
59
63
read.c \
@@ -85,7 +89,7 @@ TESTS = $(check_PROGRAMS)
85
89
86
90
if NATIVE
87
91
88
- btest_SOURCES = btest.c
92
+ btest_SOURCES = btest.c testlib.c
89
93
btest_CFLAGS = $(AM_CFLAGS ) -g -O
90
94
btest_LDADD = libbacktrace.la
91
95
@@ -96,6 +100,64 @@ stest_LDADD = libbacktrace.la
96
100
97
101
check_PROGRAMS += stest
98
102
103
+ ztest_SOURCES = ztest.c testlib.c
104
+ ztest_CFLAGS = -DSRCDIR=\"$(srcdir ) \"
105
+ ztest_LDADD = libbacktrace.la
106
+
107
+ if HAVE_ZLIB
108
+ ztest_LDADD += -lz
109
+ endif
110
+ ztest_LDADD += $(CLOCK_GETTIME_LINK )
111
+
112
+ check_PROGRAMS += ztest
113
+
114
+ edtest_SOURCES = edtest.c edtest2_build.c testlib.c
115
+ edtest_LDADD = libbacktrace.la
116
+
117
+ check_PROGRAMS += edtest
118
+
119
+ edtest2_build.c : gen_edtest2_build; @true
120
+ gen_edtest2_build : $(srcdir ) /edtest2.c
121
+ cat $(srcdir ) /edtest2.c > tmp-edtest2_build.c
122
+ $(SHELL ) $(srcdir ) /move-if-change tmp-edtest2_build.c edtest2_build.c
123
+ echo timestamp > $@
124
+
125
+ if HAVE_PTHREAD
126
+
127
+ check_PROGRAMS += ttest
128
+
129
+ ttest_SOURCES = ttest.c testlib.c
130
+ ttest_CFLAGS = $(AM_CFLAGS ) -pthread
131
+ ttest_LDADD = libbacktrace.la
132
+
133
+ endif HAVE_PTHREAD
134
+
135
+ if HAVE_OBJCOPY_DEBUGLINK
136
+
137
+ TESTS += dtest
138
+
139
+ dtest : btest
140
+ $(OBJCOPY ) --only-keep-debug btest btest.debug
141
+ $(OBJCOPY ) --strip-debug --add-gnu-debuglink=btest.debug btest dtest
142
+
143
+ endif HAVE_OBJCOPY_DEBUGLINK
144
+
145
+ if HAVE_COMPRESSED_DEBUG
146
+
147
+ ctestg_SOURCES = btest.c testlib.c
148
+ ctestg_CFLAGS = $(AM_CFLAGS ) -g
149
+ ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu
150
+ ctestg_LDADD = libbacktrace.la
151
+
152
+ ctesta_SOURCES = btest.c testlib.c
153
+ ctesta_CFLAGS = $(AM_CFLAGS ) -g
154
+ ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
155
+ ctesta_LDADD = libbacktrace.la
156
+
157
+ check_PROGRAMS += ctestg ctesta
158
+
159
+ endif
160
+
99
161
endif NATIVE
100
162
101
163
# We can't use automake's automatic dependency tracking, because it
@@ -112,8 +174,8 @@ endif NATIVE
112
174
113
175
alloc.lo : config.h backtrace.h internal.h
114
176
backtrace.lo : config.h backtrace.h internal.h
115
- btest.lo : backtrace.h backtrace-supported.h
116
- dwarf.lo : config.h backtrace.h internal.h
177
+ btest.lo : backtrace.h backtrace-supported.h filenames .h
178
+ dwarf.lo : config.h filenames.h backtrace.h internal.h
117
179
elf.lo : config.h backtrace.h internal.h
118
180
fileline.lo : config.h backtrace.h internal.h
119
181
mmap.lo : config.h backtrace.h internal.h
@@ -128,3 +190,5 @@ sort.lo: config.h backtrace.h internal.h
128
190
stest.lo : config.h backtrace.h internal.h
129
191
state.lo : config.h backtrace.h backtrace-supported.h internal.h
130
192
unknown.lo : config.h backtrace.h internal.h
193
+ xcoff.lo : config.h backtrace.h internal.h
194
+
0 commit comments