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

  1. # Configuration fragment for GAS.
  2.  
  3. Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
  4.  
  5. If "{target_arch}" =~ /powerpc/
  6.     Set short_arch_name "ppc"
  7.     Set target_cpu "powerpc"
  8. Else
  9.     Set short_arch_name "{target_arch}"
  10. End If
  11.  
  12. # The following works for many configurations, though not all.
  13.  
  14. Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
  15. Set target_os `echo {target_canonical} | sed -e 's/.*-.*-//'`
  16.  
  17. Set bfd_gas no
  18.  
  19. Set TDEFINES ""
  20.  
  21. Set EXTRA_OBJECTS ""
  22.  
  23. # Default emulation.
  24.  
  25. Set em generic
  26.  
  27. If "{target_canonical}" =~ /m68k-apple-macos/
  28.     Set obj_format "coff"
  29.     Set TDEFINES '-d M68KCOFF'
  30.     Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
  31.  
  32. Else If "{target_canonical}" =~ /powerpc-apple-macos/
  33.     Set obj_format "coff"
  34.     Set bfd_gas yes
  35.     Set em macos
  36.  
  37. Else If "{target_canonical}" =~ /i386-unknown-go32/
  38.     Set obj_format "coff"
  39.     Set TDEFINES '-d I386COFF'
  40.  
  41. Else If "{target_canonical}" =~ /m68k-unknown-coff/
  42.     Set TDEFINES '-d M68KCOFF'
  43.  
  44. Else If "{target_canonical}" =~ /mips-idt-ecoff/
  45.     Set bfd_gas yes
  46.     Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
  47.  
  48.  
  49. Else If "{target_canonical}" =~ /sh-hitachi-hms/
  50.     Set obj_format "coff"
  51.     forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
  52. End If
  53.  
  54. forward-include "{srcdir}"config:tc-{short_arch_name}.c targ-cpu.c
  55. forward-include "{srcdir}"config:tc-{short_arch_name}.h targ-cpu.h
  56.  
  57. forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
  58. forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
  59.  
  60. forward-include "{srcdir}"config:te-{em}.h targ-env.h
  61.  
  62. # Special cases for float handling.
  63.  
  64. If "{target_arch}" =~ /ns32k/
  65.     forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
  66. Else If "{target_arch}" =~ /tahoe/
  67.     forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
  68. Else If "{target_arch}" =~ /vax/
  69.     forward-include "{srcdir}"config:atof-vax.c atof-targ.c
  70. Else
  71.     # Use IEEE by default.
  72.     forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
  73. End If
  74.  
  75. Echo '# From mpw-config.in'              > "{o}"mk.tmp
  76. Echo "TDEFINES = " {TDEFINES}            >> "{o}"mk.tmp
  77. Echo "EXTRA_OBJECTS = " {EXTRA_OBJECTS}        >> "{o}"mk.tmp
  78. # (We use the -n option here so as not to get extra spaces inserted)
  79. Echo -n 'TARG_CPU_DEP = {TARG_CPU_DEP_'        >> "{o}"mk.tmp
  80. Echo -n {short_arch_name}            >> "{o}"mk.tmp
  81. Echo -n '}'                    >> "{o}"mk.tmp
  82. Echo '# End from mpw-config.in'            >> "{o}"mk.tmp
  83.  
  84. Echo '/* conf.  Generated by mpw-configure.  */' > "{o}"conf.new
  85. Echo -n '#define TARGET_CPU       "'           >> "{o}"conf.new
  86. Echo -n "{target_cpu}"                   >> "{o}"conf.new
  87. Echo    '"'                       >> "{o}"conf.new
  88. Echo -n '#define TARGET_OS       "'           >> "{o}"conf.new
  89. Echo -n "{target_os}"                   >> "{o}"conf.new
  90. Echo    '"'                       >> "{o}"conf.new
  91. Echo -n '#define TARGET_ALIAS       "'           >> "{o}"conf.new
  92. Echo -n "{target_alias}"                   >> "{o}"conf.new
  93. Echo    '"'                       >> "{o}"conf.new
  94. Echo -n '#define TARGET_CANONICAL       "'         >> "{o}"conf.new
  95. Echo -n "{target_canonical}"            >> "{o}"conf.new
  96. Echo    '"'                       >> "{o}"conf.new
  97. Echo '#include "mpw.h"'                >> "{o}"conf.new
  98. If "{bfd_gas}" =~ /yes/
  99.     Echo "#define BFD_ASSEMBLER"        >> "{o}"conf.new
  100. Else
  101.     Echo "#define MANY_SEGMENTS"        >> "{o}"conf.new
  102. End If
  103. Echo '#define CR_EOL'                >> "{o}"conf.new
  104. Echo '#define OBJ_COFF_OMIT_TIMESTAMP'        >> "{o}"conf.new
  105. Echo '#define LOSING_COMPILER'            >> "{o}"conf.new
  106.  
  107. MoveIfChange "{o}"conf.new "{o}"conf
  108.  
  109. sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit
  110.