daily update
[deliverable/binutils-gdb.git] / bfd / mpw-config.in
CommitLineData
252b5132
RH
1# Configuration fragment for BFD.
2
3# This is almost always correct.
4
5Set selarchs "&bfd_{target_cpu}_arch"
6Set defvec ""
7Set selvecs ""
8Set havevecs ""
9
10If "{target_canonical}" =~ /m68k-apple-macos/
11 Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o'
12 Set defvec m68kcoff_vec
13 Set selvecs '&m68kcoff_vec'
14 Set havevecs '-d HAVE_m68kcoff_vec'
15
16Else If "{target_canonical}" =~ /powerpc-apple-macos/
17 Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o'
18 Set defvec pmac_xcoff_vec
19 Set selvecs '&pmac_xcoff_vec'
20 Set havevecs '-d HAVE_pmac_xcoff_vec'
21 Set selarchs "&bfd_powerpc_arch"
22
23Else If "{target_canonical}" =~ /i386-\Option-x-go32/
24 Set BFD_BACKENDS '"{o}"coff-i386.c.o'
25 Set defvec i386coff_vec
26 Set selvecs '&i386coff_vec'
27 Set havevecs '-d HAVE_i386coff_vec'
28
29Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
30 Set BFD_BACKENDS '"{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o "{o}"elf32.c.o "{o}"elf32-mips.c.o "{o}"elflink.c.o'
31 Set defvec ecoff_big_vec
32 Set selvecs '&ecoff_big_vec,&ecoff_little_vec,&bfd_elf32_bigmips_vec'
33 Set havevecs '-d HAVE_ecoff_big_vec -d HAVE_ecoff_little_vec -d HAVE_bfd_elf32_bigmips_vec'
34
35Else If "{target_canonical}" =~ /sh-\Option-x-hms/
36 Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o'
37 Set defvec shcoff_vec
38 Set selvecs '&shcoff_vec,&shlcoff_vec'
39 Set havevecs '-d HAVE_shcoff_vec -d HAVE_shlcoff_vec'
40End If
41
42Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'`
43
44Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs} {havevecs}"
45
46Echo '# From mpw-config.in' > "{o}"mk.tmp
47Echo 'WORDSIZE = 32' >> "{o}"mk.tmp
48Echo 'BFD_MACHINES = ' {ta} >> "{o}"mk.tmp
49Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp
50Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp
51Echo 'HDEPFILES = ' >> "{o}"mk.tmp
52Echo 'TDEPFILES = ' >> "{o}"mk.tmp
53Echo '# End from mpw-config.in' >> "{o}"mk.tmp
54
55Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
56Echo '#include "mpw.h"' >> "{o}"config.new
57
58MoveIfChange "{o}"config.new "{o}"config.h
59
60# We can only handle 32-bit targets right now.
61
62sed -e 's/@WORDSIZE@/32/' \Option-d
63 -e 's/@wordsize@/32/' \Option-d
64 -e "s/@VERSION@/`Catenate {srcdir}VERSION`/" \Option-d
65 -e 's/@BFD_HOST_64_BIT_DEFINED@/0/' \Option-d
66 -e 's/@BFD_HOST_64_BIT@//' \Option-d
67 -e 's/@BFD_HOST_U_64_BIT@//' \Option-d
68 -e 's/@BFD_HOST_64BIT_LONG@/0/' \Option-d
69 "{srcdir}"bfd-in2.h >"{o}"bfd.h-new
70
71MoveIfChange "{o}"bfd.h-new "{o}"bfd.h
72
73sed -e 's/NN/32/g' "{srcdir}"elfxx-target.h >"{o}"elf32-target.h-new
74MoveIfChange "{o}"elf32-target.h-new "{o}"elf32-target.h
75
76# Pre-expand some macros in coffswap.h, so MPW C doesn't choke.
77
78sed -e 's/^ PUT_AOUTHDR_TSIZE (/ bfd_h_put_32 (/' \Option-d
79 -e 's/^ PUT_AOUTHDR_DSIZE (/ bfd_h_put_32 (/' \Option-d
80 -e 's/^ PUT_AOUTHDR_BSIZE (/ bfd_h_put_32 (/' \Option-d
81 -e 's/^ PUT_AOUTHDR_ENTRY (/ bfd_h_put_32 (/' \Option-d
82 -e 's/^ PUT_AOUTHDR_TEXT_START (/ bfd_h_put_32 (/' \Option-d
83 -e 's/^ PUT_AOUTHDR_DATA_START (/ bfd_h_put_32 (/' \Option-d
84 "{srcdir}"coffswap.h >"{o}"coffswap.h-new
85
86MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h
This page took 0.117327 seconds and 4 git commands to generate.