1 ## Process this file with automake to generate Makefile.in
3 ## FIXME: work around apparent automake bug.
6 AUTOMAKE_OPTIONS = cygnus dejagnu
10 tooldir = $(exec_prefix)/$(target_alias)
12 YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
14 LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
16 WARN_CFLAGS = @WARN_CFLAGS@
17 AM_CFLAGS = $(WARN_CFLAGS)
19 # We put the scripts in the directory $(scriptdir)/ldscripts.
20 # We can't put the scripts in $(datadir) because the SEARCH_DIR
21 # directives need to be different for native and cross linkers.
22 scriptdir = $(tooldir)/lib
25 EMULATION_OFILES = @EMULATION_OFILES@
26 EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
28 # Search path to override the default search path for -lfoo libraries.
29 # If LIB_PATH is empty, the ones in the script (if any) are left alone.
30 # (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
31 # a cross-linker, in which case the default is empty. See genscripts.sh.)
32 # Otherwise, they are replaced with the ones given in LIB_PATH,
33 # which may have the form: LIB_PATH=/lib:/usr/local/lib
36 BASEDIR = $(srcdir)/..
37 BFDDIR = $(BASEDIR)/bfd
38 INCDIR = $(BASEDIR)/include
41 # What version of the manual to build
44 #stuff for self hosting (can be overridden in config file).
45 HOSTING_CRT0 = @HOSTING_CRT0@
46 HOSTING_LIBS = @HOSTING_LIBS@
47 HOSTING_EMU = -m $(EMUL)
49 # Setup the testing framework, if you have one
50 EXPECT = `if [ -f $$r/../expect/expect ] ; \
51 then echo $$r/../expect/expect ; \
52 else echo expect ; fi`
54 RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
55 then echo $${srcroot}/../dejagnu/runtest ; \
56 else echo runtest ; fi`
61 if [ -f $$r/../gcc/xgcc ] ; then \
62 if [ -f $$r/../newlib/Makefile ] ; then \
63 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
65 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
68 if [ "@host@" = "@target@" ] ; then \
71 echo gcc | sed '$(transform)'; \
77 if [ -f $$r/../gcc/xgcc ] ; then \
78 if [ -f $$r/../newlib/Makefile ] ; then \
79 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
81 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
84 if [ "@host@" = "@target@" ] ; then \
87 echo gcc | sed '$(transform)'; \
91 noinst_PROGRAMS = ld-new
92 info_TEXINFOS = ld.texinfo
93 noinst_TEXINFOS = ldint.texinfo
96 INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
98 BFDLIB = ../bfd/libbfd.la
99 LIBIBERTY = ../libiberty/libiberty.a
226 ALL_64_EMULATIONS = \
231 ALL_EMUL_EXTRA_OFILES = \
235 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
236 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
237 mri.c ldcref.c pe-dll.c
239 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
240 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
241 ldwrite.h mri.h deffile.h pe-dll.h
243 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
244 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
246 OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
247 ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
248 ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
250 STAGESTUFF = *.o ldscripts/* e*.c
252 # At the moment this is just a list of those emulation template files
253 # that contain internationalised strings.
254 EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
256 POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
258 po/POTFILES.in: @MAINT@ Makefile
259 for file in $(POTFILES); do echo $$file; done | sort > tmp \
260 && mv tmp $(srcdir)/po/POTFILES.in
262 ldmain.o: ldmain.c config.status
263 $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
265 ldemul-list.h: Makefile
266 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
267 for f in `echo " " ${EMULATION_OFILES} "" \
268 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
269 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
272 echo "#define EMULATION_LIST \\";\
273 for f in `echo " " ${EMULATION_OFILES} "" \
274 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
275 echo " &ld_$${f}_emulation, \\"; \
277 echo " 0") >ldemul-tmp.h
278 mv ldemul-tmp.h ldemul-list.h
280 stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
281 cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
283 # These all start with e so 'make clean' can find them.
285 GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
286 GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
289 ea29k.c: $(srcdir)/emulparams/a29k.sh \
290 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
291 ${GENSCRIPTS} a29k "$(tdir_a29k)"
292 eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
293 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
294 ${GENSCRIPTS} aixppc "$(tdir_aixppc)"
295 eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
296 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
297 ${GENSCRIPTS} aixrs6 "$(tdir_aixrs6)"
298 ealpha.c: $(srcdir)/emulparams/alpha.sh \
299 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
300 ${GENSCRIPTS} alpha "$(tdir_alpha)"
301 earcelf.c: $(srcdir)/emulparams/arcelf.sh \
302 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
303 ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
304 earmelf.c: $(srcdir)/emulparams/armelf.sh \
305 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
306 ${GENSCRIPTS} armelf "$(tdir_armelf)"
307 earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
308 $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
309 ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
310 earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
311 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
312 ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
313 earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \
314 $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
315 ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)"
316 earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
317 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
318 ${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
319 earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
320 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
321 ${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
322 earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
323 $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
324 ${GENSCRIPTS} armcoff "$(tdir_armcoff)"
325 earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
326 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
327 ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
328 earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
329 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
330 ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
331 earmpe.c: $(srcdir)/emulparams/armpe.sh \
332 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
333 ${GENSCRIPTS} armpe "$(tdir_armpe)"
334 eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \
335 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
337 ${GENSCRIPTS} avr85xx "$(tdir_avr85xx)"
338 eavr1200.c: $(srcdir)/emulparams/avr1200.sh \
339 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
341 ${GENSCRIPTS} avr1200 "$(tdir_avr85xx)"
342 eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \
343 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
345 ${GENSCRIPTS} avr23xx "$(tdir_avr85xx)"
346 eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \
347 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
349 ${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)"
350 eavr4433.c: $(srcdir)/emulparams/avr4433.sh \
351 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
353 ${GENSCRIPTS} avr4433 "$(tdir_avr85xx)"
354 eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \
355 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
357 ${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)"
358 eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \
359 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
361 ${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
362 eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
363 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
365 ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
366 ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
367 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
368 ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
369 ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
370 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
371 ${GENSCRIPTS} d10velf "$(tdir_d10v)"
372 ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
373 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
374 ${GENSCRIPTS} d30velf "$(tdir_d30v)"
375 ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
376 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
377 ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
378 ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
379 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
380 ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
381 edelta68.c: $(srcdir)/emulparams/delta68.sh \
382 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
383 ${GENSCRIPTS} delta68 "$(tdir_delta68)"
384 eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
385 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
386 ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
387 eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
388 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
389 ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
390 eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
391 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
392 ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
393 em32relf.c: $(srcdir)/emulparams/m32relf.sh \
394 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
395 ${GENSCRIPTS} m32relf "$(tdir_m32r)"
396 eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
397 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
398 ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
399 eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
400 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
401 ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
402 eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
403 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
404 ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
405 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
406 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
407 ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
408 eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
409 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
410 ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
411 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
412 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
413 ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
414 eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
415 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
416 ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
417 eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
418 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
419 ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
420 eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
421 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
422 ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
423 eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
424 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
425 ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
426 eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
427 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
428 ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
429 eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
430 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
431 ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
432 eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
433 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
434 ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
435 eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
436 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
437 ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
438 eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
439 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
440 ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
441 eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
442 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
443 ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
444 eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
445 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
446 ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
447 eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
448 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
449 ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
450 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
451 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
452 ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
453 eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
454 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
455 ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
456 egld960.c: $(srcdir)/emulparams/gld960.sh \
457 $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
458 ${GENSCRIPTS} gld960 "$(tdir_gld960)"
459 egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
460 $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
461 ${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
462 eh8300.c: $(srcdir)/emulparams/h8300.sh \
463 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
464 ${GENSCRIPTS} h8300 "$(tdir_h8300)"
465 eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
466 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
467 ${GENSCRIPTS} h8300h "$(tdir_h8300h)"
468 eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
469 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
470 ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
471 eh8500.c: $(srcdir)/emulparams/h8500.sh \
472 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
473 ${GENSCRIPTS} h8500 "$(tdir_h8500)"
474 eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
475 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
476 ${GENSCRIPTS} h8500b "$(tdir_h8500b)"
477 eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
478 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
479 ${GENSCRIPTS} h8500c "$(tdir_h8500c)"
480 eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
481 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
482 ${GENSCRIPTS} h8500m "$(tdir_h8500m)"
483 eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
484 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
485 ${GENSCRIPTS} h8500s "$(tdir_h8500s)"
486 ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
487 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
488 ${GENSCRIPTS} hp300bsd "$(tdir_hp300bsd)"
489 ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
490 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
491 ${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
492 ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
493 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
494 ${GENSCRIPTS} i386aout "$(tdir_i386aout)"
495 ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
496 $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
497 ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
498 ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
499 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
500 ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
501 ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
502 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
503 ${GENSCRIPTS} i386coff "$(tdir_i386coff)"
504 ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
505 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
506 ${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
507 ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
508 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
509 ${GENSCRIPTS} i386linux "$(tdir_i386linux)"
510 ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
511 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
512 ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
513 ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
514 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
515 ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
516 ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
517 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
518 ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
519 ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
520 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
521 ${GENSCRIPTS} i386msdos "$(tdir_i386msdos)"
522 ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
523 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
524 ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
525 ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
526 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
527 ${GENSCRIPTS} i386nw "$(tdir_i386nw)"
528 ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
529 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
530 ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
531 ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
532 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
533 ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
534 elnk960.c: $(srcdir)/emulparams/lnk960.sh \
535 $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
536 ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
537 em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
538 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
539 ${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
540 em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
541 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
542 ${GENSCRIPTS} m68kaout "$(tdir_m68kaout)"
543 em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
544 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
545 ${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
546 em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
547 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
548 ${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
549 em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
550 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
551 ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
552 em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
553 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
554 ${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
555 em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
556 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
557 ${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
558 em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
559 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
560 ${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
561 em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
562 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
563 ${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
564 em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
565 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
566 ${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
567 emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
568 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
569 ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
570 emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
571 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
572 ${GENSCRIPTS} mipsbig
573 emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
574 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
575 ${GENSCRIPTS} mipsbsd
576 emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
577 $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
578 ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
579 emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
580 $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
581 ${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
582 emipslit.c: $(srcdir)/emulparams/mipslit.sh \
583 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
584 ${GENSCRIPTS} mipslit "$(tdir_mipslit)"
585 emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
586 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
587 ${GENSCRIPTS} mipslnews
588 emipspe.c: $(srcdir)/emulparams/mipspe.sh \
589 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
590 ${GENSCRIPTS} mipspe "$(tdir_mips)"
591 emn10300.c: $(srcdir)/emulparams/mn10300.sh \
592 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
593 ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
594 emn10200.c: $(srcdir)/emulparams/mn10200.sh \
595 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
596 ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
597 enews.c: $(srcdir)/emulparams/news.sh \
598 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
599 ${GENSCRIPTS} news "$(tdir_news)"
600 ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
601 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
602 ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
603 epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
604 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
605 ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
606 epjelf.c: $(srcdir)/emulparams/pjelf.sh \
607 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
608 ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
609 epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
610 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
611 ${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
612 eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
613 $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
614 ${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
615 eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
616 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
617 ${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
618 eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
619 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
620 ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
621 eriscix.c: $(srcdir)/emulparams/riscix.sh \
622 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
623 ${GENSCRIPTS} riscix "$(tdir_riscix)"
624 esa29200.c: $(srcdir)/emulparams/sa29200.sh \
625 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
626 ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
627 esh.c: $(srcdir)/emulparams/sh.sh \
628 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
629 ${GENSCRIPTS} sh "$(tdir_sh)"
630 eshelf.c: $(srcdir)/emulparams/shelf.sh \
631 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
632 ${GENSCRIPTS} shelf "$(tdir_shelf)"
633 eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
634 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
635 ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
636 eshl.c: $(srcdir)/emulparams/shl.sh \
637 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
638 ${GENSCRIPTS} shl "$(tdir_shl)"
639 eshpe.c: $(srcdir)/emulparams/shpe.sh \
640 $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
641 ${GENSCRIPTS} shpe "$(tdir_shl)"
642 esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
643 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
644 ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
645 esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
646 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
647 ${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
648 esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
649 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
650 ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
651 esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
652 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
653 ${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
654 est2000.c: $(srcdir)/emulparams/st2000.sh \
655 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
656 ${GENSCRIPTS} st2000 "$(tdir_st2000)"
657 esun3.c: $(srcdir)/emulparams/sun3.sh \
658 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
659 ${GENSCRIPTS} sun3 "$(tdir_sun3)"
660 esun4.c: $(srcdir)/emulparams/sun4.sh \
661 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
662 ${GENSCRIPTS} sun4 "$(tdir_sun4)"
663 etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
664 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
665 ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
666 etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
667 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
668 ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
669 etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
670 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
671 ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
672 evanilla.c: $(srcdir)/emulparams/vanilla.sh \
673 $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
674 ${GENSCRIPTS} vanilla "$(tdir_vanilla)"
675 evax.c: $(srcdir)/emulparams/vax.sh \
676 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
677 ${GENSCRIPTS} vax "$(tdir_vax)"
678 evsta.c: $(srcdir)/emulparams/vsta.sh \
679 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
680 ${GENSCRIPTS} vsta "$(tdir_vsta)"
681 ev850.c: $(srcdir)/emulparams/v850.sh \
682 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
683 ${GENSCRIPTS} v850 "$(tdir_v850)"
684 ew65.c: $(srcdir)/emulparams/w65.sh \
685 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
686 ${GENSCRIPTS} w65 "$(tdir_w65)"
687 ez8001.c: $(srcdir)/emulparams/z8001.sh \
688 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
689 ${GENSCRIPTS} z8001 "$(tdir_z8001)"
690 ez8002.c: $(srcdir)/emulparams/z8002.sh \
691 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
692 ${GENSCRIPTS} z8002 "$(tdir_z8002)"
694 ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
695 ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
696 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
697 ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
699 # The generated emulation files mostly have the same dependencies.
700 $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
701 ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
702 ldctor.h ldexp.h ldlang.h ldgram.h
704 # This is the real libbfd.a created by libtool.
705 TESTBFDLIB = @TESTBFDLIB@
707 check-DEJAGNU: site.exp
708 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
710 LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
711 EXPECT=$(EXPECT); export EXPECT; \
712 if [ -f $(top_builddir)/../expect/expect ]; then \
713 TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
714 export TCL_LIBRARY; \
716 runtest=$(RUNTEST); \
717 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
718 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
719 CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
720 CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
721 CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
722 OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
723 LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
725 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
728 # Rules for testing by relinking ld itself.
729 # A similar test is in the testsuite. This target is for ease of use
732 ld-partial.o: ld-new$(EXEEXT)
733 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
734 ld1$(EXEEXT): ld-partial.o
735 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
737 ld1-full$(EXEEXT): ld-new
738 ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
740 ld2$(EXEEXT): ld1$(EXEEXT)
741 ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
743 ld3$(EXEEXT): ld2$(EXEEXT)
744 ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
746 bootstrap: ld3$(EXEEXT)
747 cmp ld2$(EXEEXT) ld3$(EXEEXT)
751 # A test program for C++ constructors and destructors.
752 # This test is now in the testsuite.
754 #cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
755 # ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
756 # cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
759 # ./cdtest > cdtest.tmp
760 # mv cdtest.tmp cdtest.out
762 #cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
763 # ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
764 # cdtest-bar.o cdtest-foo.o
766 #cdtest-ur: cdtest-ur.o
767 # ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
770 #cdtest-ur.out: cdtest-ur
771 # ./cdtest-ur > cdtest-ur.tmp
772 # mv cdtest-ur.tmp cdtest-ur.out
774 #check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
775 # diff $(srcdir)/cdtest.exp cdtest.out
776 # diff $(srcdir)/cdtest.exp cdtest-ur.out
778 #.PHONY: check-cdtest
780 # END OF CHECK TARGETS
782 # DOCUMENTATION TARGETS
783 # Manual configuration file; not usually attached to normal configuration,
784 # because almost all configs use "gen" version of manual.
785 # Set DOCVER above to change.
786 configdoc.texi: ${DOCVER}-doc.texi
787 ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
788 || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
789 || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
793 echo '@set VERSION $(VERSION)' > $@
795 ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
796 @rm -f $@ $@-[0-9] $@-[0-9][0-9]
797 $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
799 ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
800 TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
801 MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
803 MAINTAINERCLEANFILES = ldver.texi
805 # We want to reconfigure if configure.host or configure.tgt changes.
806 config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
807 $(SHELL) ./config.status --recheck
809 MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
810 ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
813 CLEANFILES = dep.sed DEP DEP1 DEP2
815 .PHONY: install-exec-local install-data-local
817 install-exec-local: ld-new$(EXEEXT)
818 $(mkinstalldirs) $(bindir) $(tooldir)/bin
819 @list='$(noinst_PROGRAMS)'; for p in $$list; do \
820 if test -f $$p; then \
821 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
822 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
825 n=`echo ld | sed '$(transform)'`; \
826 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
827 rm -f $(tooldir)/bin/ld$(EXEEXT); \
828 ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
829 || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
833 $(mkinstalldirs) $(scriptdir)/ldscripts
834 for f in ldscripts/*; do \
835 $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
838 # Stuff that should be included in a distribution. The diststuff
839 # target is run by the taz target in ../Makefile.in.
840 LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
841 diststuff: $(LDDISTSTUFF) info
843 DISTCLEANFILES = tdirs site.exp site.bak
847 # Targets to rebuild dependencies in this Makefile.
848 # Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
849 DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
851 $(MAKE) MKDEP="$(MKDEP)" DEP1
852 sed -f dep.sed < DEP1 > $@
853 echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
855 DEP1: $(CFILES) $(GENERATED_CFILES)
856 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
857 echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
858 $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
861 dep.sed: dep-in.sed config.status
862 sed <$(srcdir)/dep-in.sed >dep.sed \
863 -e 's!@INCDIR@!$(INCDIR)!' \
864 -e 's!@SRCDIR@!$(srcdir)!'
867 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
868 cat DEP >> tmp-Makefile
869 $(srcdir)/../move-if-change tmp-Makefile Makefile
872 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
873 cat DEP >> tmp-Makefile.in
874 $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
877 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
878 cat DEP >> tmp-Makefile.am
879 $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
881 .PHONY: dep dep-in dep-am
883 # What appears below is generated by a hacked mkdep using gcc -MM.
885 # DO NOT DELETE THIS LINE -- mkdep uses it.
886 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
887 ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
888 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
889 ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldmisc.h \
890 ldgram.h ldmain.h ldctor.h
891 ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
892 sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
893 ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
895 ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
896 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
897 ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
899 ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
900 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
901 ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
902 ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
903 ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
904 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
905 $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
906 ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \
907 ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
908 ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
909 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
910 $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
911 ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
912 ldemul.h ldlex.h ldfile.h ldctor.h
913 ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
914 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
915 $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \
916 ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
917 ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
918 sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
919 ldver.h ldemul.h ldmain.h
920 ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
921 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
922 $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
923 ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
924 lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
925 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
926 $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
927 ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
929 mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
930 config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
931 ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
932 ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
933 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
934 $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
935 ldmisc.h ldexp.h ldlang.h
936 pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
937 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
938 $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
939 ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \
940 $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \
942 ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
943 sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
944 ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
945 ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \
947 ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
948 ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
949 ldlang.h ldfile.h ldlex.h ldmain.h
950 deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
951 ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
952 ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
953 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY