Home | History | Annotate | Download | only in tests
      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 ##
     27 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
     28 if MUDFLAP
     29 AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
     30 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
     31 BUILD_RPATH = \$$ORIGIN/../backends
     32 else
     33 AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
     34 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
     35 BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
     36 endif
     37 
     38 AM_LDFLAGS =
     39 
     40 if !STANDALONE
     41 INCLUDES = -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..
     45 AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
     46 endif !STANDALONE
     47 
     48 if TESTS_RPATH
     49 AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH)
     50 tests_rpath = yes
     51 else
     52 tests_rpath = no
     53 endif
     54 
     55 noinst_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
     65 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
     66 	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
     67 
     68 TESTS = 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 
     92 if !STANDALONE
     93 noinst_PROGRAMS += msg_tst sha1-tst
     94 TESTS += msg_tst sha1-tst
     95 endif
     96 
     97 if HAVE_LIBASM
     98 noinst_PROGRAMS += $(asm_TESTS)
     99 TESTS += $(asm_TESTS)
    100 endif
    101 
    102 
    103 EXTRA_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 
    146 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
    147 			      bindir=$(DESTDIR)$(bindir) \
    148 			      $(srcdir)/test-wrapper.sh \
    149 			      installed $(tests_rpath) \
    150 			      $(program_transform_name)
    151 if STANDALONE
    152 TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
    153 else !STANDALONE
    154 TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
    155 		    ../libdw:../backends:../libelf:../libasm
    156 
    157 installcheck-local:
    158 	$(MAKE) $(AM_MAKEFLAGS) \
    159 		TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS
    160 endif !STANDALONE
    161 
    162 if MUDFLAP
    163 static_build=yes
    164 libmudflap = -lmudflap
    165 endif
    166 
    167 if STANDALONE
    168 libdw = -ldw
    169 libelf = -lelf
    170 libasm = -lasm
    171 libebl = -lebl
    172 else !STANDALONE
    173 if BUILD_STATIC
    174 libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
    175 libelf = ../libelf/libelf.a
    176 libasm = ../libasm/libasm.a
    177 else
    178 libdw = ../libdw/libdw.so
    179 libelf = ../libelf/libelf.so
    180 libasm = ../libasm/libasm.so
    181 endif
    182 libebl = ../libebl/libebl.a
    183 libeu = ../lib/libeu.a
    184 endif !STANDALONE
    185 
    186 arextract_LDADD = $(libelf) $(libmudflap)
    187 arsymtest_LDADD = $(libelf) $(libmudflap)
    188 newfile_LDADD = $(libelf) $(libmudflap)
    189 saridx_LDADD = $(libelf) $(libmudflap)
    190 scnnames_LDADD = $(libelf) $(libmudflap)
    191 sectiondump_LDADD = $(libelf) $(libmudflap)
    192 showptable_LDADD = $(libelf) $(libmudflap)
    193 hash_LDADD = $(libelf) $(libmudflap)
    194 test_nlist_LDADD = $(libelf) $(libmudflap)
    195 msg_tst_LDADD = $(libelf) $(libmudflap)
    196 newscn_LDADD = $(libelf) $(libmudflap)
    197 early_offscn_LDADD = $(libelf) $(libmudflap)
    198 ecp_LDADD = $(libelf) $(libmudflap)
    199 update1_LDADD = $(libelf) $(libmudflap)
    200 update2_LDADD = $(libelf) $(libmudflap)
    201 update3_LDADD = $(libebl) $(libelf) $(libmudflap)
    202 update4_LDADD = $(libebl) $(libelf) $(libmudflap)
    203 show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap)
    204 get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap)
    205 show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap)
    206 get_lines_LDADD = $(libdw) $(libelf) $(libmudflap)
    207 get_files_LDADD = $(libdw) $(libelf) $(libmudflap)
    208 get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap)
    209 allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
    210 line2addr_no_Wformat = yes
    211 line2addr_LDADD = $(libdw) $(libmudflap)
    212 addrscopes_LDADD = $(libdw) $(libmudflap)
    213 funcscopes_LDADD = $(libdw) $(libmudflap)
    214 funcretval_LDADD = $(libdw) $(libmudflap)
    215 allregs_LDADD = $(libdw) $(libmudflap)
    216 find_prologues_LDADD = $(libdw) $(libmudflap)
    217 #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
    218 asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    219 asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    220 asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    221 asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    222 asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    223 asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    224 asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    225 asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    226 asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
    227 dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    228 rdwrmmap_LDADD = $(libelf)
    229 dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    230 arls_LDADD = $(libelf) $(libmudflap)
    231 dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    232 dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    233 dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    234 dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
    235 sha1_tst_LDADD = $(libeu) $(libmudflap)
    236 
    237 CLEANFILES = xxx *.gcno *.gcda *gconv
    238 
    239 if GCOV
    240 check: check-am coverage
    241 .PHONY: coverage
    242 coverage:
    243 	-$(srcdir)/coverage.sh
    244 endif
    245