blob: d1d1dbb3d25d756018face662c900efb441a225e [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001## Process this file with automake to create Makefile.in
2##
Roland McGrathba949b32007-01-10 20:44:29 +00003## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Ulrich Drepper361df7d2006-04-04 21:38:57 +00004## This file is part of Red Hat elfutils.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00005##
Ulrich Drepper361df7d2006-04-04 21:38:57 +00006## Red Hat elfutils is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by the
8## Free Software Foundation; version 2 of the License.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00009##
Ulrich Drepper361df7d2006-04-04 21:38:57 +000010## Red Hat elfutils is distributed in the hope that it will be useful, but
11## WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13## General Public License for more details.
14##
15## You should have received a copy of the GNU General Public License along
16## with Red Hat elfutils; if not, write to the Free Software Foundation,
Ulrich Drepper1e9ef502006-04-04 22:29:06 +000017## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000018##
19## Red Hat elfutils is an included package of the Open Invention Network.
20## An included package of the Open Invention Network is a package for which
21## Open Invention Network licensees cross-license their patents. No patent
22## license is granted, either expressly or impliedly, by designation as an
23## included package. Should you wish to participate in the Open Invention
24## Network licensing program, please visit www.openinventionnetwork.com
25## <http://www.openinventionnetwork.com>.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000026##
27DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
28if MUDFLAP
29AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
30 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
Roland McGrathe47ab762005-11-17 03:16:00 +000031BUILD_RPATH = \$$ORIGIN/../backends
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000032else
33AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
34 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
Roland McGrathe47ab762005-11-17 03:16:00 +000035BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000036endif
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000037
Roland McGrathdd7e22b2006-03-09 23:05:47 +000038AM_LDFLAGS =
39
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000040if !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000041INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
Roland McGrath18385902005-07-28 07:12:38 +000042 -I$(top_srcdir)/libdwfl \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000043 -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
44 -I$(top_srcdir)/lib -I..
Roland McGrathdd7e22b2006-03-09 23:05:47 +000045AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000046endif !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000047
Roland McGrath1b8b4462005-11-16 01:33:38 +000048if TESTS_RPATH
Roland McGrathdd7e22b2006-03-09 23:05:47 +000049AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH)
Roland McGrath1b8b4462005-11-16 01:33:38 +000050tests_rpath = yes
51else
52tests_rpath = no
53endif
54
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000055noinst_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
56 showptable update1 update2 update3 update4 test-nlist \
57 show-die-info get-files get-lines get-pubnames \
Roland McGrath71e15a02005-08-27 10:33:26 +000058 get-aranges allfcts line2addr addrscopes funcscopes \
Roland McGrathe47ab762005-11-17 03:16:00 +000059 show-abbrev hash newscn ecp dwflmodtest \
Roland McGrathba949b32007-01-10 20:44:29 +000060 find-prologues funcretval allregs rdwrmmap \
Roland McGrath43da9892007-04-16 23:13:37 +000061 dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
Roland McGrath87d47802007-07-16 22:23:37 +000062 dwfl-addr-sect dwfl-bug-report
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000063# get-ciefde
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000064asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
65 asm-tst6 asm-tst7 asm-tst8 asm-tst9
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000066
67TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
68 update1 update2 update3 update4 \
69 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
70 run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000071 run-show-abbrev.sh run-line2addr.sh hash \
72 newscn run-strip-test.sh run-strip-test2.sh \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000073 run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
Roland McGrath099dd522007-08-13 22:58:36 +000074 run-strip-test6.sh run-strip-test7.sh \
75 run-unstrip-test.sh run-unstrip-test2.sh \
Roland McGrath9aa8ef72007-05-18 08:59:43 +000076 run-ecp-test.sh run-ecp-test2.sh \
Ulrich Drepper5d832292005-08-15 21:36:27 +000077 run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
Roland McGrathf5fda7d2005-08-18 22:01:57 +000078 run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
Roland McGrath07d4f2f2005-10-28 06:56:24 +000079 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
Roland McGrathf6b92282007-10-02 02:34:11 +000080 run-find-prologues.sh run-allregs.sh \
81 run-readelf-test1.sh run-readelf-test2.sh \
Roland McGrathba949b32007-01-10 20:44:29 +000082 run-native-test.sh run-bug1-test.sh \
Roland McGrath87d47802007-07-16 22:23:37 +000083 dwfl-bug-addr-overflow run-addrname-test.sh \
84 dwfl-bug-fd-leak dwfl-bug-report \
Roland McGrath9aa8ef72007-05-18 08:59:43 +000085 run-dwfl-bug-offline-rel.sh
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000086# run-show-ciefde.sh
87
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000088if !STANDALONE
89noinst_PROGRAMS += msg_tst
90TESTS += msg_tst
91endif
92
93if HAVE_LIBASM
94noinst_PROGRAMS += $(asm_TESTS)
95TESTS += $(asm_TESTS)
96endif
97
98
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000099EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
100 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
101 run-get-pubnames.sh run-get-aranges.sh \
102 run-show-ciefde.sh run-show-abbrev.sh run-strip-test.sh \
103 run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
104 testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
105 testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
106 testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
107 testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
108 run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
109 run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
Roland McGrath099dd522007-08-13 22:58:36 +0000110 run-strip-test7.sh run-unstrip-test.sh run-unstrip-test2.sh \
Ulrich Drepper5d832292005-08-15 21:36:27 +0000111 run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
112 run-ranlib-test3.sh run-ranlib-test4.sh \
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000113 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
Roland McGrath94d26ad2005-12-13 23:24:37 +0000114 run-find-prologues.sh run-allregs.sh run-native-test.sh \
Roland McGrath9aa8ef72007-05-18 08:59:43 +0000115 run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000116 testfile15.bz2 testfile15.debug.bz2 \
117 testfile16.bz2 testfile16.debug.bz2 \
118 testfile17.bz2 testfile17.debug.bz2 \
Ulrich Dreppere48c05b2005-08-15 21:47:33 +0000119 testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
Ulrich Drepper5d832292005-08-15 21:36:27 +0000120 testfile20.bz2 testfile20.index.bz2 \
Roland McGrathf5fda7d2005-08-18 22:01:57 +0000121 testfile21.bz2 testfile21.index.bz2 \
Ulrich Drepper39cec7a2005-08-30 01:22:01 +0000122 testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
Roland McGrath4b248ce2006-01-12 03:34:38 +0000123 testfile26.bz2 testfile27.bz2 \
Roland McGrathf6b92282007-10-02 02:34:11 +0000124 coverage.sh test-subr.sh test-wrapper.sh \
125 run-readelf-test1.sh run-readelf-test2.sh \
Roland McGrathb4379722006-04-05 01:35:26 +0000126 run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
Roland McGrath19db8592006-08-03 08:52:46 +0000127 testfile29.bz2 testfile29.rdwr.bz2 \
Ulrich Drepperaa915fd2007-02-05 07:25:33 +0000128 testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
Ulrich Drepperb0243862007-06-06 00:09:36 +0000129 testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
130 testfile36.bz2 testfile36.debug.bz2 \
Roland McGrath42f68682007-08-09 07:54:22 +0000131 testfile37.bz2 testfile37.debug.bz2 \
Roland McGrathc76f0b02007-09-27 07:31:33 +0000132 testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
133 testfile41.bz2
Roland McGrath1b8b4462005-11-16 01:33:38 +0000134
Roland McGrathaf74f5c2005-11-18 02:25:14 +0000135installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
136 bindir=$(DESTDIR)$(bindir) \
137 $(srcdir)/test-wrapper.sh \
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000138 installed $(tests_rpath) \
139 $(program_transform_name)
140if STANDALONE
141TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
142else !STANDALONE
Roland McGrath1b8b4462005-11-16 01:33:38 +0000143TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
Roland McGrathe47ab762005-11-17 03:16:00 +0000144 ../libdw:../backends:../libelf:../libasm
Roland McGrath1b8b4462005-11-16 01:33:38 +0000145
146installcheck-local:
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000147 $(MAKE) $(AM_MAKEFLAGS) \
Roland McGrath575dd392005-11-18 01:41:52 +0000148 TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000149endif !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000150
151if MUDFLAP
Ulrich Drepper47be7952005-08-07 04:41:39 +0000152static_build=yes
153libmudflap = -lmudflap
154endif
155
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000156if STANDALONE
157libdw = -ldw
158libelf = -lelf
159libasm = -lasm
160libebl = -lebl
161else !STANDALONE
Ulrich Drepper47be7952005-08-07 04:41:39 +0000162if BUILD_STATIC
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000163libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000164libelf = ../libelf/libelf.a
165libasm = ../libasm/libasm.a
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000166else
167libdw = ../libdw/libdw.so
168libelf = ../libelf/libelf.so
169libasm = ../libasm/libasm.so
170endif
171libebl = ../libebl/libebl.a
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000172endif !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000173
174arextract_LDADD = $(libelf) $(libmudflap)
175arsymtest_LDADD = $(libelf) $(libmudflap)
176newfile_LDADD = $(libelf) $(libmudflap)
177saridx_LDADD = $(libelf) $(libmudflap)
178scnnames_LDADD = $(libelf) $(libmudflap)
179sectiondump_LDADD = $(libelf) $(libmudflap)
180showptable_LDADD = $(libelf) $(libmudflap)
181hash_LDADD = $(libelf) $(libmudflap)
182test_nlist_LDADD = $(libelf) $(libmudflap)
183msg_tst_LDADD = $(libelf) $(libmudflap)
184newscn_LDADD = $(libelf) $(libmudflap)
185ecp_LDADD = $(libelf) $(libmudflap)
186update1_LDADD = $(libelf) $(libmudflap)
187update2_LDADD = $(libelf) $(libmudflap)
188update3_LDADD = $(libebl) $(libelf) $(libmudflap)
189update4_LDADD = $(libebl) $(libelf) $(libmudflap)
190show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap)
191get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap)
192show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap)
193get_lines_LDADD = $(libdw) $(libelf) $(libmudflap)
194get_files_LDADD = $(libdw) $(libelf) $(libmudflap)
195get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap)
196allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
197line2addr_no_Wformat = yes
Roland McGrathd17fac72005-08-23 08:20:21 +0000198line2addr_LDADD = $(libdw) $(libmudflap)
Roland McGrath9a1f3652005-08-18 20:57:04 +0000199addrscopes_LDADD = $(libdw) $(libmudflap)
Roland McGrath71e15a02005-08-27 10:33:26 +0000200funcscopes_LDADD = $(libdw) $(libmudflap)
Roland McGrathe47ab762005-11-17 03:16:00 +0000201funcretval_LDADD = $(libdw) $(libmudflap)
Roland McGrath994b4892005-12-05 22:46:21 +0000202allregs_LDADD = $(libdw) $(libmudflap)
Roland McGrath07d4f2f2005-10-28 06:56:24 +0000203find_prologues_LDADD = $(libdw) $(libmudflap)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000204#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
Ulrich Dreppera38998e2005-08-03 02:05:39 +0000205asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
206asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
207asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
208asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
209asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
210asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
211asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
212asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
213asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepper47be7952005-08-07 04:41:39 +0000214dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepperba718b12006-04-04 21:31:16 +0000215rdwrmmap_LDADD = $(libelf)
Roland McGrathba949b32007-01-10 20:44:29 +0000216dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepperce0bdb62007-02-05 07:13:52 +0000217arls_LDADD = $(libelf) $(libmudflap)
Ulrich Drepper6258e742007-03-13 06:22:40 +0000218dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Roland McGrath87d47802007-07-16 22:23:37 +0000219dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Roland McGrath43da9892007-04-16 23:13:37 +0000220dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000221
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000222CLEANFILES = xxx *.gcno *.gcda *gconv
Ulrich Drepper39cec7a2005-08-30 01:22:01 +0000223
224if GCOV
225check: check-am coverage
226.PHONY: coverage
227coverage:
228 -$(srcdir)/coverage.sh
229endif