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