Blame src/Makefile.am

Packit 032894
## Process this file with automake to create Makefile.in
Packit 032894
##
Packit 032894
## Copyright (C) 1996-2014, 2016 Red Hat, Inc.
Packit 032894
## This file is part of elfutils.
Packit 032894
##
Packit 032894
## This file is free software; you can redistribute it and/or modify
Packit 032894
## it under the terms of the GNU General Public License as published by
Packit 032894
## the Free Software Foundation; either version 3 of the License, or
Packit 032894
## (at your option) any later version.
Packit 032894
##
Packit 032894
## elfutils is distributed in the hope that it will be useful, but
Packit 032894
## WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 032894
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 032894
## GNU General Public License for more details.
Packit 032894
##
Packit 032894
## You should have received a copy of the GNU General Public License
Packit 032894
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 032894
##
Packit 032894
include $(top_srcdir)/config/eu.am
Packit 032894
DEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \
Packit 032894
	-DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
Packit 032894
AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
Packit 032894
	    -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
Packit 032894
	    -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm
Packit 032894
Packit 032894
AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw
Packit 032894
Packit 032894
bin_PROGRAMS = readelf nm size strip elflint findtextrel addr2line \
Packit 032894
	       elfcmp objdump ranlib strings ar unstrip stack elfcompress \
Packit 032894
	       elfclassify
Packit 032894
Packit 032894
noinst_LIBRARIES = libar.a
Packit 032894
Packit 032894
libar_a_SOURCES = arlib.c arlib2.c arlib-argp.c
Packit 032894
Packit 032894
EXTRA_DIST = arlib.h debugpred.h
Packit 032894
Packit 032894
bin_SCRIPTS = make-debug-archive
Packit 032894
EXTRA_DIST += make-debug-archive.in
Packit 032894
CLEANFILES += make-debug-archive
Packit 032894
Packit 032894
if BUILD_STATIC
Packit 032894
libasm = ../libasm/libasm.a
Packit 032894
libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
Packit 032894
libelf = ../libelf/libelf.a -lz
Packit 032894
else
Packit 032894
libasm = ../libasm/libasm.so
Packit 032894
libdw = ../libdw/libdw.so
Packit 032894
libelf = ../libelf/libelf.so
Packit 032894
endif
Packit 032894
libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
Packit 032894
libeu = ../lib/libeu.a
Packit 032894
Packit 032894
if DEMANGLE
Packit 032894
demanglelib = -lstdc++
Packit 032894
endif
Packit 032894
Packit 032894
# Bad, bad stack usage...
Packit 032894
readelf_no_Wstack_usage = yes
Packit 032894
nm_no_Wstack_usage = yes
Packit 032894
size_no_Wstack_usage = yes
Packit 032894
strip_no_Wstack_usage = yes
Packit 032894
elflint_no_Wstack_usage = yes
Packit 032894
findtextrel_no_Wstack_usage = yes
Packit 032894
elfcmp_no_Wstack_usage = yes
Packit 032894
objdump_no_Wstack_usage = yes
Packit 032894
ranlib_no_Wstack_usage = yes
Packit 032894
ar_no_Wstack_usage = yes
Packit 032894
unstrip_no_Wstack_usage = yes
Packit 032894
Packit 032894
readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
Packit 032894
	   $(demanglelib)
Packit 032894
size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
Packit 032894
elflint_LDADD  = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
Packit 032894
elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
objdump_LDADD  = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
Packit 032894
unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
Packit 032894
stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
Packit 032894
elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
Packit 032894
elfclassify_LDADD = $(libelf) $(libdw) $(libeu) $(argp_LDADD)
Packit 032894
Packit 032894
installcheck-binPROGRAMS: $(bin_PROGRAMS)
Packit 032894
	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
Packit 032894
	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
Packit 032894
	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
Packit 032894
	  esac; \
Packit 032894
	  f=`echo "$$p" | \
Packit 032894
	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
Packit 032894
	  for opt in --help --version; do \
Packit 032894
	    if LD_LIBRARY_PATH=$(DESTDIR)$(libdir) \
Packit 032894
	       $(DESTDIR)$(bindir)/$$f $$opt > c$${pid}_.out 2> c$${pid}_.err \
Packit 032894
		 && test -n "`cat c$${pid}_.out`" \
Packit 032894
		 && test -z "`cat c$${pid}_.err`"; then :; \
Packit 032894
	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
Packit 032894
	  done; \
Packit 032894
	done; rm -f c$${pid}_.???; exit $$bad
Packit 032894
Packit 032894
CLEANFILES += *.gconv
Packit 032894
Packit 032894
make-debug-archive: $(srcdir)/make-debug-archive.in
Packit 032894
	$(AM_V_GEN)UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \
Packit 032894
	AR=$(bindir)/`echo ar | sed '$(transform)'`; \
Packit 032894
	sed -e "s,[@]UNSTRIP[@],$$UNSTRIP,g" -e "s,[@]AR[@],$$AR,g" \
Packit 032894
	    -e "s%[@]PACKAGE_NAME[@]%$(PACKAGE_NAME)%g" \
Packit 032894
	    -e "s%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g" \
Packit 032894
	    $(srcdir)/make-debug-archive.in > $@.new
Packit 032894
	$(AM_V_at)chmod +x $@.new
Packit 032894
	$(AM_V_at)mv -f $@.new $@