1da0c48c4Sopenharmony_ci## Process this file with automake to create Makefile.in
2da0c48c4Sopenharmony_ci##
3da0c48c4Sopenharmony_ci## Copyright (C) 1996-2014, 2016 Red Hat, Inc.
4da0c48c4Sopenharmony_ci## This file is part of elfutils.
5da0c48c4Sopenharmony_ci##
6da0c48c4Sopenharmony_ci## This file is free software; you can redistribute it and/or modify
7da0c48c4Sopenharmony_ci## it under the terms of the GNU General Public License as published by
8da0c48c4Sopenharmony_ci## the Free Software Foundation; either version 3 of the License, or
9da0c48c4Sopenharmony_ci## (at your option) any later version.
10da0c48c4Sopenharmony_ci##
11da0c48c4Sopenharmony_ci## elfutils is distributed in the hope that it will be useful, but
12da0c48c4Sopenharmony_ci## WITHOUT ANY WARRANTY; without even the implied warranty of
13da0c48c4Sopenharmony_ci## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14da0c48c4Sopenharmony_ci## GNU General Public License for more details.
15da0c48c4Sopenharmony_ci##
16da0c48c4Sopenharmony_ci## You should have received a copy of the GNU General Public License
17da0c48c4Sopenharmony_ci## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18da0c48c4Sopenharmony_ci##
19da0c48c4Sopenharmony_ciinclude $(top_srcdir)/config/eu.am
20da0c48c4Sopenharmony_ciDEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \
21da0c48c4Sopenharmony_ci	-DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
22da0c48c4Sopenharmony_ciAM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
23da0c48c4Sopenharmony_ci	    -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
24da0c48c4Sopenharmony_ci	    -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm
25da0c48c4Sopenharmony_ci
26da0c48c4Sopenharmony_ciAM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw $(STACK_USAGE_NO_ERROR)
27da0c48c4Sopenharmony_ci
28da0c48c4Sopenharmony_cibin_PROGRAMS = readelf nm size strip elflint findtextrel addr2line \
29da0c48c4Sopenharmony_ci	       elfcmp objdump ranlib strings ar unstrip stack elfcompress \
30da0c48c4Sopenharmony_ci	       elfclassify
31da0c48c4Sopenharmony_ci
32da0c48c4Sopenharmony_cinoinst_LIBRARIES = libar.a
33da0c48c4Sopenharmony_ci
34da0c48c4Sopenharmony_cilibar_a_SOURCES = arlib.c arlib2.c arlib-argp.c
35da0c48c4Sopenharmony_ci
36da0c48c4Sopenharmony_ciEXTRA_DIST = arlib.h debugpred.h
37da0c48c4Sopenharmony_ci
38da0c48c4Sopenharmony_cibin_SCRIPTS = make-debug-archive
39da0c48c4Sopenharmony_ciEXTRA_DIST += make-debug-archive.in
40da0c48c4Sopenharmony_ciCLEANFILES += make-debug-archive
41da0c48c4Sopenharmony_ci
42da0c48c4Sopenharmony_ciif BUILD_STATIC
43da0c48c4Sopenharmony_cilibasm = ../libasm/libasm.a
44da0c48c4Sopenharmony_cilibdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
45da0c48c4Sopenharmony_cilibelf = ../libelf/libelf.a -lz
46da0c48c4Sopenharmony_cielse
47da0c48c4Sopenharmony_cilibasm = ../libasm/libasm.so
48da0c48c4Sopenharmony_cilibdw = ../libdw/libdw.so
49da0c48c4Sopenharmony_cilibelf = ../libelf/libelf.so
50da0c48c4Sopenharmony_ciendif
51da0c48c4Sopenharmony_cilibebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
52da0c48c4Sopenharmony_cilibeu = ../lib/libeu.a
53da0c48c4Sopenharmony_ci
54da0c48c4Sopenharmony_ciif DEMANGLE
55da0c48c4Sopenharmony_cidemanglelib = -lstdc++
56da0c48c4Sopenharmony_ciendif
57da0c48c4Sopenharmony_ci
58da0c48c4Sopenharmony_ci# Bad, bad stack usage...
59da0c48c4Sopenharmony_cireadelf_no_Wstack_usage = yes
60da0c48c4Sopenharmony_cinm_no_Wstack_usage = yes
61da0c48c4Sopenharmony_cisize_no_Wstack_usage = yes
62da0c48c4Sopenharmony_cistrip_no_Wstack_usage = yes
63da0c48c4Sopenharmony_cielflint_no_Wstack_usage = yes
64da0c48c4Sopenharmony_cielfcmp_no_Wstack_usage = yes
65da0c48c4Sopenharmony_ciobjdump_no_Wstack_usage = yes
66da0c48c4Sopenharmony_ciranlib_no_Wstack_usage = yes
67da0c48c4Sopenharmony_ciar_no_Wstack_usage = yes
68da0c48c4Sopenharmony_ciunstrip_no_Wstack_usage = yes
69da0c48c4Sopenharmony_ci
70da0c48c4Sopenharmony_cireadelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD)
71da0c48c4Sopenharmony_cinm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS) \
72da0c48c4Sopenharmony_ci	   $(demanglelib)
73da0c48c4Sopenharmony_cisize_LDADD = $(libelf) $(libeu) $(argp_LDADD)
74da0c48c4Sopenharmony_cistrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
75da0c48c4Sopenharmony_cielflint_LDADD  = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
76da0c48c4Sopenharmony_cifindtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
77da0c48c4Sopenharmony_ciaddr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
78da0c48c4Sopenharmony_cielfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
79da0c48c4Sopenharmony_ciobjdump_LDADD  = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
80da0c48c4Sopenharmony_ciranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
81da0c48c4Sopenharmony_cistrings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
82da0c48c4Sopenharmony_ciar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
83da0c48c4Sopenharmony_ciunstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
84da0c48c4Sopenharmony_cistack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
85da0c48c4Sopenharmony_cielfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
86da0c48c4Sopenharmony_cielfclassify_LDADD = $(libelf) $(libdw) $(libeu) $(argp_LDADD)
87da0c48c4Sopenharmony_ci
88da0c48c4Sopenharmony_ciinstallcheck-binPROGRAMS: $(bin_PROGRAMS)
89da0c48c4Sopenharmony_ci	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
90da0c48c4Sopenharmony_ci	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
91da0c48c4Sopenharmony_ci	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
92da0c48c4Sopenharmony_ci	  esac; \
93da0c48c4Sopenharmony_ci	  f=`echo "$$p" | \
94da0c48c4Sopenharmony_ci	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
95da0c48c4Sopenharmony_ci	  for opt in --help --version; do \
96da0c48c4Sopenharmony_ci	    if LD_LIBRARY_PATH=$(DESTDIR)$(libdir) \
97da0c48c4Sopenharmony_ci	       $(DESTDIR)$(bindir)/$$f $$opt > c$${pid}_.out 2> c$${pid}_.err \
98da0c48c4Sopenharmony_ci		 && test -n "`cat c$${pid}_.out`" \
99da0c48c4Sopenharmony_ci		 && test -z "`cat c$${pid}_.err`"; then :; \
100da0c48c4Sopenharmony_ci	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
101da0c48c4Sopenharmony_ci	  done; \
102da0c48c4Sopenharmony_ci	done; rm -f c$${pid}_.???; exit $$bad
103da0c48c4Sopenharmony_ci
104da0c48c4Sopenharmony_ciCLEANFILES += *.gconv
105da0c48c4Sopenharmony_ci
106da0c48c4Sopenharmony_cimake-debug-archive: $(srcdir)/make-debug-archive.in
107da0c48c4Sopenharmony_ci	$(AM_V_GEN)UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \
108da0c48c4Sopenharmony_ci	AR=$(bindir)/`echo ar | sed '$(transform)'`; \
109da0c48c4Sopenharmony_ci	sed -e "s,[@]UNSTRIP[@],$$UNSTRIP,g" -e "s,[@]AR[@],$$AR,g" \
110da0c48c4Sopenharmony_ci	    -e "s%[@]PACKAGE_NAME[@]%$(PACKAGE_NAME)%g" \
111da0c48c4Sopenharmony_ci	    -e "s%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g" \
112da0c48c4Sopenharmony_ci	    $(srcdir)/make-debug-archive.in > $@.new
113da0c48c4Sopenharmony_ci	$(AM_V_at)chmod +x $@.new
114da0c48c4Sopenharmony_ci	$(AM_V_at)mv -f $@.new $@
115