blob: 0ceef1b93e2e5650f707548d1c5937551aa28bcc [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001## Process this file with automake to create Makefile.in
2##
Roland McGrath4b248ce2006-01-12 03:34:38 +00003## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 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 \
Ulrich Drepperba718b12006-04-04 21:31:16 +000060 find-prologues funcretval allregs rdwrmmap
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000061# get-ciefde
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000062asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
63 asm-tst6 asm-tst7 asm-tst8 asm-tst9
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000064
65TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
66 update1 update2 update3 update4 \
67 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
68 run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000069 run-show-abbrev.sh run-line2addr.sh hash \
70 newscn run-strip-test.sh run-strip-test2.sh \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000071 run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
72 run-strip-test6.sh run-ecp-test.sh run-ecp-test2.sh \
Ulrich Drepper5d832292005-08-15 21:36:27 +000073 run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
Roland McGrathf5fda7d2005-08-18 22:01:57 +000074 run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
Roland McGrath07d4f2f2005-10-28 06:56:24 +000075 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
Roland McGrath94d26ad2005-12-13 23:24:37 +000076 run-find-prologues.sh run-allregs.sh run-readelf-test1.sh \
Ulrich Drepperba718b12006-04-04 21:31:16 +000077 run-native-test.sh run-bug1-test.sh
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000078# run-show-ciefde.sh
79
Roland McGrathd7f8d0c2005-11-17 02:32:03 +000080if !STANDALONE
81noinst_PROGRAMS += msg_tst
82TESTS += msg_tst
83endif
84
85if HAVE_LIBASM
86noinst_PROGRAMS += $(asm_TESTS)
87TESTS += $(asm_TESTS)
88endif
89
90
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000091EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
92 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
93 run-get-pubnames.sh run-get-aranges.sh \
94 run-show-ciefde.sh run-show-abbrev.sh run-strip-test.sh \
95 run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
96 testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
97 testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
98 testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
99 testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
100 run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
101 run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
Ulrich Drepper5d832292005-08-15 21:36:27 +0000102 run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
103 run-ranlib-test3.sh run-ranlib-test4.sh \
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000104 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
Roland McGrath94d26ad2005-12-13 23:24:37 +0000105 run-find-prologues.sh run-allregs.sh run-native-test.sh \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000106 testfile15.bz2 testfile15.debug.bz2 \
107 testfile16.bz2 testfile16.debug.bz2 \
108 testfile17.bz2 testfile17.debug.bz2 \
Ulrich Dreppere48c05b2005-08-15 21:47:33 +0000109 testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
Ulrich Drepper5d832292005-08-15 21:36:27 +0000110 testfile20.bz2 testfile20.index.bz2 \
Roland McGrathf5fda7d2005-08-18 22:01:57 +0000111 testfile21.bz2 testfile21.index.bz2 \
Ulrich Drepper39cec7a2005-08-30 01:22:01 +0000112 testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
Roland McGrath4b248ce2006-01-12 03:34:38 +0000113 testfile26.bz2 testfile27.bz2 \
Ulrich Drepperba718b12006-04-04 21:31:16 +0000114 coverage.sh test-subr.sh test-wrapper.sh run-readelf-test1.sh \
Roland McGrathb4379722006-04-05 01:35:26 +0000115 run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
116 testfile29.bz2 testfile29.rdwr.bz2
Roland McGrath1b8b4462005-11-16 01:33:38 +0000117
Roland McGrathaf74f5c2005-11-18 02:25:14 +0000118installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
119 bindir=$(DESTDIR)$(bindir) \
120 $(srcdir)/test-wrapper.sh \
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000121 installed $(tests_rpath) \
122 $(program_transform_name)
123if STANDALONE
124TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
125else !STANDALONE
Roland McGrath1b8b4462005-11-16 01:33:38 +0000126TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
Roland McGrathe47ab762005-11-17 03:16:00 +0000127 ../libdw:../backends:../libelf:../libasm
Roland McGrath1b8b4462005-11-16 01:33:38 +0000128
129installcheck-local:
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000130 $(MAKE) $(AM_MAKEFLAGS) \
Roland McGrath575dd392005-11-18 01:41:52 +0000131 TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000132endif !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000133
134if MUDFLAP
Ulrich Drepper47be7952005-08-07 04:41:39 +0000135static_build=yes
136libmudflap = -lmudflap
137endif
138
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000139if STANDALONE
140libdw = -ldw
141libelf = -lelf
142libasm = -lasm
143libebl = -lebl
144else !STANDALONE
Ulrich Drepper47be7952005-08-07 04:41:39 +0000145if BUILD_STATIC
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000146libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000147libelf = ../libelf/libelf.a
148libasm = ../libasm/libasm.a
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000149else
150libdw = ../libdw/libdw.so
151libelf = ../libelf/libelf.so
152libasm = ../libasm/libasm.so
153endif
154libebl = ../libebl/libebl.a
Roland McGrathd7f8d0c2005-11-17 02:32:03 +0000155endif !STANDALONE
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000156
157arextract_LDADD = $(libelf) $(libmudflap)
158arsymtest_LDADD = $(libelf) $(libmudflap)
159newfile_LDADD = $(libelf) $(libmudflap)
160saridx_LDADD = $(libelf) $(libmudflap)
161scnnames_LDADD = $(libelf) $(libmudflap)
162sectiondump_LDADD = $(libelf) $(libmudflap)
163showptable_LDADD = $(libelf) $(libmudflap)
164hash_LDADD = $(libelf) $(libmudflap)
165test_nlist_LDADD = $(libelf) $(libmudflap)
166msg_tst_LDADD = $(libelf) $(libmudflap)
167newscn_LDADD = $(libelf) $(libmudflap)
168ecp_LDADD = $(libelf) $(libmudflap)
169update1_LDADD = $(libelf) $(libmudflap)
170update2_LDADD = $(libelf) $(libmudflap)
171update3_LDADD = $(libebl) $(libelf) $(libmudflap)
172update4_LDADD = $(libebl) $(libelf) $(libmudflap)
173show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap)
174get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap)
175show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap)
176get_lines_LDADD = $(libdw) $(libelf) $(libmudflap)
177get_files_LDADD = $(libdw) $(libelf) $(libmudflap)
178get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap)
179allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
180line2addr_no_Wformat = yes
Roland McGrathd17fac72005-08-23 08:20:21 +0000181line2addr_LDADD = $(libdw) $(libmudflap)
Roland McGrath9a1f3652005-08-18 20:57:04 +0000182addrscopes_LDADD = $(libdw) $(libmudflap)
Roland McGrath71e15a02005-08-27 10:33:26 +0000183funcscopes_LDADD = $(libdw) $(libmudflap)
Roland McGrathe47ab762005-11-17 03:16:00 +0000184funcretval_LDADD = $(libdw) $(libmudflap)
Roland McGrath994b4892005-12-05 22:46:21 +0000185allregs_LDADD = $(libdw) $(libmudflap)
Roland McGrath07d4f2f2005-10-28 06:56:24 +0000186find_prologues_LDADD = $(libdw) $(libmudflap)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000187#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
Ulrich Dreppera38998e2005-08-03 02:05:39 +0000188asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
189asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
190asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
191asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
192asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
193asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
194asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
195asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
196asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepper47be7952005-08-07 04:41:39 +0000197dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
Ulrich Drepperba718b12006-04-04 21:31:16 +0000198rdwrmmap_LDADD = $(libelf)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000199
Ulrich Drepperfbe998a2005-08-29 16:27:10 +0000200CLEANFILES = xxx *.gcno *.gcda *gconv
Ulrich Drepper39cec7a2005-08-30 01:22:01 +0000201
202if GCOV
203check: check-am coverage
204.PHONY: coverage
205coverage:
206 -$(srcdir)/coverage.sh
207endif