]>
Commit | Line | Data |
---|---|---|
a92c5906 SS |
1 | # Configuration fragment for BFD. |
2 | ||
e0151f38 SS |
3 | # This is almost always correct. |
4 | ||
698e0075 | 5 | Set selarchs "&bfd_{target_cpu}_arch" |
e0151f38 SS |
6 | Set defvec "" |
7 | Set selvecs "" | |
1d3c6d87 SS |
8 | |
9 | If "{target_canonical}" =~ /m68k-apple-macos/ | |
e0151f38 SS |
10 | Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o' |
11 | Set defvec m68kcoff_vec | |
12 | Set selvecs '&m68kcoff_vec' | |
480ccad5 | 13 | |
e0151f38 | 14 | Else If "{target_canonical}" =~ /powerpc-apple-macos/ |
aadf04f7 | 15 | Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o' |
698e0075 SS |
16 | Set defvec pmac_xcoff_vec |
17 | Set selvecs '&pmac_xcoff_vec' | |
18 | Set selarchs "&bfd_powerpc_arch" | |
480ccad5 | 19 | |
e0151f38 SS |
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' | |
480ccad5 SS |
24 | |
25 | Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/ | |
e0151f38 SS |
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' | |
480ccad5 | 29 | |
e0151f38 SS |
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' | |
c71f5783 | 34 | End If |
1d3c6d87 | 35 | |
698e0075 | 36 | Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'` |
e0151f38 SS |
37 | |
38 | Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs}" | |
39 | ||
698e0075 SS |
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 | |
e0151f38 | 53 | |
698e0075 SS |
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 | |
e0151f38 | 60 | |
698e0075 | 61 | MoveIfChange "{o}"bfd.h-new "{o}"bfd.h |
e0151f38 | 62 | |
698e0075 | 63 | # Pre-expand some macros in coffswap.h, so MPW C doesn't choke. |
e0151f38 | 64 | |
698e0075 SS |
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 | |
e0151f38 | 72 | |
698e0075 | 73 | MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h |