File: Makefile.am

package info (click to toggle)
elfutils 0.176-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 21,564 kB
  • sloc: ansic: 97,648; sh: 25,875; yacc: 1,390; makefile: 1,303; lex: 129; asm: 77; awk: 34; cpp: 25; sed: 16
file content (182 lines) | stat: -rw-r--r-- 7,483 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
## Process this file with automake to create Makefile.in
##
## Copyright (C) 2000-2010, 2013, 2014 Red Hat, Inc.
## Copyright (C) 2012 Tilera Corporation
## This file is part of elfutils.
##
## This file is free software; you can redistribute it and/or modify
## it under the terms of either
##
##   * the GNU Lesser General Public License as published by the Free
##     Software Foundation; either version 3 of the License, or (at
##     your option) any later version
##
## or
##
##   * the GNU General Public License as published by the Free
##     Software Foundation; either version 2 of the License, or (at
##     your option) any later version
##
## or both in parallel, as here.
##
## elfutils is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received copies of the GNU General Public License and
## the GNU Lesser General Public License along with this program.  If
## not, see <http://www.gnu.org/licenses/>.
include $(top_srcdir)/config/eu.am
AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
	   -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw


modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
	  tilegx m68k bpf riscv parisc mips
libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
	     libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
	     libebl_parisc_pic.a libebl_mips_pic.a
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)


libelf = ../libelf/libelf.so
libdw = ../libdw/libdw.so
libeu = ../lib/libeu.a

i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
	    i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
	    i386_initreg.c i386_unwind.c
cpu_i386 = ../libcpu/libcpu_i386.a
libebl_i386_pic_a_SOURCES = $(i386_SRCS)
am_libebl_i386_pic_a_OBJECTS = $(i386_SRCS:.c=.os)

sh_SRCS = sh_init.c sh_symbol.c sh_corenote.c sh_regs.c sh_retval.c
libebl_sh_pic_a_SOURCES = $(sh_SRCS)
am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os)

x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \
	      x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \
	      x86_64_initreg.c x86_64_unwind.c x32_corenote.c
cpu_x86_64 = ../libcpu/libcpu_x86_64.a
libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS)
am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os)

ia64_SRCS = ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c
libebl_ia64_pic_a_SOURCES = $(ia64_SRCS)
am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os)

alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c \
	     alpha_corenote.c alpha_auxv.c
libebl_alpha_pic_a_SOURCES = $(alpha_SRCS)
am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os)

arm_SRCS = arm_init.c arm_symbol.c arm_regs.c arm_corenote.c \
	   arm_auxv.c arm_attrs.c arm_retval.c arm_cfi.c arm_initreg.c
libebl_arm_pic_a_SOURCES = $(arm_SRCS)
am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os)

aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c	\
	       aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \
	       aarch64_initreg.c aarch64_unwind.c
libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS)
am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os)

sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \
	     sparc_corenote.c sparc64_corenote.c sparc_auxv.c sparc_attrs.c \
             sparc_cfi.c sparc_initreg.c
libebl_sparc_pic_a_SOURCES = $(sparc_SRCS)
am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os)

ppc_SRCS = ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \
	   ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
	   ppc_cfi.c ppc_initreg.c
libebl_ppc_pic_a_SOURCES = $(ppc_SRCS)
am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os)

ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \
	     ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
	     ppc_cfi.c ppc_initreg.c ppc64_unwind.c ppc64_resolve_sym.c
libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS)
am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os)

s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
	    s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \
	    s390_unwind.c
libebl_s390_pic_a_SOURCES = $(s390_SRCS)
am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)

tilegx_SRCS = tilegx_init.c tilegx_symbol.c tilegx_regs.c \
              tilegx_retval.c tilegx_corenote.c
libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS)
am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os)

m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c \
	    m68k_retval.c m68k_corenote.c m68k_cfi.c m68k_initreg.c
libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)

# m68k prstatus core notes are described by a packed structure
# which has not naturally aligned fields. Since we don't access
# these fields directly, but take their offset to be used later
# to extract the data through elfxx_xlatetom/memmove, this isn't
# an issue.
m68k_corenote_no_Wpacked_not_aligned = yes

bpf_SRCS = bpf_init.c bpf_regs.c bpf_symbol.c
cpu_bpf = ../libcpu/libcpu_bpf.a
libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)

riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
	     riscv_initreg.c riscv_corenote.c riscv64_corenote.c riscv_retval.c
libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)

parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)

mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c mips_cfi.c
libebl_mips_pic_a_SOURCES = $(mips_SRCS)
am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)

libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
	@rm -f $(@:.so=.map)
	$(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
	  > $(@:.so=.map)
	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \
		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
		-Wl,--version-script,$(@:.so=.map),--no-undefined \
		-Wl,--as-needed $(libelf) $(libdw) $(libeu)
	@$(textrel_check)

libebl_i386.so: $(cpu_i386)
libebl_x86_64.so: $(cpu_x86_64)
libebl_bpf.so: $(cpu_bpf)

install: install-am install-ebl-modules
install-ebl-modules:
	$(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)
	for m in $(modules); do \
	  $(INSTALL_PROGRAM) libebl_$${m}.so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \
	  ln -fs libebl_$${m}-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \
	done

uninstall: uninstall-am
	for m in $(modules); do \
	  rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \
	  rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \
	done
	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)

noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def)

CLEANFILES += $(foreach m,$(modules),\
			libebl_$(m).map libebl_$(m).so \
			$(am_libebl_$(m)_pic_a_OBJECTS))