## Makefile.am for libdbgserver library subdirectory in elfutils. ## ## Process this file with automake to create Makefile.in ## ## Copyright (C) 2019 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 either ## ## * the GNU Lesser General Public License as published by the Free ## Software Foundation; either version 3 of the License, or (at ## your option) any later version ## ## or ## ## * the GNU General Public License as published by the Free ## Software Foundation; either version 2 of the License, or (at ## your option) any later version ## ## or both in parallel, as here. ## ## 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 copies of the GNU General Public License and ## the GNU Lesser General Public License along with this program. If ## not, see . ## include $(top_srcdir)/config/eu.am AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf -Wno-format-truncation VERSION = 1 # Disable eu- prefixing for the binaries in this directory, since they # do not conflict with binutils tools. program_prefix= program_transform_name = s,x,x, if BUILD_STATIC libasm = ../libasm/libasm.a libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl libelf = ../libelf/libelf.a -lz libdbgserver = ./libdbgserver.a else libasm = ../libasm/libasm.so libdw = ../libdw/libdw.so libelf = ../libelf/libelf.so libdbgserver = ./libdbgserver.so endif libebl = ../libebl/libebl.a libeu = ../lib/libeu.a AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw:. bin_PROGRAMS = dbgserver dbgserver-find dbgserver_SOURCES = dbgserver.cxx man8_MANS = dbgserver.8 man3_MANS = dbgserver_find_debuginfo.3 dbgserver_find_source.3 dbgserver_find_executable.3 man1_MANS = dbgserver-find.1 dbgserver_LDADD = $(libdw) $(libelf) $(libeu) $(libdbgserver) $(libmicrohttpd_LIBS) $(libcurl_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl dbgserver_find_SOURCES = dbgserver-find.c dbgserver_find_LDADD = $(libeu) $(libdbgserver) noinst_LIBRARIES = libdbgserver.a noinst_LIBRARIES += libdbgserver_pic.a libdbgserver_a_SOURCES = dbgserver-client.c libdbgserver_pic_a_SOURCES = dbgserver-client.c am_libdbgserver_pic_a_OBJECTS = $(libdbgserver_a_SOURCES:.c=.os) pkginclude_HEADERS = dbgserver-client.h libdbgserver_so_LIBS = libdbgserver_pic.a libdbgserver_so_LDLIBS = $(libcurl_LIBS) libdbgserver_so_SOURCES = dbgserver-client.c libdbgserver.so$(EXEEXT): $(srcdir)/libdbgserver.map $(libdbgserver_so_LIBS) $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -Wl,--soname,$@.$(VERSION) \ -Wl,--version-script,$<,--no-undefined \ -Wl,--whole-archive $(libdbgserver_so_LIBS) -Wl,--no-whole-archive \ $(libdbgserver_so_LDLIBS) @$(textrel_check) $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libdbgserver.so $(mkinstalldirs) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) libdbgserver.so $(DESTDIR)$(libdir)/libdbgserver-$(PACKAGE_VERSION).so ln -fs libdbgserver-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdbgserver.so.$(VERSION) ln -fs libdbgserver.so.$(VERSION) $(DESTDIR)$(libdir)/libdbgserver.so uninstall: uninstall-am rm -f $(DESTDIR)$(libdir)/libdbgserver-$(PACKAGE_VERSION).so rm -f $(DESTDIR)$(libdir)/libdbgserver.so.$(VERSION) rm -f $(DESTDIR)$(libdir)/libdbgserver.so rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils EXTRA_DIST = libdbgserver.map dbgserver.8 dbgserver-find.1 dbgserver_find_debuginfo.3 dbgserver_find_source.3 dbgserver_find_executable.3 MOSTLYCLEANFILES = $(am_libdbgserver_pic_a_OBJECTS) libdbgserver.so.$(VERSION) CLEANFILES += $(am_libdbgserver_pic_a_OBJECTS) libdbgserver.so # automake std-options override: arrange to pass LD_LIBRARY_PATH 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_LIBRARY_PATH=$(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