1## Process this file with automake to create Makefile.in 2## 3## Copyright (C) 2000-2010, 2013, 2014 Red Hat, Inc. 4## Copyright (C) 2012 Tilera Corporation 5## This file is part of elfutils. 6## 7## This file is free software; you can redistribute it and/or modify 8## it under the terms of either 9## 10## * the GNU Lesser General Public License as published by the Free 11## Software Foundation; either version 3 of the License, or (at 12## your option) any later version 13## 14## or 15## 16## * the GNU General Public License as published by the Free 17## Software Foundation; either version 2 of the License, or (at 18## your option) any later version 19## 20## or both in parallel, as here. 21## 22## elfutils is distributed in the hope that it will be useful, but 23## WITHOUT ANY WARRANTY; without even the implied warranty of 24## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25## General Public License for more details. 26## 27## You should have received copies of the GNU General Public License and 28## the GNU Lesser General Public License along with this program. If 29## not, see <http://www.gnu.org/licenses/>. 30include $(top_srcdir)/config/eu.am 31AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ 32 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw 33 34 35modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 36 tilegx 37libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ 38 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ 39 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ 40 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a 41noinst_LIBRARIES = $(libebl_pic) 42noinst_DATA = $(libebl_pic:_pic.a=.so) 43 44 45libelf = ../libelf/libelf.so 46libdw = ../libdw/libdw.so 47 48i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ 49 i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \ 50 i386_initreg.c 51cpu_i386 = ../libcpu/libcpu_i386.a 52libebl_i386_pic_a_SOURCES = $(i386_SRCS) 53am_libebl_i386_pic_a_OBJECTS = $(i386_SRCS:.c=.os) 54 55sh_SRCS = sh_init.c sh_symbol.c sh_corenote.c sh_regs.c sh_retval.c 56libebl_sh_pic_a_SOURCES = $(sh_SRCS) 57am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) 58 59x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ 60 x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ 61 x86_64_initreg.c x32_corenote.c 62cpu_x86_64 = ../libcpu/libcpu_x86_64.a 63libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) 64am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) 65 66ia64_SRCS = ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c 67libebl_ia64_pic_a_SOURCES = $(ia64_SRCS) 68am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os) 69 70alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c \ 71 alpha_corenote.c alpha_auxv.c 72libebl_alpha_pic_a_SOURCES = $(alpha_SRCS) 73am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os) 74 75arm_SRCS = arm_init.c arm_symbol.c arm_regs.c arm_corenote.c \ 76 arm_auxv.c arm_attrs.c arm_retval.c arm_cfi.c arm_initreg.c 77libebl_arm_pic_a_SOURCES = $(arm_SRCS) 78am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os) 79 80aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c \ 81 aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \ 82 aarch64_initreg.c 83libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS) 84am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os) 85 86sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \ 87 sparc_corenote.c sparc64_corenote.c sparc_auxv.c sparc_attrs.c \ 88 sparc_cfi.c sparc_initreg.c 89libebl_sparc_pic_a_SOURCES = $(sparc_SRCS) 90am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os) 91 92ppc_SRCS = ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \ 93 ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \ 94 ppc_cfi.c ppc_initreg.c 95libebl_ppc_pic_a_SOURCES = $(ppc_SRCS) 96am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os) 97 98ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \ 99 ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \ 100 ppc_cfi.c ppc_initreg.c ppc64_resolve_sym.c 101libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS) 102am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os) 103 104s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c \ 105 s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \ 106 s390_unwind.c 107libebl_s390_pic_a_SOURCES = $(s390_SRCS) 108am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os) 109 110tilegx_SRCS = tilegx_init.c tilegx_symbol.c tilegx_regs.c \ 111 tilegx_retval.c tilegx_corenote.c 112libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS) 113am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) 114 115 116libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) 117 @rm -f $(@:.so=.map) 118 $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ 119 > $(@:.so=.map) 120 $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ 121 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ 122 -Wl,--version-script,$(@:.so=.map) \ 123 -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) 124 @$(textrel_check) 125 126libebl_i386.so: $(cpu_i386) 127libebl_x86_64.so: $(cpu_x86_64) 128 129install: install-am install-ebl-modules 130install-ebl-modules: 131 $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) 132 for m in $(modules); do \ 133 $(INSTALL_PROGRAM) libebl_$${m}.so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ 134 ln -fs libebl_$${m}-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ 135 done 136 137uninstall: uninstall-am 138 for m in $(modules); do \ 139 rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ 140 rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ 141 done 142 rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) 143 144noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c 145EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) 146 147CLEANFILES += $(foreach m,$(modules),\ 148 libebl_$(m).map libebl_$(m).so \ 149 $(am_libebl_$(m)_pic_a_OBJECTS)) 150