Add some support for i960 MRI compatibility mode.
[deliverable/binutils-gdb.git] / gas / mpw-config.in
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
16 Set bfd_gas no
17
18 Set TDEFINES ""
19
20 Set EXTRA_OBJECTS ""
21
22 If "{target_canonical}" =~ /m68k-apple-macos/
23 Set obj_format "coff"
24 Set TDEFINES '-d M68KCOFF'
25 Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
26 Else If "{target_canonical}" =~ /powerpc-apple-macos/
27 Set obj_format "coff"
28 Set bfd_gas yes
29 Else If "{target_canonical}" =~ /i386-unknown-go32/
30 Set obj_format "coff"
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/
35 Set bfd_gas yes
36 Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
37 Else If "{target_canonical}" =~ /sh-hitachi-hms/
38 Set obj_format "coff"
39 forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
40 End If
41
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
44
45 forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
46 forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
47
48 # Default emulation.
49
50 forward-include "{srcdir}"config:te-generic.h targ-env.h
51
52 # Special cases for float handling.
53
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
60 Else
61 # Use IEEE by default.
62 forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
63 End If
64
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
73
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
87 Else
88 Echo "#define MANY_SEGMENTS" >> "{o}"conf.new
89 End If
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
93
94 MoveIfChange "{o}"conf.new "{o}"conf
95
96 sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit
This page took 0.040084 seconds and 4 git commands to generate.