Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame^] | 1 | ## Process this file with automake to create Makefile.in -*-Makefile-*- |
| 2 | ## Configure input file for elfutils. |
| 3 | ## |
| 4 | ## Copyright (C) 2000, 2001, 2002 Red Hat, Inc. |
| 5 | ## |
| 6 | ## This program is Open Source software; you can redistribute it and/or |
| 7 | ## modify it under the terms of the Open Software License version 1.0 as |
| 8 | ## published by the Open Source Initiative. |
| 9 | ## |
| 10 | ## You should have received a copy of the Open Software License along |
| 11 | ## with this program; if not, you may obtain a copy of the Open Software |
| 12 | ## License version 1.0 from http://www.opensource.org/licenses/osl.php or |
| 13 | ## by writing the Open Source Initiative c/o Lawrence Rosen, Esq., |
| 14 | ## 3001 King Ranch Road, Ukiah, CA 95482. |
| 15 | ## |
| 16 | DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DDWARF_DEBUG |
| 17 | AM_CFLAGS = -Wall -Werror |
| 18 | INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib |
| 19 | VERSION = 1 |
| 20 | |
| 21 | lib_LIBRARIES = libdwarf.a |
| 22 | noinst_LIBRARIES = libdwarf_pic.a |
| 23 | noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) |
| 24 | include_HEADERS = dwarf.h |
| 25 | euincludedir = ${includedir}/elfutils |
| 26 | euinclude_HEADERS = libdwarf.h |
| 27 | |
| 28 | libdwarf_a_SOURCES = dwarf_init.c dwarf_elf_init.c dwarf_get_elf.c \ |
| 29 | dwarf_finish.c \ |
| 30 | dwarf_next_cu_header.c dwarf_siblingof.c dwarf_child.c \ |
| 31 | dwarf_offdie.c \ |
| 32 | dwarf_tag.c dwarf_dieoffset.c dwarf_die_CU_offset.c \ |
| 33 | dwarf_diename.c dwarf_attrlist.c dwarf_hasattr.c \ |
| 34 | dwarf_attr.c dwarf_lowpc.c dwarf_highpc.c \ |
| 35 | dwarf_getconstant.c \ |
| 36 | dwarf_bytesize.c dwarf_bitsize.c dwarf_bitoffset.c \ |
| 37 | dwarf_srclang.c dwarf_whatattr.c dwarf_arrayorder.c \ |
| 38 | dwarf_hasform.c dwarf_whatform.c dwarf_formref.c \ |
| 39 | dwarf_global_formref.c dwarf_formaddr.c \ |
| 40 | dwarf_formstring.c dwarf_loclist.c \ |
| 41 | dwarf_formflag.c dwarf_formudata.c dwarf_formsdata.c \ |
| 42 | dwarf_formblock.c \ |
| 43 | dwarf_srclines.c dwarf_srcfiles.c \ |
| 44 | dwarf_linebeginstatement.c dwarf_lineendsequence.c \ |
| 45 | dwarf_lineno.c dwarf_lineaddr.c dwarf_lineoff.c \ |
| 46 | dwarf_linesrc.c dwarf_lineblock.c \ |
| 47 | dwarf_lineprologueend.c dwarf_lineepiloguebegin.c \ |
| 48 | dwarf_get_globals.c dwarf_globname.c \ |
| 49 | dwarf_global_die_offset.c dwarf_global_cu_offset.c \ |
| 50 | dwarf_global_name_offsets.c \ |
| 51 | dwarf_error.c dwarf_errno.c dwarf_errmsg.c \ |
| 52 | dwarf_abbrev_hash.c dwarf_getabbrev.c dwarf_form.c \ |
| 53 | dwarf_find_macro_value_start.c dwarf_get_str.c \ |
| 54 | dwarf_get_aranges.c dwarf_get_arange.c \ |
| 55 | dwarf_get_cu_die_offset.c dwarf_get_arange_info.c \ |
| 56 | dwarf_get_fde_list_eh.c dwarf_get_cie_of_fde.c \ |
| 57 | dwarf_get_cie_info.c dwarf_get_fde_instr_bytes.c \ |
| 58 | dwarf_get_fde_range.c dwarf_get_fde_n.c \ |
| 59 | dwarf_get_fde_at_pc.c \ |
| 60 | dwarf_get_loclist_entry.c \ |
| 61 | dwarf_get_abbrev.c dwarf_get_abbrev_tag.c \ |
| 62 | dwarf_get_abbrev_code.c dwarf_get_abbrev_children_flag.c\ |
| 63 | dwarf_get_abbrev_entry.c \ |
| 64 | dwarf_get_address_size.c \ |
| 65 | dwarf_seterrhand.c dwarf_seterrarg.c \ |
| 66 | dwarf_dealloc.c |
| 67 | |
| 68 | libdwarf_pic_a_SOURCES = |
| 69 | am_libdwarf_pic_a_OBJECTS = $(libdwarf_a_SOURCES:.c=.os) |
| 70 | |
| 71 | libdwarf_so_SOURCES = |
| 72 | libdwarf.so: libdwarf_pic.a libdwarf.map |
| 73 | $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ |
| 74 | -Wl,--version-script,$(srcdir)/libdwarf.map,--no-undefined \ |
| 75 | -Wl,--soname,$@.$(VERSION),-z,defs \ |
| 76 | ../libelf/libelf.so |
| 77 | ln -fs $@ $@.$(VERSION) |
| 78 | |
| 79 | |
| 80 | %.os: %.c %.o |
| 81 | if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ |
| 82 | -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ |
| 83 | then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ |
| 84 | rm -f "$(DEPDIR)/$*.Tpo"; \ |
| 85 | else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ |
| 86 | fi |
| 87 | |
| 88 | install: install-am libdwarf.so |
| 89 | $(mkinstalldirs) $(DESTDIR)$(libdir) |
| 90 | $(INSTALL_PROGRAM) libdwarf.so $(DESTDIR)$(libdir)/libdwarf-$(PACKAGE_VERSION).so |
| 91 | ln -fs libdwarf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdwarf.so.$(VERSION) |
| 92 | ln -fs libdwarf.so.$(VERSION) $(DESTDIR)$(libdir)/libdwarf.so |
| 93 | |
| 94 | uninstall: uninstall-am |
| 95 | rm -f $(DESTDIR)$(libdir)/libdwarf-$(PACKAGE_VERSION).so |
| 96 | rm -f $(DESTDIR)$(libdir)/libdwarf.so.$(VERSION) |
| 97 | rm -f $(DESTDIR)$(libdir)/libdwarf.so |
| 98 | rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils |
| 99 | |
| 100 | noinst_HEADERS = libdwarfP.h memory-access.h dwarf_abbrev_hash.h |
| 101 | EXTRA_DIST = AVAILABLE libdwarf.map |
| 102 | |
| 103 | CLEANFILES = $(am_libdwarf_pic_a_OBJECTS) |