1 # Configuration fragment for GAS.
3 Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
5 If "{target_arch}" =~ /powerpc/
6 Set short_arch_name "ppc"
7 Set target_cpu "powerpc"
9 Set short_arch_name "{target_arch}"
12 # The following works for many configurations, though not all.
14 Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
22 If "{target_canonical}" =~ /m68k-apple-macos/
24 Set TDEFINES '-d M68KCOFF'
25 Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
26 Else If "{target_canonical}" =~ /powerpc-apple-macos/
29 Else If "{target_canonical}" =~ /i386-unknown-go32/
31 Set TDEFINES '-d I386COFF'
32 Else If "{target_canonical}" =~ /m68k-unknown-coff/
33 Set TDEFINES '-d M68KCOFF'
34 Else If "{target_canonical}" =~ /mips-idt-ecoff/
36 Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
37 Else If "{target_canonical}" =~ /sh-hitachi-hms/
39 forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
42 forward-include "{srcdir}"config:tc-{short_arch_name}.c targ-cpu.c
43 forward-include "{srcdir}"config:tc-{short_arch_name}.h targ-cpu.h
45 forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
46 forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
50 forward-include "{srcdir}"config:te-generic.h targ-env.h
52 # Special cases for float handling.
54 If "{target_arch}" =~ /ns32k/
55 forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
56 Else If "{target_arch}" =~ /tahoe/
57 forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
58 Else If "{target_arch}" =~ /vax/
59 forward-include "{srcdir}"config:atof-vax.c atof-targ.c
61 # Use IEEE by default.
62 forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
65 Echo '# From mpw-config.in' > "{o}"mk.tmp
66 Echo "TDEFINES = " {TDEFINES} >> "{o}"mk.tmp
67 Echo "EXTRA_OBJECTS = " {EXTRA_OBJECTS} >> "{o}"mk.tmp
68 # (We use the -n option here so as not to get extra spaces inserted)
69 Echo -n 'TARG_CPU_DEP = {TARG_CPU_DEP_' >> "{o}"mk.tmp
70 Echo -n {short_arch_name} >> "{o}"mk.tmp
71 Echo -n '}' >> "{o}"mk.tmp
72 Echo '# End from mpw-config.in' >> "{o}"mk.tmp
74 Echo '/* conf. Generated by mpw-configure. */' > "{o}"conf.new
75 Echo -n '#define TARGET_CPU "' >> "{o}"conf.new
76 Echo -n "{target_cpu}" >> "{o}"conf.new
77 Echo '"' >> "{o}"conf.new
78 Echo -n '#define TARGET_ALIAS "' >> "{o}"conf.new
79 Echo -n "{target_alias}" >> "{o}"conf.new
80 Echo '"' >> "{o}"conf.new
81 Echo -n '#define TARGET_CANONICAL "' >> "{o}"conf.new
82 Echo -n "{target_canonical}" >> "{o}"conf.new
83 Echo '"' >> "{o}"conf.new
84 Echo '#include "mpw.h"' >> "{o}"conf.new
85 If "{bfd_gas}" =~ /yes/
86 Echo "#define BFD_ASSEMBLER" >> "{o}"conf.new
88 Echo "#define MANY_SEGMENTS" >> "{o}"conf.new
90 Echo '#define CR_EOL' >> "{o}"conf.new
91 Echo '#define OBJ_COFF_OMIT_TIMESTAMP' >> "{o}"conf.new
92 Echo '#define LOSING_COMPILER' >> "{o}"conf.new
94 MoveIfChange "{o}"conf.new "{o}"conf
96 sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit