1da0c48c4Sopenharmony_ci## Process this file with automake to create Makefile.in
2da0c48c4Sopenharmony_ci##
3da0c48c4Sopenharmony_ci## Copyright (C) 1996-2010, 2015 Red Hat, Inc.
4da0c48c4Sopenharmony_ci## This file is part of elfutils.
5da0c48c4Sopenharmony_ci##
6da0c48c4Sopenharmony_ci## This file is free software; you can redistribute it and/or modify
7da0c48c4Sopenharmony_ci## it under the terms of either
8da0c48c4Sopenharmony_ci##
9da0c48c4Sopenharmony_ci##   * the GNU Lesser General Public License as published by the Free
10da0c48c4Sopenharmony_ci##     Software Foundation; either version 3 of the License, or (at
11da0c48c4Sopenharmony_ci##     your option) any later version
12da0c48c4Sopenharmony_ci##
13da0c48c4Sopenharmony_ci## or
14da0c48c4Sopenharmony_ci##
15da0c48c4Sopenharmony_ci##   * the GNU General Public License as published by the Free
16da0c48c4Sopenharmony_ci##     Software Foundation; either version 2 of the License, or (at
17da0c48c4Sopenharmony_ci##     your option) any later version
18da0c48c4Sopenharmony_ci##
19da0c48c4Sopenharmony_ci## or both in parallel, as here.
20da0c48c4Sopenharmony_ci##
21da0c48c4Sopenharmony_ci## elfutils is distributed in the hope that it will be useful, but
22da0c48c4Sopenharmony_ci## WITHOUT ANY WARRANTY; without even the implied warranty of
23da0c48c4Sopenharmony_ci## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24da0c48c4Sopenharmony_ci## General Public License for more details.
25da0c48c4Sopenharmony_ci##
26da0c48c4Sopenharmony_ci## You should have received copies of the GNU General Public License and
27da0c48c4Sopenharmony_ci## the GNU Lesser General Public License along with this program.  If
28da0c48c4Sopenharmony_ci## not, see <http://www.gnu.org/licenses/>.
29da0c48c4Sopenharmony_ci##
30da0c48c4Sopenharmony_ciinclude $(top_srcdir)/config/eu.am
31da0c48c4Sopenharmony_ciif BUILD_STATIC
32da0c48c4Sopenharmony_ciAM_CFLAGS += $(fpic_CFLAGS)
33da0c48c4Sopenharmony_ciendif
34da0c48c4Sopenharmony_ci
35da0c48c4Sopenharmony_ciVERSION = 1
36da0c48c4Sopenharmony_ci
37da0c48c4Sopenharmony_cilib_LIBRARIES = libelf.a
38da0c48c4Sopenharmony_cinoinst_LIBRARIES = libelf_pic.a
39da0c48c4Sopenharmony_cinoinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
40da0c48c4Sopenharmony_ciinclude_HEADERS = libelf.h gelf.h nlist.h
41da0c48c4Sopenharmony_ci
42da0c48c4Sopenharmony_cinoinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
43da0c48c4Sopenharmony_ci		 version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \
44da0c48c4Sopenharmony_ci		 chdr_xlate.h
45da0c48c4Sopenharmony_ci
46da0c48c4Sopenharmony_ciif INSTALL_ELFH
47da0c48c4Sopenharmony_ciinclude_HEADERS += elf.h
48da0c48c4Sopenharmony_cielse
49da0c48c4Sopenharmony_cinoinst_HEADERS += elf.h
50da0c48c4Sopenharmony_ciendif
51da0c48c4Sopenharmony_ci
52da0c48c4Sopenharmony_cipkginclude_HEADERS = elf-knowledge.h
53da0c48c4Sopenharmony_ci
54da0c48c4Sopenharmony_cilibelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
55da0c48c4Sopenharmony_ci		   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
56da0c48c4Sopenharmony_ci		   gelf_getclass.c elf_getbase.c elf_getident.c \
57da0c48c4Sopenharmony_ci		   elf32_fsize.c elf64_fsize.c gelf_fsize.c \
58da0c48c4Sopenharmony_ci		   elf32_xlatetof.c elf32_xlatetom.c elf64_xlatetof.c \
59da0c48c4Sopenharmony_ci		   elf64_xlatetom.c gelf_xlate.c \
60da0c48c4Sopenharmony_ci		   elf32_getehdr.c elf64_getehdr.c gelf_getehdr.c \
61da0c48c4Sopenharmony_ci		   elf32_newehdr.c elf64_newehdr.c gelf_newehdr.c \
62da0c48c4Sopenharmony_ci		   gelf_update_ehdr.c \
63da0c48c4Sopenharmony_ci		   elf32_getphdr.c elf64_getphdr.c gelf_getphdr.c \
64da0c48c4Sopenharmony_ci		   elf32_newphdr.c elf64_newphdr.c gelf_newphdr.c \
65da0c48c4Sopenharmony_ci		   gelf_update_phdr.c \
66da0c48c4Sopenharmony_ci		   elf_getarhdr.c elf_getarsym.c \
67da0c48c4Sopenharmony_ci		   elf_rawfile.c elf_readall.c elf_cntl.c \
68da0c48c4Sopenharmony_ci		   elf_getscn.c elf_nextscn.c elf_ndxscn.c elf_newscn.c \
69da0c48c4Sopenharmony_ci		   elf32_getshdr.c elf64_getshdr.c gelf_getshdr.c \
70da0c48c4Sopenharmony_ci		   gelf_update_shdr.c \
71da0c48c4Sopenharmony_ci		   elf_strptr.c elf_rawdata.c elf_getdata.c elf_newdata.c \
72da0c48c4Sopenharmony_ci		   elf_getdata_rawchunk.c \
73da0c48c4Sopenharmony_ci		   elf_flagelf.c elf_flagehdr.c elf_flagphdr.c elf_flagscn.c \
74da0c48c4Sopenharmony_ci		   elf_flagshdr.c elf_flagdata.c elf_memory.c \
75da0c48c4Sopenharmony_ci		   elf_update.c elf32_updatenull.c elf64_updatenull.c \
76da0c48c4Sopenharmony_ci		   elf32_updatefile.c elf64_updatefile.c \
77da0c48c4Sopenharmony_ci		   gelf_getsym.c gelf_update_sym.c \
78da0c48c4Sopenharmony_ci		   gelf_getversym.c gelf_getverneed.c gelf_getvernaux.c \
79da0c48c4Sopenharmony_ci		   gelf_getverdef.c gelf_getverdaux.c \
80da0c48c4Sopenharmony_ci		   gelf_getrel.c gelf_getrela.c \
81da0c48c4Sopenharmony_ci		   gelf_update_rel.c gelf_update_rela.c \
82da0c48c4Sopenharmony_ci		   gelf_getdyn.c gelf_update_dyn.c \
83da0c48c4Sopenharmony_ci		   gelf_getmove.c gelf_update_move.c \
84da0c48c4Sopenharmony_ci		   gelf_getsyminfo.c gelf_update_syminfo.c \
85da0c48c4Sopenharmony_ci		   gelf_getauxv.c gelf_update_auxv.c \
86da0c48c4Sopenharmony_ci		   gelf_getnote.c \
87da0c48c4Sopenharmony_ci		   gelf_xlatetof.c gelf_xlatetom.c \
88da0c48c4Sopenharmony_ci		   nlist.c \
89da0c48c4Sopenharmony_ci		   gelf_getsymshndx.c gelf_update_symshndx.c \
90da0c48c4Sopenharmony_ci		   gelf_update_versym.c gelf_update_verneed.c \
91da0c48c4Sopenharmony_ci		   gelf_update_vernaux.c gelf_update_verdef.c \
92da0c48c4Sopenharmony_ci		   gelf_update_verdaux.c \
93da0c48c4Sopenharmony_ci		   elf_getphdrnum.c elf_getshdrnum.c elf_getshdrstrndx.c \
94da0c48c4Sopenharmony_ci		   gelf_checksum.c elf32_checksum.c elf64_checksum.c \
95da0c48c4Sopenharmony_ci		   libelf_crc32.c libelf_next_prime.c \
96da0c48c4Sopenharmony_ci		   elf_clone.c \
97da0c48c4Sopenharmony_ci		   gelf_getlib.c gelf_update_lib.c \
98da0c48c4Sopenharmony_ci		   elf32_offscn.c elf64_offscn.c gelf_offscn.c \
99da0c48c4Sopenharmony_ci		   elf_getaroff.c \
100da0c48c4Sopenharmony_ci		   elf_gnu_hash.c \
101da0c48c4Sopenharmony_ci		   elf_scnshndx.c \
102da0c48c4Sopenharmony_ci		   elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \
103da0c48c4Sopenharmony_ci		   elf_compress.c elf_compress_gnu.c
104da0c48c4Sopenharmony_ci
105da0c48c4Sopenharmony_cilibelf_pic_a_SOURCES =
106da0c48c4Sopenharmony_ciam_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
107da0c48c4Sopenharmony_ci
108da0c48c4Sopenharmony_cilibelf_so_DEPS = ../lib/libeu.a
109da0c48c4Sopenharmony_cilibelf_so_LDLIBS = $(libelf_so_DEPS) -lz
110da0c48c4Sopenharmony_ciif USE_LOCKS
111da0c48c4Sopenharmony_cilibelf_so_LDLIBS += -lpthread
112da0c48c4Sopenharmony_ciendif
113da0c48c4Sopenharmony_ci
114da0c48c4Sopenharmony_cilibelf_so_LIBS = libelf_pic.a
115da0c48c4Sopenharmony_cilibelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
116da0c48c4Sopenharmony_ci	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
117da0c48c4Sopenharmony_ci		-Wl,--soname,$@.$(VERSION) \
118da0c48c4Sopenharmony_ci		-Wl,--version-script,$<,--no-undefined \
119da0c48c4Sopenharmony_ci		-Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \
120da0c48c4Sopenharmony_ci		$(libelf_so_LDLIBS)
121da0c48c4Sopenharmony_ci	@$(textrel_check)
122da0c48c4Sopenharmony_ci	$(AM_V_at)ln -fs $@ $@.$(VERSION)
123da0c48c4Sopenharmony_ci
124da0c48c4Sopenharmony_ciinstall: install-am libelf.so
125da0c48c4Sopenharmony_ci	$(mkinstalldirs) $(DESTDIR)$(libdir)
126da0c48c4Sopenharmony_ci	$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
127da0c48c4Sopenharmony_ci	ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
128da0c48c4Sopenharmony_ci	ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
129da0c48c4Sopenharmony_ci
130da0c48c4Sopenharmony_ciuninstall: uninstall-am
131da0c48c4Sopenharmony_ci	rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
132da0c48c4Sopenharmony_ci	rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
133da0c48c4Sopenharmony_ci	rm -f $(DESTDIR)$(libdir)/libelf.so
134da0c48c4Sopenharmony_ci
135da0c48c4Sopenharmony_ciEXTRA_DIST = libelf.map
136da0c48c4Sopenharmony_ci
137da0c48c4Sopenharmony_ciCLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
138