blob: 57cf567c90df8323287266aa20d8d6a69b7ab48c [file] [log] [blame]
## Process this file with automake to create Makefile.in -*-Makefile-*-
## Configure input file for elfutils.
##
## Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
## This file is part of Red Hat elfutils.
##
## Red Hat elfutils 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; version 2 of the License.
##
## Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
##
## Red Hat elfutils is an included package of the Open Invention Network.
## An included package of the Open Invention Network is a package for which
## Open Invention Network licensees cross-license their patents. No patent
## license is granted, either expressly or impliedly, by designation as an
## included package. Should you wish to participate in the Open Invention
## Network licensing program, please visit www.openinventionnetwork.com
## <http://www.openinventionnetwork.com>.
##
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DDWARF_DEBUG
AM_CFLAGS = -Wall -Werror
INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
VERSION = 1
lib_LIBRARIES = libdwarf.a
noinst_LIBRARIES = libdwarf_pic.a
noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
include_HEADERS = dwarf.h
euincludedir = ${includedir}/elfutils
euinclude_HEADERS = libdwarf.h
libdwarf_a_SOURCES = dwarf_init.c dwarf_elf_init.c dwarf_get_elf.c \
dwarf_finish.c \
dwarf_next_cu_header.c dwarf_siblingof.c dwarf_child.c \
dwarf_offdie.c \
dwarf_tag.c dwarf_dieoffset.c dwarf_die_CU_offset.c \
dwarf_diename.c dwarf_attrlist.c dwarf_hasattr.c \
dwarf_attr.c dwarf_lowpc.c dwarf_highpc.c \
dwarf_getconstant.c \
dwarf_bytesize.c dwarf_bitsize.c dwarf_bitoffset.c \
dwarf_srclang.c dwarf_whatattr.c dwarf_arrayorder.c \
dwarf_hasform.c dwarf_whatform.c dwarf_formref.c \
dwarf_global_formref.c dwarf_formaddr.c \
dwarf_formstring.c dwarf_loclist.c \
dwarf_formflag.c dwarf_formudata.c dwarf_formsdata.c \
dwarf_formblock.c \
dwarf_srclines.c dwarf_srcfiles.c \
dwarf_linebeginstatement.c dwarf_lineendsequence.c \
dwarf_lineno.c dwarf_lineaddr.c dwarf_lineoff.c \
dwarf_linesrc.c dwarf_lineblock.c \
dwarf_lineprologueend.c dwarf_lineepiloguebegin.c \
dwarf_get_globals.c dwarf_globname.c \
dwarf_global_die_offset.c dwarf_global_cu_offset.c \
dwarf_global_name_offsets.c \
dwarf_error.c dwarf_errno.c dwarf_errmsg.c \
dwarf_abbrev_hash.c dwarf_getabbrev.c dwarf_form.c \
dwarf_find_macro_value_start.c dwarf_get_str.c \
dwarf_get_aranges.c dwarf_get_arange.c \
dwarf_get_cu_die_offset.c dwarf_get_arange_info.c \
dwarf_get_fde_list_eh.c dwarf_get_cie_of_fde.c \
dwarf_get_cie_info.c dwarf_get_fde_instr_bytes.c \
dwarf_get_fde_range.c dwarf_get_fde_n.c \
dwarf_get_fde_at_pc.c \
dwarf_get_loclist_entry.c \
dwarf_get_abbrev.c dwarf_get_abbrev_tag.c \
dwarf_get_abbrev_code.c dwarf_get_abbrev_children_flag.c\
dwarf_get_abbrev_entry.c \
dwarf_get_address_size.c \
dwarf_seterrhand.c dwarf_seterrarg.c \
dwarf_dealloc.c
libdwarf_pic_a_SOURCES =
am_libdwarf_pic_a_OBJECTS = $(libdwarf_a_SOURCES:.c=.os)
libdwarf_so_SOURCES =
libdwarf.so: libdwarf_pic.a libdwarf.map
$(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-Wl,--version-script,$(srcdir)/libdwarf.map,--no-undefined \
-Wl,--soname,$@.$(VERSION),-z,defs \
../libelf/libelf.so
ln -fs $@ $@.$(VERSION)
%.os: %.c %.o
if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
-MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
rm -f "$(DEPDIR)/$*.Tpo"; \
else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
fi
install: install-am libdwarf.so
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) libdwarf.so $(DESTDIR)$(libdir)/libdwarf-$(PACKAGE_VERSION).so
ln -fs libdwarf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdwarf.so.$(VERSION)
ln -fs libdwarf.so.$(VERSION) $(DESTDIR)$(libdir)/libdwarf.so
uninstall: uninstall-am
rm -f $(DESTDIR)$(libdir)/libdwarf-$(PACKAGE_VERSION).so
rm -f $(DESTDIR)$(libdir)/libdwarf.so.$(VERSION)
rm -f $(DESTDIR)$(libdir)/libdwarf.so
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
noinst_HEADERS = libdwarfP.h memory-access.h dwarf_abbrev_hash.h
EXTRA_DIST = AVAILABLE libdwarf.map
CLEANFILES = $(am_libdwarf_pic_a_OBJECTS)