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