]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | ## Process this file with automake to generate Makefile.in |
5bf135a7 | 2 | # |
fd67aa11 | 3 | # Copyright (C) 2012-2024 Free Software Foundation, Inc. |
5bf135a7 NC |
4 | # |
5 | # This file is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 3 of the License, or | |
8 | # (at your option) any later version. | |
f2c7d7ee | 9 | # |
5bf135a7 NC |
10 | # This program is distributed in the hope that it will be useful, |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
f2c7d7ee | 14 | # |
5bf135a7 NC |
15 | # You should have received a copy of the GNU General Public License |
16 | # along with this program; see the file COPYING3. If not see | |
17 | # <http://www.gnu.org/licenses/>. | |
18 | # | |
252b5132 | 19 | |
d0ac1c44 | 20 | AUTOMAKE_OPTIONS = dejagnu no-texinfo.tex no-dist foreign info-in-builddir |
79887925 | 21 | ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd |
959a202e | 22 | TEXINFO_TEX = ../texinfo/texinfo.tex |
252b5132 RH |
23 | |
24 | SUBDIRS = po | |
25 | ||
26 | tooldir = $(exec_prefix)/$(target_alias) | |
27 | ||
a7e78dae | 28 | YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi` |
252b5132 | 29 | YFLAGS = -d |
a7e78dae | 30 | LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` |
252b5132 | 31 | |
a15af8e2 RW |
32 | # Automake 1.10+ disables lex and yacc output file regeneration if |
33 | # maintainer mode is disabled. Avoid this. | |
34 | am__skiplex = | |
35 | am__skipyacc = | |
36 | ||
1ff6de03 NA |
37 | # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is |
38 | # -I../zlib, unless we were configured with --with-system-zlib, in which | |
39 | # case both are empty. | |
40 | ZLIB = @zlibdir@ -lz | |
41 | ZLIBINC = @zlibinc@ | |
42 | ||
be3bed06 | 43 | ELF_CFLAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \ |
c58212ea L |
44 | -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \ |
45 | -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ | |
a2d91340 | 46 | WARN_CFLAGS = @WARN_CFLAGS@ |
9e9b66a9 | 47 | NO_WERROR = @NO_WERROR@ |
be3bed06 | 48 | AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS) |
a2d91340 | 49 | |
252b5132 RH |
50 | # We put the scripts in the directory $(scriptdir)/ldscripts. |
51 | # We can't put the scripts in $(datadir) because the SEARCH_DIR | |
52 | # directives need to be different for native and cross linkers. | |
53 | scriptdir = $(tooldir)/lib | |
54 | ||
55 | EMUL = @EMUL@ | |
56 | EMULATION_OFILES = @EMULATION_OFILES@ | |
57 | EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@ | |
5063daf7 | 58 | |
252b5132 RH |
59 | |
60 | # Search path to override the default search path for -lfoo libraries. | |
61 | # If LIB_PATH is empty, the ones in the script (if any) are left alone. | |
62 | # (The default is usually /lib:/usr/lib:/usr/local/lib, unless building | |
63 | # a cross-linker, in which case the default is empty. See genscripts.sh.) | |
64 | # Otherwise, they are replaced with the ones given in LIB_PATH, | |
8e523c23 NC |
65 | # which may have the form: LIB_PATH=/lib:/usr/local/lib. This can be set |
66 | # when the linker is configured via the --with-lib-path configure switch. | |
67 | LIB_PATH = @LIB_PATH@ | |
252b5132 RH |
68 | |
69 | BASEDIR = $(srcdir)/.. | |
70 | BFDDIR = $(BASEDIR)/bfd | |
71 | INCDIR = $(BASEDIR)/include | |
252b5132 RH |
72 | |
73 | # What version of the manual to build | |
74 | DOCVER = gen | |
75 | ||
d0ac1c44 | 76 | # Options to extract the man page from ld.texi |
0285c67d NC |
77 | MANCONF = -Dman |
78 | ||
38fc1cb1 | 79 | TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS) |
0285c67d | 80 | |
ff5dcc92 SC |
81 | POD2MAN = pod2man --center="GNU Development Tools" \ |
82 | --release="binutils-$(VERSION)" --section=1 | |
0285c67d | 83 | |
252b5132 | 84 | # Setup the testing framework, if you have one |
c3298874 BE |
85 | EXPECT = expect |
86 | RUNTEST = runtest | |
252b5132 RH |
87 | RUNTESTFLAGS = |
88 | ||
89 | CC_FOR_TARGET = ` \ | |
90 | if [ -f $$r/../gcc/xgcc ] ; then \ | |
91 | if [ -f $$r/../newlib/Makefile ] ; then \ | |
92 | echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ | |
93 | else \ | |
94 | echo $$r/../gcc/xgcc -B$$r/../gcc/; \ | |
95 | fi; \ | |
96 | else \ | |
97 | if [ "@host@" = "@target@" ] ; then \ | |
98 | echo $(CC); \ | |
99 | else \ | |
100 | echo gcc | sed '$(transform)'; \ | |
101 | fi; \ | |
102 | fi` | |
103 | ||
252b5132 | 104 | CXX_FOR_TARGET = ` \ |
55255dae | 105 | if [ -f $$r/../gcc/g++ ] ; then \ |
252b5132 | 106 | if [ -f $$r/../newlib/Makefile ] ; then \ |
55255dae | 107 | echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ |
252b5132 | 108 | else \ |
55255dae | 109 | echo $$r/../gcc/g++ -B$$r/../gcc/; \ |
252b5132 | 110 | fi; \ |
06ea285d NC |
111 | elif [ -f $$r/../gcc/xg++ ] ; then \ |
112 | if [ -f $$r/../newlib/Makefile ] ; then \ | |
113 | echo $$r/../gcc/xg++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ | |
114 | else \ | |
115 | echo $$r/../gcc/xg++ -B$$r/../gcc/; \ | |
116 | fi; \ | |
252b5132 RH |
117 | else \ |
118 | if [ "@host@" = "@target@" ] ; then \ | |
119 | echo $(CXX); \ | |
120 | else \ | |
55255dae | 121 | echo g++ | sed '$(transform)'; \ |
252b5132 RH |
122 | fi; \ |
123 | fi` | |
124 | ||
22d6c51b | 125 | # Strip out sanitization options as we want to test building binaries without any extra paraphernalia |
669d5115 AM |
126 | CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=[^ ]*//g'` |
127 | CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=[^ ]*//g'` | |
22d6c51b | 128 | |
4fda8867 | 129 | transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@ |
14ec8efd | 130 | bin_PROGRAMS = ld-new |
3a80a483 | 131 | info_TEXINFOS = ld.texi ldint.texi |
c428fa83 | 132 | ld_TEXINFOS = configdoc.texi |
d0ac1c44 | 133 | noinst_TEXINFOS = ldint.texi |
252b5132 RH |
134 | man_MANS = ld.1 |
135 | ||
c428fa83 | 136 | AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \ |
2faf902d | 137 | -I $(top_srcdir)/../libiberty --no-split |
c428fa83 L |
138 | TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \ |
139 | -I $(top_srcdir)/../libiberty | |
92f01d61 | 140 | |
1ff6de03 | 141 | AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \ |
c8693053 | 142 | @INCINTL@ $(HDEFINES) $(CFLAGS) @LARGEFILE_CPPFLAGS@ \ |
92f01d61 | 143 | -DLOCALEDIR="\"$(datadir)/locale\"" |
252b5132 RH |
144 | |
145 | BFDLIB = ../bfd/libbfd.la | |
146 | LIBIBERTY = ../libiberty/libiberty.a | |
094e34f2 | 147 | if ENABLE_LIBCTF |
87279e3c | 148 | LIBCTF = ../libctf/libctf.la |
094e34f2 NA |
149 | else |
150 | LIBCTF = | |
151 | endif | |
252b5132 | 152 | |
cc9519e7 | 153 | # These all start with e so 'make clean' can find them. |
9034a328 | 154 | ALL_EMULATION_SOURCES = \ |
3ed41d59 AM |
155 | eaix5ppc.c \ |
156 | eaix5rs6.c \ | |
9034a328 RW |
157 | eaixppc.c \ |
158 | eaixrs6.c \ | |
159 | ealpha.c \ | |
160 | ealphavms.c \ | |
161 | earcelf.c \ | |
886a2506 | 162 | earclinux.c \ |
07ccf83c | 163 | earclinux_nps.c \ |
8ac43968 AM |
164 | earcv2elf.c \ |
165 | earcv2elfx.c \ | |
9034a328 | 166 | earm_wince_pe.c \ |
9034a328 | 167 | earmelf.c \ |
9034a328 | 168 | earmelf_fbsd.c \ |
d5451cd4 | 169 | earmelf_fuchsia.c \ |
d85e70a3 | 170 | earmelf_haiku.c \ |
9034a328 RW |
171 | earmelf_linux.c \ |
172 | earmelf_linux_eabi.c \ | |
617a5ada | 173 | earmelf_linux_fdpiceabi.c \ |
b38cadfb | 174 | earmelf_nacl.c \ |
3ed41d59 | 175 | earmelf_nbsd.c \ |
a2bea324 | 176 | earmelf_phoenix.c \ |
3ed41d59 AM |
177 | earmelf_vxworks.c \ |
178 | earmelfb.c \ | |
1804dbce | 179 | earmelfb_fbsd.c \ |
d5451cd4 | 180 | earmelfb_fuchsia.c \ |
9034a328 RW |
181 | earmelfb_linux.c \ |
182 | earmelfb_linux_eabi.c \ | |
617a5ada | 183 | earmelfb_linux_fdpiceabi.c \ |
b38cadfb | 184 | earmelfb_nacl.c \ |
9034a328 | 185 | earmelfb_nbsd.c \ |
3ed41d59 | 186 | earmnto.c \ |
9034a328 | 187 | earmpe.c \ |
9034a328 | 188 | eavr1.c \ |
3ed41d59 | 189 | eavr2.c \ |
9034a328 RW |
190 | eavr25.c \ |
191 | eavr3.c \ | |
192 | eavr31.c \ | |
193 | eavr35.c \ | |
194 | eavr4.c \ | |
195 | eavr5.c \ | |
196 | eavr51.c \ | |
197 | eavr6.c \ | |
8ac43968 | 198 | eavrtiny.c \ |
cc382d46 AM |
199 | eavrxmega1.c \ |
200 | eavrxmega2.c \ | |
0804d18a | 201 | eavrxmega2_flmap.c \ |
cc382d46 AM |
202 | eavrxmega3.c \ |
203 | eavrxmega4.c \ | |
0804d18a | 204 | eavrxmega4_flmap.c \ |
cc382d46 AM |
205 | eavrxmega5.c \ |
206 | eavrxmega6.c \ | |
207 | eavrxmega7.c \ | |
9034a328 RW |
208 | ecrisaout.c \ |
209 | ecriself.c \ | |
210 | ecrislinux.c \ | |
b8891f8d AJ |
211 | ecskyelf.c \ |
212 | ecskyelf_linux.c \ | |
9034a328 RW |
213 | ed10velf.c \ |
214 | ed30v_e.c \ | |
215 | ed30v_o.c \ | |
216 | ed30velf.c \ | |
9034a328 | 217 | eelf32_dlx.c \ |
9034a328 RW |
218 | eelf32_sparc.c \ |
219 | eelf32_sparc_sol2.c \ | |
220 | eelf32_sparc_vxworks.c \ | |
3ed41d59 | 221 | eelf32_spu.c \ |
9034a328 | 222 | eelf32_tic6x_be.c \ |
8ac43968 AM |
223 | eelf32_tic6x_elf_be.c \ |
224 | eelf32_tic6x_elf_le.c \ | |
9034a328 | 225 | eelf32_tic6x_le.c \ |
2a616379 BS |
226 | eelf32_tic6x_linux_be.c \ |
227 | eelf32_tic6x_linux_le.c \ | |
bc77a04a | 228 | eelf32am33lin.c \ |
9034a328 RW |
229 | eelf32bfin.c \ |
230 | eelf32bfinfd.c \ | |
3ed41d59 | 231 | eelf32cr16.c \ |
3ed41d59 | 232 | eelf32crx.c \ |
cfb8c092 | 233 | eelf32epiphany.c \ |
f204ddb8 | 234 | eelf32epiphany_4x4.c \ |
9034a328 RW |
235 | eelf32fr30.c \ |
236 | eelf32frv.c \ | |
3ed41d59 | 237 | eelf32frvfd.c \ |
3f8107ab | 238 | eelf32ft32.c \ |
9034a328 | 239 | eelf32ip2k.c \ |
9034a328 | 240 | eelf32iq10.c \ |
3ed41d59 | 241 | eelf32iq2000.c \ |
9034a328 RW |
242 | eelf32lm32.c \ |
243 | eelf32lm32fd.c \ | |
9034a328 | 244 | eelf32lppc.c \ |
49926cd0 | 245 | eelf32lppclinux.c \ |
9034a328 RW |
246 | eelf32lppcnto.c \ |
247 | eelf32lppcsim.c \ | |
248 | eelf32m32c.c \ | |
3ed41d59 | 249 | eelf32mb_linux.c \ |
865d0aef | 250 | eelf32mbel_linux.c \ |
9034a328 RW |
251 | eelf32mcore.c \ |
252 | eelf32mep.c \ | |
a3c62988 | 253 | eelf32metag.c \ |
9034a328 | 254 | eelf32microblaze.c \ |
8ac43968 | 255 | eelf32microblazeel.c \ |
3ed41d59 | 256 | eelf32moxie.c \ |
9034a328 | 257 | eelf32mt.c \ |
73589c9d CS |
258 | eelf32or1k.c \ |
259 | eelf32or1k_linux.c \ | |
9034a328 RW |
260 | eelf32ppc.c \ |
261 | eelf32ppc_fbsd.c \ | |
d85e70a3 | 262 | eelf32ppchaiku.c \ |
06520412 | 263 | eelf32ppclinux.c \ |
9034a328 RW |
264 | eelf32ppcnto.c \ |
265 | eelf32ppcsim.c \ | |
9034a328 | 266 | eelf32ppcvxworks.c \ |
3ed41d59 | 267 | eelf32ppcwindiss.c \ |
99c513f6 | 268 | eelf32rl78.c \ |
9034a328 | 269 | eelf32rx.c \ |
c578f16e | 270 | eelf32rx_linux.c \ |
aa137e4d | 271 | eelf32tilegx.c \ |
fb6cedde | 272 | eelf32tilegx_be.c \ |
aa137e4d | 273 | eelf32tilepro.c \ |
9034a328 | 274 | eelf32vax.c \ |
c18392d8 | 275 | eelf32visium.c \ |
9034a328 RW |
276 | eelf32xstormy16.c \ |
277 | eelf32xtensa.c \ | |
6655dba2 | 278 | eelf32z80.c \ |
9034a328 RW |
279 | eelf_i386.c \ |
280 | eelf_i386_be.c \ | |
9034a328 | 281 | eelf_i386_fbsd.c \ |
d85e70a3 | 282 | eelf_i386_haiku.c \ |
9034a328 RW |
283 | eelf_i386_ldso.c \ |
284 | eelf_i386_sol2.c \ | |
285 | eelf_i386_vxworks.c \ | |
7e0a8112 | 286 | eelf_iamcu.c \ |
9034a328 | 287 | eelf_s390.c \ |
9034a328 | 288 | eh8300elf.c \ |
330b17b3 | 289 | eh8300elf_linux.c \ |
9034a328 | 290 | eh8300helf.c \ |
330b17b3 | 291 | eh8300helf_linux.c \ |
9034a328 | 292 | eh8300hnelf.c \ |
3ed41d59 | 293 | eh8300self.c \ |
5518c738 | 294 | eh8300self_linux.c \ |
9034a328 RW |
295 | eh8300snelf.c \ |
296 | eh8300sxelf.c \ | |
330b17b3 | 297 | eh8300sxelf_linux.c \ |
9034a328 | 298 | eh8300sxnelf.c \ |
9034a328 RW |
299 | ehppaelf.c \ |
300 | ehppalinux.c \ | |
301 | ehppanbsd.c \ | |
302 | ehppaobsd.c \ | |
5e737279 | 303 | ei386aout.c \ |
9034a328 RW |
304 | ei386beos.c \ |
305 | ei386bsd.c \ | |
9034a328 | 306 | ei386go32.c \ |
9034a328 | 307 | ei386lynx.c \ |
9034a328 RW |
308 | ei386moss.c \ |
309 | ei386msdos.c \ | |
9034a328 | 310 | ei386nto.c \ |
9034a328 RW |
311 | ei386pe.c \ |
312 | ei386pe_posix.c \ | |
9034a328 | 313 | em32relf.c \ |
9034a328 | 314 | em32relf_linux.c \ |
3ed41d59 | 315 | em32rlelf.c \ |
9034a328 RW |
316 | em32rlelf_linux.c \ |
317 | em68hc11elf.c \ | |
318 | em68hc11elfb.c \ | |
319 | em68hc12elf.c \ | |
320 | em68hc12elfb.c \ | |
9034a328 RW |
321 | em68kelf.c \ |
322 | em68kelfnbsd.c \ | |
7b4ae824 | 323 | em9s12zelf.c \ |
9034a328 | 324 | emcorepe.c \ |
3ed41d59 AM |
325 | emn10200.c \ |
326 | emn10300.c \ | |
8ac43968 | 327 | emoxiebox.c \ |
13761a11 | 328 | emsp430X.c \ |
8ac43968 | 329 | emsp430elf.c \ |
35c08157 KLC |
330 | ends32belf.c \ |
331 | ends32belf16m.c \ | |
332 | ends32belf_linux.c \ | |
8ac43968 AM |
333 | ends32elf.c \ |
334 | ends32elf16m.c \ | |
335 | ends32elf_linux.c \ | |
07cccc39 AM |
336 | enios2elf.c \ |
337 | enios2linux.c \ | |
8ac43968 | 338 | ens32knbsd.c \ |
9034a328 RW |
339 | epc532macha.c \ |
340 | epdp11.c \ | |
341 | epjelf.c \ | |
342 | epjlelf.c \ | |
343 | eppcmacos.c \ | |
27c3ce29 | 344 | epruelf.c \ |
9034a328 RW |
345 | escore3_elf.c \ |
346 | escore7_elf.c \ | |
347 | esh.c \ | |
3ed41d59 | 348 | eshelf.c \ |
9034a328 | 349 | eshelf_fd.c \ |
9034a328 | 350 | eshelf_linux.c \ |
9034a328 | 351 | eshelf_nbsd.c \ |
9034a328 | 352 | eshelf_nto.c \ |
9034a328 RW |
353 | eshelf_uclinux.c \ |
354 | eshelf_vxworks.c \ | |
9034a328 RW |
355 | eshl.c \ |
356 | eshlelf.c \ | |
3ed41d59 AM |
357 | eshlelf_fd.c \ |
358 | eshlelf_linux.c \ | |
359 | eshlelf_nbsd.c \ | |
360 | eshlelf_nto.c \ | |
361 | eshlelf_vxworks.c \ | |
9034a328 | 362 | eshpe.c \ |
9034a328 RW |
363 | etic30coff.c \ |
364 | etic3xcoff.c \ | |
365 | etic3xcoff_onchip.c \ | |
366 | etic4xcoff.c \ | |
367 | etic54xcoff.c \ | |
3ed41d59 | 368 | ev850.c \ |
de863c74 | 369 | ev850_rh850.c \ |
9034a328 | 370 | evanilla.c \ |
9034a328 | 371 | evaxnbsd.c \ |
f6c1a2d5 | 372 | exgateelf.c \ |
9034a328 | 373 | ez80.c \ |
3ed41d59 | 374 | ez8001.c \ |
9034a328 | 375 | ez8002.c |
252b5132 | 376 | |
9034a328 RW |
377 | ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@) |
378 | ||
379 | ALL_64_EMULATION_SOURCES = \ | |
8ac43968 AM |
380 | eaarch64cloudabi.c \ |
381 | eaarch64cloudabib.c \ | |
a06ea964 | 382 | eaarch64elf.c \ |
cec5225b | 383 | eaarch64elf32.c \ |
70f0bc67 | 384 | eaarch64elf32b.c \ |
8ac43968 | 385 | eaarch64elfb.c \ |
15c7659f AT |
386 | eaarch64fbsd.c \ |
387 | eaarch64fbsdb.c \ | |
d85e70a3 | 388 | eaarch64haiku.c \ |
a06ea964 | 389 | eaarch64linux.c \ |
56244278 AP |
390 | eaarch64linux32.c \ |
391 | eaarch64linux32b.c \ | |
8ac43968 | 392 | eaarch64linuxb.c \ |
567e0dfb | 393 | eaarch64nto.c \ |
53707efa | 394 | eaarch64pe.c \ |
beb6b61d | 395 | earm64pe.c \ |
3ed41d59 | 396 | eelf32_x86_64.c \ |
42429eac RS |
397 | eelf32b4300.c \ |
398 | eelf32bmip.c \ | |
399 | eelf32bmipn32.c \ | |
8ac43968 AM |
400 | eelf32briscv.c \ |
401 | eelf32briscv_ilp32.c \ | |
402 | eelf32briscv_ilp32f.c \ | |
42429eac RS |
403 | eelf32bsmip.c \ |
404 | eelf32btsmip.c \ | |
405 | eelf32btsmip_fbsd.c \ | |
406 | eelf32btsmipn32.c \ | |
407 | eelf32btsmipn32_fbsd.c \ | |
408 | eelf32ebmip.c \ | |
409 | eelf32ebmipvxworks.c \ | |
410 | eelf32elmip.c \ | |
411 | eelf32elmipvxworks.c \ | |
835f16da | 412 | eelf32kvx.c \ |
42429eac RS |
413 | eelf32l4300.c \ |
414 | eelf32lmip.c \ | |
64f5c816 | 415 | eelf32loongarch.c \ |
42429eac RS |
416 | eelf32lr5900.c \ |
417 | eelf32lr5900n32.c \ | |
8ac43968 AM |
418 | eelf32lriscv.c \ |
419 | eelf32lriscv_ilp32.c \ | |
420 | eelf32lriscv_ilp32f.c \ | |
42429eac RS |
421 | eelf32lsmip.c \ |
422 | eelf32ltsmip.c \ | |
423 | eelf32ltsmip_fbsd.c \ | |
424 | eelf32ltsmipn32.c \ | |
425 | eelf32ltsmipn32_fbsd.c \ | |
426 | eelf32mipswindiss.c \ | |
9034a328 RW |
427 | eelf64_aix.c \ |
428 | eelf64_ia64.c \ | |
429 | eelf64_ia64_fbsd.c \ | |
202e2356 | 430 | eelf64_ia64_vms.c \ |
9034a328 RW |
431 | eelf64_s390.c \ |
432 | eelf64_sparc.c \ | |
433 | eelf64_sparc_fbsd.c \ | |
434 | eelf64_sparc_sol2.c \ | |
435 | eelf64alpha.c \ | |
436 | eelf64alpha_fbsd.c \ | |
437 | eelf64alpha_nbsd.c \ | |
438 | eelf64bmip.c \ | |
8ac43968 AM |
439 | eelf64bpf.c \ |
440 | eelf64briscv.c \ | |
441 | eelf64briscv_lp64.c \ | |
442 | eelf64briscv_lp64f.c \ | |
9034a328 | 443 | eelf64btsmip.c \ |
aeffff67 | 444 | eelf64btsmip_fbsd.c \ |
3ed41d59 | 445 | eelf64hppa.c \ |
05fbbeac AM |
446 | eelf64kvx.c \ |
447 | eelf64kvx_linux.c \ | |
64f5c816 | 448 | eelf64loongarch.c \ |
3ed41d59 | 449 | eelf64lppc.c \ |
6afcdeb3 | 450 | eelf64lppc_fbsd.c \ |
e23eba97 | 451 | eelf64lriscv.c \ |
10d98088 | 452 | eelf64lriscv_lp64.c \ |
8ac43968 | 453 | eelf64lriscv_lp64f.c \ |
9034a328 | 454 | eelf64ltsmip.c \ |
aeffff67 | 455 | eelf64ltsmip_fbsd.c \ |
9034a328 | 456 | eelf64mmix.c \ |
9034a328 | 457 | eelf64ppc.c \ |
bd59d916 | 458 | eelf64ppc_fbsd.c \ |
a6dea726 | 459 | eelf64rdos.c \ |
aa137e4d | 460 | eelf64tilegx.c \ |
5a68afcf | 461 | eelf64tilegx_be.c \ |
8ac43968 | 462 | eelf_mipsel_haiku.c \ |
3ed41d59 | 463 | eelf_x86_64.c \ |
6036f486 | 464 | eelf_x86_64_cloudabi.c \ |
3ed41d59 | 465 | eelf_x86_64_fbsd.c \ |
06520412 | 466 | eelf_x86_64_haiku.c \ |
3ed41d59 AM |
467 | eelf_x86_64_sol2.c \ |
468 | ehppa64linux.c \ | |
9d069ac3 | 469 | ei386pep.c \ |
211dc24b | 470 | emmo.c |
9034a328 | 471 | |
4560bc04 | 472 | ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@) |
252b5132 RH |
473 | |
474 | ALL_EMUL_EXTRA_OFILES = \ | |
52a6ecd2 | 475 | deffilep.@OBJEXT@ \ |
f27d07a1 | 476 | pdb.@OBJEXT@ \ |
d871d478 AM |
477 | pe-dll.@OBJEXT@ \ |
478 | ldelf.@OBJEXT@ \ | |
479 | ldelfgen.@OBJEXT@ | |
9d069ac3 NC |
480 | |
481 | ALL_64_EMUL_EXTRA_OFILES = \ | |
52a6ecd2 | 482 | pep-dll.@OBJEXT@ |
252b5132 RH |
483 | |
484 | CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \ | |
485 | ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \ | |
5d3236ee | 486 | mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \ |
b41a6533 MH |
487 | plugin.c ldbuildid.c ldelf.c ldelfgen.c \ |
488 | pdb.c | |
252b5132 RH |
489 | |
490 | HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \ | |
491 | ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \ | |
5d3236ee | 492 | ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \ |
b41a6533 MH |
493 | elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h \ |
494 | pdb.h | |
252b5132 RH |
495 | |
496 | GENERATED_CFILES = ldgram.c ldlex.c deffilep.c | |
497 | GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h | |
498 | ||
64ac50ac RW |
499 | # Require an early dependency on the generated headers, as the dependency |
500 | # tracking will not cause them to be built beforehand. | |
02d44d76 JB |
501 | BUILT_SOURCES = $(GENERATED_HFILES) @MAINT@ $(GENERATED_CFILES) \ |
502 | $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES) | |
64ac50ac | 503 | |
5d3236ee | 504 | OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \ |
0381901e | 505 | mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \ |
52a6ecd2 | 506 | ldwrite.@OBJEXT@ ldexp.@OBJEXT@ ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \ |
61e2488c | 507 | ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \ |
f27d07a1 | 508 | ldbuildid.@OBJEXT@ |
252b5132 | 509 | |
52a6ecd2 | 510 | STAGESTUFF = *.@OBJEXT@ ldscripts/* e*.c |
252b5132 | 511 | |
ceae3e33 | 512 | # Disable -Werror, if it has been enabled, since old versions of bison/ |
5586bca1 | 513 | # yacc will produce working code which contain compile time warnings. |
52a6ecd2 | 514 | ldgram.@OBJEXT@: ldgram.c |
64ac50ac | 515 | if am__fastdepCC |
48b5f33a MF |
516 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR) |
517 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
64ac50ac RW |
518 | else |
519 | if AMDEP | |
520 | source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
521 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
522 | endif | |
48b5f33a | 523 | $(AM_V_CC)$(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR) |
64ac50ac RW |
524 | endif |
525 | ||
52a6ecd2 | 526 | ldlex-wrapper.@OBJEXT@: ldlex-wrapper.c ldlex.c |
64ac50ac | 527 | if am__fastdepCC |
48b5f33a MF |
528 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/ldlex-wrapper.c $(NO_WERROR) |
529 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
64ac50ac RW |
530 | else |
531 | if AMDEP | |
45e481d1 | 532 | source='ldlex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ |
64ac50ac RW |
533 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
534 | endif | |
48b5f33a | 535 | $(AM_V_CC)$(COMPILE) -c $(srcdir)/ldlex-wrapper.c $(NO_WERROR) |
64ac50ac RW |
536 | endif |
537 | ||
52a6ecd2 | 538 | deffilep.@OBJEXT@: deffilep.c |
64ac50ac | 539 | if am__fastdepCC |
48b5f33a MF |
540 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR) |
541 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
64ac50ac RW |
542 | else |
543 | if AMDEP | |
544 | source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
545 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
546 | endif | |
48b5f33a | 547 | $(AM_V_CC)$(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR) |
64ac50ac | 548 | endif |
ceae3e33 | 549 | |
33589acb AM |
550 | SRC_POTFILES = $(CFILES) $(HFILES) |
551 | BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES) | |
252b5132 | 552 | |
33589acb AM |
553 | po/SRC-POTFILES.in: @MAINT@ Makefile |
554 | for f in $(SRC_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \ | |
555 | && mv $@-tmp $(srcdir)/po/SRC-POTFILES.in | |
252b5132 | 556 | |
02d44d76 | 557 | po/BLD-POTFILES.in: @MAINT@ Makefile |
33589acb AM |
558 | for f in $(BLD_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \ |
559 | && mv $@-tmp $(srcdir)/po/BLD-POTFILES.in | |
252b5132 | 560 | |
52a6ecd2 | 561 | ldmain.@OBJEXT@: ldmain.c config.status |
64ac50ac | 562 | if am__fastdepCC |
48b5f33a | 563 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \ |
64ac50ac RW |
564 | -DDEFAULT_EMULATION='"$(EMUL)"' \ |
565 | -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \ | |
566 | -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \ | |
567 | $(srcdir)/ldmain.c | |
48b5f33a | 568 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
64ac50ac RW |
569 | else |
570 | if AMDEP | |
8a0e2760 | 571 | source='ldmain.c' object='$@' libtool=no @AMDEPBACKSLASH@ |
64ac50ac RW |
572 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
573 | endif | |
48b5f33a | 574 | $(AM_V_CC)$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \ |
a8caa245 | 575 | -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \ |
9c8ebd6a DJ |
576 | -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \ |
577 | $(srcdir)/ldmain.c | |
64ac50ac | 578 | endif |
252b5132 | 579 | |
52a6ecd2 | 580 | ldfile.@OBJEXT@: ldfile.c config.status |
64ac50ac | 581 | if am__fastdepCC |
48b5f33a | 582 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \ |
64ac50ac RW |
583 | -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \ |
584 | $(srcdir)/ldfile.c | |
48b5f33a | 585 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
64ac50ac RW |
586 | else |
587 | if AMDEP | |
8a0e2760 | 588 | source='ldfile.c' object='$@' libtool=no @AMDEPBACKSLASH@ |
64ac50ac RW |
589 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
590 | endif | |
48b5f33a | 591 | $(AM_V_CC)$(COMPILE) -c -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \ |
64ac50ac | 592 | -DTOOLBINDIR='"$(tooldir)/bin"' \ |
a8caa245 | 593 | $(srcdir)/ldfile.c |
64ac50ac | 594 | endif |
a8caa245 | 595 | |
52a6ecd2 | 596 | eelf32_spu.@OBJEXT@: eelf32_spu.c |
8a0e2760 | 597 | if am__fastdepCC |
48b5f33a | 598 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \ |
8a0e2760 | 599 | -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" eelf32_spu.c |
48b5f33a | 600 | $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
8a0e2760 RW |
601 | else |
602 | if AMDEP | |
603 | source='eelf32_spu.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
604 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
605 | endif | |
48b5f33a | 606 | $(AM_V_CC)$(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \ |
42ba7415 | 607 | eelf32_spu.c |
8a0e2760 | 608 | endif |
42ba7415 | 609 | |
252b5132 RH |
610 | ldemul-list.h: Makefile |
611 | (echo "/* This file is automatically generated. DO NOT EDIT! */";\ | |
612 | for f in `echo " " ${EMULATION_OFILES} "" \ | |
613 | | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \ | |
614 | echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \ | |
615 | done;\ | |
616 | echo "";\ | |
617 | echo "#define EMULATION_LIST \\";\ | |
618 | for f in `echo " " ${EMULATION_OFILES} "" \ | |
619 | | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \ | |
620 | echo " &ld_$${f}_emulation, \\"; \ | |
621 | done;\ | |
622 | echo " 0") >ldemul-tmp.h | |
623 | mv ldemul-tmp.h ldemul-list.h | |
624 | ||
07f9535f AM |
625 | ldscripts/stamp: |
626 | $(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@ | |
627 | ||
cc9519e7 AM |
628 | if AMDEP |
629 | GENDEPDIR=$(DEPDIR) | |
630 | else | |
631 | GENDEPDIR= | |
632 | endif | |
633 | GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "$(GENDEPDIR)" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@ | |
b8a0c930 | 634 | GEN_DEPENDS = $(srcdir)/genscripts.sh ldscripts/stamp |
aafdb207 | 635 | |
252b5132 RH |
636 | @TDIRS@ |
637 | ||
7b793987 AM |
638 | e%.c: |
639 | $(AM_V_GEN)${GENSCRIPTS} $* "$(tdir_$*)" | |
77ac17b8 | 640 | |
c40e31a1 | 641 | $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS) |
77ac17b8 | 642 | |
07f9535f AM |
643 | #Dummy rule to prevent make considering e%.c as a source for missing |
644 | #.Pc files (and they are all missing until the e*.c files are generated). | |
645 | #For example, we don't want e.deps/emmo.Pc.c to be tried when | |
646 | #.deps/emmo.Pc is missing. | |
647 | %.Pc: | |
648 | ||
649 | @AMDEP_TRUE@-include $(patsubst %.c,./$(DEPDIR)/%.Pc,$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)) | |
3ed41d59 | 650 | |
67798033 | 651 | # We need this for automake to use YLWRAP. |
45e481d1 | 652 | EXTRA_ld_new_SOURCES = deffilep.y ldlex.l |
64ac50ac | 653 | # Allow dependency tracking to work for these files, too. |
feddea4b AM |
654 | EXTRA_ld_new_SOURCES += ldelf.c ldelfgen.c pdb.c pep-dll.c pe-dll.c \ |
655 | pep-dll-aarch64.c pep-dll-x86_64.c | |
67798033 | 656 | |
45e481d1 | 657 | ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ |
0381901e | 658 | ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \ |
f27d07a1 | 659 | ldbuildid.c |
edf84efc | 660 | ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \ |
9e2bb0cb | 661 | $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP) $(JANSSON_LIBS) |
2cac01e3 FS |
662 | ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) \ |
663 | $(LIBIBERTY) $(LIBINTL) $(ZLIB) $(ZSTD_LIBS) $(JANSSON_LIBS) | |
252b5132 | 664 | |
64ac50ac | 665 | # Dependency tracking for the generated emulation files. |
9034a328 | 666 | EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES) |
252b5132 | 667 | |
87279e3c | 668 | # This is the real libbfd.a and libctf.a created by libtool. |
252b5132 | 669 | TESTBFDLIB = @TESTBFDLIB@ |
87279e3c | 670 | TESTCTFLIB = @TESTCTFLIB@ |
cf0e0a0b | 671 | TESTSFRAMELIB = @TESTSFRAMELIB@ |
252b5132 RH |
672 | |
673 | check-DEJAGNU: site.exp | |
554c30ab | 674 | (cd .libs; test -e ldscripts || test ! -e ld-new || $(LN_S) ../ldscripts .) |
252b5132 RH |
675 | srcroot=`cd $(srcdir) && pwd`; export srcroot; \ |
676 | r=`pwd`; export r; \ | |
e5b62927 | 677 | LC_ALL=C; export LC_ALL; \ |
252b5132 | 678 | EXPECT=$(EXPECT); export EXPECT; \ |
252b5132 RH |
679 | runtest=$(RUNTEST); \ |
680 | if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ | |
681 | $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ | |
ad77db1c AM |
682 | CC="$(CC)" CFLAGS="$(CFLAGS)" \ |
683 | CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ | |
684 | CC_FOR_TARGET="$(CC_FOR_TARGET)" \ | |
fa2b501c | 685 | CFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CFLAGS_FOR_TARGET))" \ |
ad77db1c | 686 | CXX_FOR_TARGET="$(CXX_FOR_TARGET)" \ |
fa2b501c | 687 | CXXFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CXXFLAGS_FOR_TARGET))" \ |
87279e3c | 688 | OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \ |
cf0e0a0b | 689 | SFRAMELIB="$(TESTSFRAMELIB)" \ |
023b960d | 690 | JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \ |
20e95c23 | 691 | LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ |
eccbf555 | 692 | DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \ |
252b5132 RH |
693 | $(RUNTESTFLAGS); \ |
694 | else echo "WARNING: could not find \`runtest'" 1>&2; :;\ | |
695 | fi | |
696 | ||
7dd36a6f | 697 | development.exp: $(BFDDIR)/development.sh |
48b5f33a | 698 | $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ |
7dd36a6f | 699 | | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ |
7cdfc346 NA |
700 | |
701 | enablings.exp: | |
48b5f33a | 702 | $(AM_V_GEN)echo "set enable_libctf ${enable_libctf}" >> $@ |
7dd36a6f | 703 | # |
5a68afcf | 704 | # |
5d3236ee DK |
705 | # Build a dummy plugin using libtool. |
706 | # | |
3355cb3b L |
707 | noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \ |
708 | libldtestplug3.la libldtestplug4.la | |
5d3236ee DK |
709 | libldtestplug_la_SOURCES = testplug.c |
710 | libldtestplug_la_CFLAGS= -g -O2 | |
711 | libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere | |
439b7f41 L |
712 | libldtestplug2_la_SOURCES = testplug2.c |
713 | libldtestplug2_la_CFLAGS= -g -O2 | |
714 | libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere | |
715 | libldtestplug3_la_SOURCES = testplug3.c | |
716 | libldtestplug3_la_CFLAGS= -g -O2 | |
717 | libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere | |
3355cb3b L |
718 | libldtestplug4_la_SOURCES = testplug4.c |
719 | libldtestplug4_la_CFLAGS= -g -O2 | |
720 | libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere | |
5d3236ee | 721 | |
bf6d8037 HC |
722 | bfdplugindir = $(libdir)/bfd-plugins |
723 | bfdplugin_LTLIBRARIES = libdep.la | |
724 | libdep_la_SOURCES = libdep_plugin.c | |
eba7b68c L |
725 | libdep_la_LDFLAGS = -no-undefined -rpath /nowhere -module -avoid-version |
726 | libdep_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | |
727 | --tag=disable-static \ | |
728 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | |
729 | $(libdep_la_LDFLAGS) $(LDFLAGS) -o $@ | |
bf6d8037 | 730 | |
252b5132 RH |
731 | # DOCUMENTATION TARGETS |
732 | # Manual configuration file; not usually attached to normal configuration, | |
733 | # because almost all configs use "gen" version of manual. | |
734 | # Set DOCVER above to change. | |
735 | configdoc.texi: ${DOCVER}-doc.texi | |
48b5f33a MF |
736 | $(AM_V_GEN)cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi |
737 | $(AM_V_at)chmod u+w ./configdoc.texi | |
252b5132 | 738 | |
0285c67d NC |
739 | # Build the man page from the texinfo file |
740 | # The sed command removes the no-adjust Nroff command so that | |
741 | # the man output looks standard. | |
d0ac1c44 | 742 | ld.1: $(srcdir)/ld.texi configdoc.texi |
48b5f33a MF |
743 | $(AM_V_GEN)touch $@ |
744 | $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texi > ld.pod | |
745 | $(AM_V_at)-($(POD2MAN) ld.pod | \ | |
5a68afcf RM |
746 | sed -e '/^.if n .na/d' > $@.T$$$$ && \ |
747 | mv -f $@.T$$$$ $@) || \ | |
748 | (rm -f $@.T$$$$ && exit 1) | |
48b5f33a | 749 | $(AM_V_at)rm -f ld.pod |
0285c67d | 750 | |
3a80a483 US |
751 | # Build the man page from the texinfo file |
752 | # The sed command removes the no-adjust Nroff command so that | |
753 | # the man output looks standard. | |
754 | ldint.1: $(srcdir)/ldint.texi configdoc.texi | |
755 | $(AM_V_GEN)touch $@ | |
756 | $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ldint.texi > ldint.pod | |
757 | $(AM_V_at)-($(POD2MAN) ldint.pod | \ | |
758 | sed -e '/^.if n .na/d' > $@.T$$$$ && \ | |
759 | mv -f $@.T$$$$ $@) || \ | |
760 | (rm -f $@.T$$$$ && exit 1) | |
761 | $(AM_V_at)rm -f ldint.pod | |
762 | ||
763 | MAINTAINERCLEANFILES = configdoc.texi ld.1 ldint.1 | |
252b5132 | 764 | |
2e98a7bd AM |
765 | # We want to reconfigure if configure.host or configure.tgt changes. |
766 | # development.sh is used to determine -Werror default. | |
42ecbf5e | 767 | CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \ |
2e98a7bd | 768 | $(BFDDIR)/development.sh |
252b5132 | 769 | |
7cdfc346 | 770 | EXTRA_DEJAGNU_SITE_CONFIG = development.exp enablings.exp |
7dd36a6f | 771 | |
252b5132 | 772 | MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \ |
52a6ecd2 | 773 | ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum |
252b5132 RH |
774 | mostlyclean-local: |
775 | -rm -rf tmpdir | |
52a6ecd2 | 776 | CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s spu_icache.@OBJEXT@ |
252b5132 RH |
777 | |
778 | .PHONY: install-exec-local install-data-local | |
779 | ||
4fda8867 | 780 | install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS |
14ec8efd | 781 | $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin |
4fda8867 NC |
782 | n=`echo $(installed_linker) | sed '$(transform)'`; \ |
783 | if test "$(bindir)" != "$(tooldir)/bin"; then \ | |
784 | rm -f $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \ | |
785 | ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT) >/dev/null 2>/dev/null \ | |
f2c7d7ee | 786 | || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \ |
4fda8867 NC |
787 | fi; \ |
788 | if test "x$(install_as_default)" = "xyes"; then \ | |
7ad2014a L |
789 | ld=`echo ld | sed '$(transform)'`; \ |
790 | rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ | |
791 | ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \ | |
f2c7d7ee | 792 | || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \ |
4fda8867 NC |
793 | if test "$(bindir)" != "$(tooldir)/bin"; then \ |
794 | rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ | |
795 | ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ | |
f2c7d7ee | 796 | || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ |
4fda8867 | 797 | fi; \ |
252b5132 RH |
798 | fi |
799 | ||
eba7b68c | 800 | install-data-local: install-bfdpluginLTLIBRARIES |
d3d8a9ee | 801 | $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts |
edf84efc | 802 | for f in ldscripts/* ; do \ |
07f9535f AM |
803 | case $$f in \ |
804 | stamp) ;; \ | |
805 | *) $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \ | |
806 | esac \ | |
252b5132 | 807 | done |
eba7b68c | 808 | rm -f $(DESTDIR)$(bfdplugindir)/libdep.la |
22604fe6 | 809 | rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a |
252b5132 RH |
810 | |
811 | # Stuff that should be included in a distribution. The diststuff | |
812 | # target is run by the taz target in ../Makefile.in. | |
52a6ecd2 NC |
813 | EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \ |
814 | emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS) | |
c45021f2 | 815 | diststuff: info $(EXTRA_DIST) |
252b5132 | 816 | |
c428fa83 | 817 | # Both info (ld.info) and ld.1 depend on configdoc.texi. |
8b803601 L |
818 | # But info isn't a direct target. Make info-recursive to depend on |
819 | # ld.1 to support parallel build. | |
820 | info-recursive: ld.1 | |
821 | ||
cf758b39 MF |
822 | html-local: doc/ld/index.html |
823 | doc/ld/index.html: ld.texi $(ld_TEXINFOS) | |
48b5f33a MF |
824 | $(AM_V_at)$(MKDIR_P) doc |
825 | $(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \ | |
cf758b39 MF |
826 | --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld |
827 | ||
b8a0c930 | 828 | DISTCLEANFILES = site.exp development.exp enablings.exp site.bak |
252b5132 RH |
829 | distclean-local: |
830 | rm -rf ldscripts | |
831 | ||
d5fbea21 | 832 | MAINTAINERCLEANFILES += ld.info |