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