Blame libelf/Makefile.am

Packit 032894
## Process this file with automake to create Makefile.in
Packit 032894
##
Packit 032894
## Copyright (C) 1996-2010, 2015 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 either
Packit 032894
##
Packit 032894
##   * the GNU Lesser General Public License as published by the Free
Packit 032894
##     Software Foundation; either version 3 of the License, or (at
Packit 032894
##     your option) any later version
Packit 032894
##
Packit 032894
## or
Packit 032894
##
Packit 032894
##   * the GNU General Public License as published by the Free
Packit 032894
##     Software Foundation; either version 2 of the License, or (at
Packit 032894
##     your option) any later version
Packit 032894
##
Packit 032894
## or both in parallel, as here.
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 GNU
Packit 032894
## General Public License for more details.
Packit 032894
##
Packit 032894
## You should have received copies of the GNU General Public License and
Packit 032894
## the GNU Lesser General Public License along with this program.  If
Packit 032894
## not, see <http://www.gnu.org/licenses/>.
Packit 032894
##
Packit 032894
include $(top_srcdir)/config/eu.am
Packit 032894
if BUILD_STATIC
Packit 032894
AM_CFLAGS += $(fpic_CFLAGS)
Packit 032894
endif
Packit 032894
GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
Packit 032894
VERSION = 1
Packit 032894
Packit 032894
lib_LIBRARIES = libelf.a
Packit 032894
noinst_LIBRARIES = libelf_pic.a
Packit 032894
noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
Packit 032894
include_HEADERS = libelf.h gelf.h nlist.h
Packit 032894
Packit 032894
noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
Packit 032894
		 version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \
Packit 032894
		 chdr_xlate.h
Packit 032894
Packit 032894
if INSTALL_ELFH
Packit 032894
include_HEADERS += elf.h
Packit 032894
else
Packit 032894
noinst_HEADERS += elf.h
Packit 032894
endif
Packit 032894
Packit 032894
pkginclude_HEADERS = elf-knowledge.h
Packit 032894
Packit 032894
libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
Packit 032894
		   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
Packit 032894
		   gelf_getclass.c elf_getbase.c elf_getident.c \
Packit 032894
		   elf32_fsize.c elf64_fsize.c gelf_fsize.c \
Packit 032894
		   elf32_xlatetof.c elf32_xlatetom.c elf64_xlatetof.c \
Packit 032894
		   elf64_xlatetom.c gelf_xlate.c \
Packit 032894
		   elf32_getehdr.c elf64_getehdr.c gelf_getehdr.c \
Packit 032894
		   elf32_newehdr.c elf64_newehdr.c gelf_newehdr.c \
Packit 032894
		   gelf_update_ehdr.c \
Packit 032894
		   elf32_getphdr.c elf64_getphdr.c gelf_getphdr.c \
Packit 032894
		   elf32_newphdr.c elf64_newphdr.c gelf_newphdr.c \
Packit 032894
		   gelf_update_phdr.c \
Packit 032894
		   elf_getarhdr.c elf_getarsym.c \
Packit 032894
		   elf_rawfile.c elf_readall.c elf_cntl.c \
Packit 032894
		   elf_getscn.c elf_nextscn.c elf_ndxscn.c elf_newscn.c \
Packit 032894
		   elf32_getshdr.c elf64_getshdr.c gelf_getshdr.c \
Packit 032894
		   gelf_update_shdr.c \
Packit 032894
		   elf_strptr.c elf_rawdata.c elf_getdata.c elf_newdata.c \
Packit 032894
		   elf_getdata_rawchunk.c \
Packit 032894
		   elf_flagelf.c elf_flagehdr.c elf_flagphdr.c elf_flagscn.c \
Packit 032894
		   elf_flagshdr.c elf_flagdata.c elf_memory.c \
Packit 032894
		   elf_update.c elf32_updatenull.c elf64_updatenull.c \
Packit 032894
		   elf32_updatefile.c elf64_updatefile.c \
Packit 032894
		   gelf_getsym.c gelf_update_sym.c \
Packit 032894
		   gelf_getversym.c gelf_getverneed.c gelf_getvernaux.c \
Packit 032894
		   gelf_getverdef.c gelf_getverdaux.c \
Packit 032894
		   gelf_getrel.c gelf_getrela.c \
Packit 032894
		   gelf_update_rel.c gelf_update_rela.c \
Packit 032894
		   gelf_getdyn.c gelf_update_dyn.c \
Packit 032894
		   gelf_getmove.c gelf_update_move.c \
Packit 032894
		   gelf_getsyminfo.c gelf_update_syminfo.c \
Packit 032894
		   gelf_getauxv.c gelf_update_auxv.c \
Packit 032894
		   gelf_getnote.c \
Packit 032894
		   gelf_xlatetof.c gelf_xlatetom.c \
Packit 032894
		   nlist.c \
Packit 032894
		   gelf_getsymshndx.c gelf_update_symshndx.c \
Packit 032894
		   gelf_update_versym.c gelf_update_verneed.c \
Packit 032894
		   gelf_update_vernaux.c gelf_update_verdef.c \
Packit 032894
		   gelf_update_verdaux.c \
Packit 032894
		   elf_getphdrnum.c elf_getshdrnum.c elf_getshdrstrndx.c \
Packit 032894
		   gelf_checksum.c elf32_checksum.c elf64_checksum.c \
Packit 032894
		   libelf_crc32.c libelf_next_prime.c \
Packit 032894
		   elf_clone.c \
Packit 032894
		   gelf_getlib.c gelf_update_lib.c \
Packit 032894
		   elf32_offscn.c elf64_offscn.c gelf_offscn.c \
Packit 032894
		   elf_getaroff.c \
Packit 032894
		   elf_gnu_hash.c \
Packit 032894
		   elf_scnshndx.c \
Packit 032894
		   elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \
Packit 032894
		   elf_compress.c elf_compress_gnu.c
Packit 032894
Packit 032894
libelf_pic_a_SOURCES =
Packit 032894
am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
Packit 032894
Packit 032894
libelf_so_DEPS = ../lib/libeu.a
Packit 032894
libelf_so_LDLIBS = $(libelf_so_DEPS) -lz
Packit 032894
if USE_LOCKS
Packit 032894
libelf_so_LDLIBS += -lpthread
Packit 032894
endif
Packit 032894
Packit 032894
libelf_so_LIBS = libelf_pic.a
Packit 032894
libelf_so_SOURCES =
Packit 032894
libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
Packit 032894
	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
Packit 032894
		-Wl,--soname,$@.$(VERSION) \
Packit 032894
		-Wl,--version-script,$<,--no-undefined \
Packit 032894
		-Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \
Packit 032894
		$(libelf_so_LDLIBS)
Packit 032894
	@$(textrel_check)
Packit 032894
	$(AM_V_at)ln -fs $@ $@.$(VERSION)
Packit 032894
Packit 032894
install: install-am libelf.so
Packit 032894
	$(mkinstalldirs) $(DESTDIR)$(libdir)
Packit 032894
	$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
Packit 032894
	ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
Packit 032894
	ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
Packit 032894
Packit 032894
uninstall: uninstall-am
Packit 032894
	rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
Packit 032894
	rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
Packit 032894
	rm -f $(DESTDIR)$(libdir)/libelf.so
Packit 032894
Packit 032894
EXTRA_DIST = libelf.map
Packit 032894
Packit 032894
CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION)