1## Process this file with automake to create Makefile.in 2## 3## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc. 4## This file is part of Red Hat elfutils. 5## 6## 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. 9## 10## 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, 17## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18## 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>. 26## 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) 31BUILD_RPATH = \$$ORIGIN/../backends 32else 33AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \ 34 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) 35BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf 36endif 37 38AM_LDFLAGS = 39 40if !STANDALONE 41INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ 42 -I$(top_srcdir)/libdwfl \ 43 -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ 44 -I$(top_srcdir)/lib -I.. 45AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf 46endif !STANDALONE 47 48if TESTS_RPATH 49AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH) 50tests_rpath = yes 51else 52tests_rpath = no 53endif 54 55noinst_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 \ 58 get-aranges allfcts line2addr addrscopes funcscopes \ 59 show-abbrev hash newscn ecp dwflmodtest \ 60 find-prologues funcretval allregs rdwrmmap \ 61 dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \ 62 dwfl-addr-sect dwfl-bug-report early-offscn \ 63 dwfl-bug-getmodules 64# get-ciefde 65asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ 66 asm-tst6 asm-tst7 asm-tst8 asm-tst9 67 68TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ 69 update1 update2 update3 update4 \ 70 run-show-die-info.sh run-get-files.sh run-get-lines.sh \ 71 run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \ 72 run-show-abbrev.sh run-line2addr.sh hash \ 73 newscn run-strip-test.sh run-strip-test2.sh \ 74 run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \ 75 run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \ 76 run-unstrip-test.sh run-unstrip-test2.sh \ 77 run-ecp-test.sh run-ecp-test2.sh \ 78 run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \ 79 run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \ 80 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ 81 run-find-prologues.sh run-allregs.sh \ 82 run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \ 83 run-readelf-test4.sh \ 84 run-native-test.sh run-bug1-test.sh \ 85 dwfl-bug-addr-overflow run-addrname-test.sh \ 86 dwfl-bug-fd-leak dwfl-bug-report \ 87 run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \ 88 run-disasm-x86.sh run-disasm-x86-64.sh \ 89 run-early-offscn.sh 90# run-show-ciefde.sh 91 92if !STANDALONE 93noinst_PROGRAMS += msg_tst sha1-tst 94TESTS += msg_tst sha1-tst 95endif 96 97if HAVE_LIBASM 98noinst_PROGRAMS += $(asm_TESTS) 99TESTS += $(asm_TESTS) 100endif 101 102 103EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ 104 run-show-die-info.sh run-get-files.sh run-get-lines.sh \ 105 run-get-pubnames.sh run-get-aranges.sh \ 106 run-show-ciefde.sh run-show-abbrev.sh run-strip-test.sh \ 107 run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \ 108 testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \ 109 testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \ 110 testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \ 111 testfile13.bz2 run-strip-test3.sh run-allfcts.sh \ 112 run-line2addr.sh run-elflint-test.sh testfile14.bz2 \ 113 run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ 114 run-strip-test7.sh run-strip-test8.sh \ 115 run-unstrip-test.sh run-unstrip-test2.sh \ 116 run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \ 117 run-ranlib-test3.sh run-ranlib-test4.sh \ 118 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ 119 run-find-prologues.sh run-allregs.sh run-native-test.sh \ 120 run-addrname-test.sh run-dwfl-bug-offline-rel.sh \ 121 run-dwfl-addr-sect.sh run-early-offscn.sh \ 122 testfile15.bz2 testfile15.debug.bz2 \ 123 testfile16.bz2 testfile16.debug.bz2 \ 124 testfile17.bz2 testfile17.debug.bz2 \ 125 testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \ 126 testfile20.bz2 testfile20.index.bz2 \ 127 testfile21.bz2 testfile21.index.bz2 \ 128 testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \ 129 testfile26.bz2 testfile27.bz2 \ 130 coverage.sh test-subr.sh test-wrapper.sh \ 131 run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \ 132 run-readelf-test4.sh \ 133 run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \ 134 testfile29.bz2 testfile29.rdwr.bz2 \ 135 testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \ 136 testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \ 137 testfile36.bz2 testfile36.debug.bz2 \ 138 testfile37.bz2 testfile37.debug.bz2 \ 139 testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \ 140 testfile41.bz2 testfile42.bz2 testfile43.bz2 \ 141 testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \ 142 testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \ 143 testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \ 144 testfile49.bz2 145 146installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ 147 bindir=$(DESTDIR)$(bindir) \ 148 $(srcdir)/test-wrapper.sh \ 149 installed $(tests_rpath) \ 150 $(program_transform_name) 151if STANDALONE 152TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT) 153else !STANDALONE 154TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \ 155 ../libdw:../backends:../libelf:../libasm 156 157installcheck-local: 158 $(MAKE) $(AM_MAKEFLAGS) \ 159 TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS 160endif !STANDALONE 161 162if MUDFLAP 163static_build=yes 164libmudflap = -lmudflap 165endif 166 167if STANDALONE 168libdw = -ldw 169libelf = -lelf 170libasm = -lasm 171libebl = -lebl 172else !STANDALONE 173if BUILD_STATIC 174libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl 175libelf = ../libelf/libelf.a 176libasm = ../libasm/libasm.a 177else 178libdw = ../libdw/libdw.so 179libelf = ../libelf/libelf.so 180libasm = ../libasm/libasm.so 181endif 182libebl = ../libebl/libebl.a 183libeu = ../lib/libeu.a 184endif !STANDALONE 185 186arextract_LDADD = $(libelf) $(libmudflap) 187arsymtest_LDADD = $(libelf) $(libmudflap) 188newfile_LDADD = $(libelf) $(libmudflap) 189saridx_LDADD = $(libelf) $(libmudflap) 190scnnames_LDADD = $(libelf) $(libmudflap) 191sectiondump_LDADD = $(libelf) $(libmudflap) 192showptable_LDADD = $(libelf) $(libmudflap) 193hash_LDADD = $(libelf) $(libmudflap) 194test_nlist_LDADD = $(libelf) $(libmudflap) 195msg_tst_LDADD = $(libelf) $(libmudflap) 196newscn_LDADD = $(libelf) $(libmudflap) 197early_offscn_LDADD = $(libelf) $(libmudflap) 198ecp_LDADD = $(libelf) $(libmudflap) 199update1_LDADD = $(libelf) $(libmudflap) 200update2_LDADD = $(libelf) $(libmudflap) 201update3_LDADD = $(libebl) $(libelf) $(libmudflap) 202update4_LDADD = $(libebl) $(libelf) $(libmudflap) 203show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap) 204get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap) 205show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap) 206get_lines_LDADD = $(libdw) $(libelf) $(libmudflap) 207get_files_LDADD = $(libdw) $(libelf) $(libmudflap) 208get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap) 209allfcts_LDADD = $(libdw) $(libelf) $(libmudflap) 210line2addr_no_Wformat = yes 211line2addr_LDADD = $(libdw) $(libmudflap) 212addrscopes_LDADD = $(libdw) $(libmudflap) 213funcscopes_LDADD = $(libdw) $(libmudflap) 214funcretval_LDADD = $(libdw) $(libmudflap) 215allregs_LDADD = $(libdw) $(libmudflap) 216find_prologues_LDADD = $(libdw) $(libmudflap) 217#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap) 218asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 219asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 220asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 221asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 222asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 223asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 224asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 225asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 226asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl 227dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 228rdwrmmap_LDADD = $(libelf) 229dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 230arls_LDADD = $(libelf) $(libmudflap) 231dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 232dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 233dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 234dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl 235sha1_tst_LDADD = $(libeu) $(libmudflap) 236 237CLEANFILES = xxx *.gcno *.gcda *gconv 238 239if GCOV 240check: check-am coverage 241.PHONY: coverage 242coverage: 243 -$(srcdir)/coverage.sh 244endif 245