home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / bfd / mpw-config.in < prev    next >
Text File  |  1996-09-28  |  3KB  |  74 lines

  1. # Configuration fragment for BFD.
  2.  
  3. # This is almost always correct.
  4.  
  5. Set selarchs "&bfd_{target_cpu}_arch"
  6. Set defvec ""
  7. Set selvecs ""
  8.  
  9. If "{target_canonical}" =~ /m68k-apple-macos/
  10.     Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o'
  11.     Set defvec m68kcoff_vec
  12.     Set selvecs '&m68kcoff_vec'
  13.  
  14. Else If "{target_canonical}" =~ /powerpc-apple-macos/
  15.     Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o'
  16.     Set defvec pmac_xcoff_vec
  17.     Set selvecs '&pmac_xcoff_vec'
  18.     Set selarchs "&bfd_powerpc_arch"
  19.  
  20. Else If "{target_canonical}" =~ /i386-unknown-go32/
  21.     Set BFD_BACKENDS '"{o}"coff-i386.c.o'
  22.     Set defvec i386coff_vec
  23.     Set selvecs '&i386coff_vec'
  24.  
  25. Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
  26.     Set BFD_BACKENDS '"{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o'
  27.     Set defvec ecoff_big_vec
  28.     Set selvecs '&ecoff_big_vec,&ecoff_little_vec'
  29.  
  30. Else If "{target_canonical}" =~ /sh-hitachi-hms/
  31.     Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o'
  32.     Set defvec shcoff_vec
  33.     Set selvecs '&shcoff_vec,&shlcoff_vec'
  34. End If
  35.  
  36. Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'`
  37.  
  38. Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs}"
  39.  
  40. Echo '# From mpw-config.in'                 > "{o}"mk.tmp
  41. Echo 'WORDSIZE = 32'                    >> "{o}"mk.tmp
  42. Echo 'BFD_MACHINES = ' {ta}                >> "{o}"mk.tmp
  43. Echo 'BFD_BACKENDS = ' {BFD_BACKENDS}            >> "{o}"mk.tmp
  44. Echo 'TDEFAULTS = ' {tdefaults}                >> "{o}"mk.tmp
  45. Echo 'HDEPFILES = '                    >> "{o}"mk.tmp
  46. Echo 'TDEPFILES = '                    >> "{o}"mk.tmp
  47. Echo '# End from mpw-config.in'                >> "{o}"mk.tmp
  48.  
  49. Echo '/* config.h.  Generated by mpw-configure.  */'     > "{o}"config.new
  50. Echo '#include "mpw.h"'                    >> "{o}"config.new
  51.  
  52. MoveIfChange "{o}"config.new "{o}"config.h
  53.  
  54. # We can only handle 32-bit targets right now.
  55.  
  56. sed -e 's/@WORDSIZE@/32/' \Option-d
  57.     -e "s/@VERSION@/`Catenate {srcdir}VERSION`/" \Option-d
  58.     -e 's/@BFD_HOST_64BIT_LONG@/0/' \Option-d
  59.     "{srcdir}"bfd-in2.h >"{o}"bfd.h-new
  60.  
  61. MoveIfChange "{o}"bfd.h-new "{o}"bfd.h
  62.  
  63. # Pre-expand some macros in coffswap.h, so MPW C doesn't choke.
  64.  
  65. sed -e 's/^  PUT_AOUTHDR_TSIZE (/  bfd_h_put_32 (/' \Option-d
  66.     -e 's/^  PUT_AOUTHDR_DSIZE (/  bfd_h_put_32 (/' \Option-d
  67.     -e 's/^  PUT_AOUTHDR_BSIZE (/  bfd_h_put_32 (/' \Option-d
  68.     -e 's/^  PUT_AOUTHDR_ENTRY (/  bfd_h_put_32 (/' \Option-d
  69.     -e 's/^  PUT_AOUTHDR_TEXT_START (/  bfd_h_put_32 (/' \Option-d
  70.     -e 's/^  PUT_AOUTHDR_DATA_START (/  bfd_h_put_32 (/' \Option-d
  71.     "{srcdir}"coffswap.h >"{o}"coffswap.h-new
  72.  
  73. MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h
  74.