Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 1 | ## Process this file with automake to create Makefile.in |
| 2 | ## |
Mark Wielaard | f48eb6b | 2014-01-23 00:56:41 +0100 | [diff] [blame] | 3 | ## Copyright (C) 2000-2010, 2013, 2014 Red Hat, Inc. |
Jeff Kenton | 257dcf4 | 2012-08-22 09:00:03 -0400 | [diff] [blame] | 4 | ## Copyright (C) 2012 Tilera Corporation |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 5 | ## This file is part of elfutils. |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 6 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 7 | ## This file is free software; you can redistribute it and/or modify |
| 8 | ## it under the terms of either |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 9 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 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 |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 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 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 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/>. |
Roland McGrath | 22359e2 | 2010-02-15 15:57:03 -0800 | [diff] [blame] | 30 | include $(top_srcdir)/config/eu.am |
Mark Wielaard | cdaaf21 | 2013-04-25 16:50:11 -0400 | [diff] [blame] | 31 | AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ |
Roland McGrath | 22359e2 | 2010-02-15 15:57:03 -0800 | [diff] [blame] | 32 | -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 33 | |
| 34 | |
Petr Machata | 98c8a73 | 2013-11-26 03:10:31 +0100 | [diff] [blame] | 35 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ |
| 36 | tilegx |
| 37 | libebl_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 |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 41 | noinst_LIBRARIES = $(libebl_pic) |
| 42 | noinst_DATA = $(libebl_pic:_pic.a=.so) |
| 43 | |
| 44 | |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 45 | libelf = ../libelf/libelf.so |
| 46 | libdw = ../libdw/libdw.so |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 47 | |
Roland McGrath | 3c84db3 | 2009-06-24 17:41:40 -0700 | [diff] [blame] | 48 | i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ |
Jan Kratochvil | 0b86746 | 2013-05-30 14:37:38 +0200 | [diff] [blame] | 49 | i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \ |
| 50 | i386_initreg.c |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 51 | cpu_i386 = ../libcpu/libcpu_i386.a |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 52 | libebl_i386_pic_a_SOURCES = $(i386_SRCS) |
| 53 | am_libebl_i386_pic_a_OBJECTS = $(i386_SRCS:.c=.os) |
| 54 | |
Matt Fleming | d80f0b2 | 2010-04-10 19:13:37 -0700 | [diff] [blame] | 55 | sh_SRCS = sh_init.c sh_symbol.c sh_corenote.c sh_regs.c sh_retval.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 56 | libebl_sh_pic_a_SOURCES = $(sh_SRCS) |
| 57 | am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) |
| 58 | |
Roland McGrath | 3c84db3 | 2009-06-24 17:41:40 -0700 | [diff] [blame] | 59 | x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ |
Jan Kratochvil | 0b86746 | 2013-05-30 14:37:38 +0200 | [diff] [blame] | 60 | x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ |
H.J. Lu | 28ce4e8 | 2015-03-12 14:51:42 -0700 | [diff] [blame] | 61 | x86_64_initreg.c x32_corenote.c |
Ulrich Drepper | ff99322 | 2008-01-09 05:39:28 +0000 | [diff] [blame] | 62 | cpu_x86_64 = ../libcpu/libcpu_x86_64.a |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 63 | libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) |
| 64 | am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) |
| 65 | |
Roland McGrath | 9502462 | 2006-07-21 10:06:31 +0000 | [diff] [blame] | 66 | ia64_SRCS = ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 67 | libebl_ia64_pic_a_SOURCES = $(ia64_SRCS) |
| 68 | am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os) |
| 69 | |
Roland McGrath | cb6d865 | 2007-08-23 08:10:54 +0000 | [diff] [blame] | 70 | alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c \ |
Roland McGrath | 059c83e | 2008-02-21 06:19:39 +0000 | [diff] [blame] | 71 | alpha_corenote.c alpha_auxv.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 72 | libebl_alpha_pic_a_SOURCES = $(alpha_SRCS) |
| 73 | am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os) |
| 74 | |
Roland McGrath | eb9ba47 | 2009-04-14 18:44:45 -0700 | [diff] [blame] | 75 | arm_SRCS = arm_init.c arm_symbol.c arm_regs.c arm_corenote.c \ |
Mark Wielaard | 225dddf | 2014-01-26 20:16:48 +0100 | [diff] [blame] | 76 | arm_auxv.c arm_attrs.c arm_retval.c arm_cfi.c arm_initreg.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 77 | libebl_arm_pic_a_SOURCES = $(arm_SRCS) |
| 78 | am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os) |
| 79 | |
Petr Machata | 98c8a73 | 2013-11-26 03:10:31 +0100 | [diff] [blame] | 80 | aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c \ |
Mark Wielaard | 66637fa | 2014-04-09 11:48:23 +0200 | [diff] [blame] | 81 | aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \ |
| 82 | aarch64_initreg.c |
Petr Machata | 98c8a73 | 2013-11-26 03:10:31 +0100 | [diff] [blame] | 83 | libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS) |
| 84 | am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os) |
Petr Machata | 98c8a73 | 2013-11-26 03:10:31 +0100 | [diff] [blame] | 85 | |
Ulrich Drepper | b597dfa | 2007-10-16 05:21:27 +0000 | [diff] [blame] | 86 | sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \ |
Jose E. Marchesi | a8a22a3 | 2015-12-08 19:10:42 +0100 | [diff] [blame] | 87 | sparc_corenote.c sparc64_corenote.c sparc_auxv.c sparc_attrs.c \ |
Jose E. Marchesi | 67c15c4 | 2015-12-08 19:10:43 +0100 | [diff] [blame] | 88 | sparc_cfi.c sparc_initreg.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 89 | libebl_sparc_pic_a_SOURCES = $(sparc_SRCS) |
| 90 | am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os) |
| 91 | |
Roland McGrath | cb6d865 | 2007-08-23 08:10:54 +0000 | [diff] [blame] | 92 | ppc_SRCS = ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \ |
Jan Kratochvil | ed9d2ca | 2013-08-27 22:49:36 +0200 | [diff] [blame] | 93 | ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \ |
Jan Kratochvil | 5cbf42a | 2013-12-15 18:56:17 +0100 | [diff] [blame] | 94 | ppc_cfi.c ppc_initreg.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 95 | libebl_ppc_pic_a_SOURCES = $(ppc_SRCS) |
| 96 | am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os) |
| 97 | |
Roland McGrath | cb6d865 | 2007-08-23 08:10:54 +0000 | [diff] [blame] | 98 | ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \ |
Jan Kratochvil | ed9d2ca | 2013-08-27 22:49:36 +0200 | [diff] [blame] | 99 | ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \ |
Mark Wielaard | 159ac52 | 2013-12-18 11:05:54 +0100 | [diff] [blame] | 100 | ppc_cfi.c ppc_initreg.c ppc64_resolve_sym.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 101 | libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS) |
| 102 | am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os) |
| 103 | |
Jan Kratochvil | cc84d79 | 2012-10-10 19:32:05 +0200 | [diff] [blame] | 104 | s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c \ |
Jan Kratochvil | c6a4148 | 2013-12-17 18:49:54 +0100 | [diff] [blame] | 105 | s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \ |
| 106 | s390_unwind.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 107 | libebl_s390_pic_a_SOURCES = $(s390_SRCS) |
| 108 | am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os) |
| 109 | |
Jeff Kenton | 257dcf4 | 2012-08-22 09:00:03 -0400 | [diff] [blame] | 110 | tilegx_SRCS = tilegx_init.c tilegx_symbol.c tilegx_regs.c \ |
| 111 | tilegx_retval.c tilegx_corenote.c |
| 112 | libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS) |
| 113 | am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) |
| 114 | |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 115 | |
Roland McGrath | 9e92418 | 2010-02-18 14:33:48 -0800 | [diff] [blame] | 116 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) |
| 117 | @rm -f $(@:.so=.map) |
Josh Stone | daee471 | 2015-10-05 11:04:15 -0700 | [diff] [blame] | 118 | $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ |
Roland McGrath | 9e92418 | 2010-02-18 14:33:48 -0800 | [diff] [blame] | 119 | > $(@:.so=.map) |
Josh Stone | daee471 | 2015-10-05 11:04:15 -0700 | [diff] [blame] | 120 | $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ |
Roland McGrath | 9e92418 | 2010-02-18 14:33:48 -0800 | [diff] [blame] | 121 | -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ |
| 122 | -Wl,--version-script,$(@:.so=.map) \ |
Mark Wielaard | 3232479 | 2014-04-13 17:39:57 +0200 | [diff] [blame] | 123 | -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) |
Ulrich Drepper | 898ed26 | 2014-12-18 12:32:39 -0500 | [diff] [blame] | 124 | @$(textrel_check) |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 125 | |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 126 | libebl_i386.so: $(cpu_i386) |
| 127 | libebl_x86_64.so: $(cpu_x86_64) |
| 128 | |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 129 | install: install-am install-ebl-modules |
| 130 | install-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 | |
| 137 | uninstall: 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) |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 143 | |
Roland McGrath | a845f68 | 2008-12-03 03:41:58 +0000 | [diff] [blame] | 144 | noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 145 | EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) |
| 146 | |
Roland McGrath | 22359e2 | 2010-02-15 15:57:03 -0800 | [diff] [blame] | 147 | CLEANFILES += $(foreach m,$(modules),\ |
Roland McGrath | 9e92418 | 2010-02-18 14:33:48 -0800 | [diff] [blame] | 148 | libebl_$(m).map libebl_$(m).so \ |
| 149 | $(am_libebl_$(m)_pic_a_OBJECTS)) |