Commit | Line | Data |
---|---|---|
b5b2c886 | 1 | # Configuration fragment for LD. |
22691fe7 | 2 | |
1a8b189e | 3 | If "{target_canonical}" =~ /m68k-apple-macos/ |
22691fe7 | 4 | Set emulname m68kcoff |
ab4ccfd5 SS |
5 | forward-include "{srcdir}"mpw-em68kcoff.c em68kcoff.c |
6 | Set emulation_ofiles "{o}"em68kcoff.c.o | |
d8d4a450 | 7 | |
49af8a4e SS |
8 | Else If "{target_canonical}" =~ /powerpc-apple-macos/ |
9 | Set emulname ppcmacos | |
d8d4a450 | 10 | forward-include "{srcdir}"mpw-eppcmac.c eppcmacos.c |
49af8a4e | 11 | Set emulation_ofiles "{o}"eppcmacos.c.o |
d8d4a450 | 12 | |
0b2aef4d | 13 | Else If "{target_canonical}" =~ /i386-\Option-x-go32/ |
ab4ccfd5 SS |
14 | Set emulname i386go32 |
15 | forward-include "{srcdir}"mpw-ei386go32.c ei386go32.c | |
16 | Set emulation_ofiles "{o}"ei386go32.c.o | |
d8d4a450 | 17 | |
0b2aef4d | 18 | Else If "{target_canonical}" =~ /mips-\Option-x-ecoff/ |
22691fe7 | 19 | Set emulname mipsidt |
c6cfcb7f | 20 | forward-include "{srcdir}"mpw-idtmips.c emipsidt.c |
ab4ccfd5 | 21 | Set emulation_ofiles "{o}"emipsidt.c.o |
d8d4a450 | 22 | |
0b2aef4d SS |
23 | Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/ |
24 | Set emulname elf32ebmip | |
c6cfcb7f | 25 | forward-include "{srcdir}"mpw-elfmips.c eelf32ebmip.c |
0b2aef4d SS |
26 | Set emulation_ofiles "{o}"eelf32ebmip.c.o |
27 | ||
28 | Else If "{target_canonical}" =~ /sh-\Option-x-hms/ | |
ab4ccfd5 SS |
29 | Set emulname sh |
30 | forward-include "{srcdir}"mpw-esh.c esh.c | |
31 | Set emulation_ofiles "{o}"esh.c.o | |
22691fe7 SS |
32 | End If |
33 | ||
ab4ccfd5 SS |
34 | Echo '/* This file is automatically generated. DO NOT EDIT! */' > "{o}"ldemul-tmp.h |
35 | Echo "extern ld_emulation_xfer_type ld_{emulname}_emulation;" >> "{o}"ldemul-tmp.h | |
36 | Echo '#define EMULATION_LIST \' >> "{o}"ldemul-tmp.h | |
37 | Echo " &ld_{emulname}_emulation, \" >> "{o}"ldemul-tmp.h | |
38 | Echo ' 0' >> "{o}"ldemul-tmp.h | |
1a8b189e | 39 | |
49af8a4e | 40 | MoveIfChange "{o}"ldemul-tmp.h "{o}"ldemul-list.h |
1a8b189e | 41 | |
49af8a4e SS |
42 | Echo '# From mpw-config.in' > "{o}"mk.tmp |
43 | Echo "EMUL = " {emulname} >> "{o}"mk.tmp | |
44 | Echo "EMULATION_OFILES = " {emulation_ofiles} >> "{o}"mk.tmp | |
ab4ccfd5 | 45 | Echo 'version = ' `Search 'ld version ' {srcdir}ldver.c | sed -e 's/.*ld version \([^ ]*\).*/\1/'` >> "{o}"mk.tmp |
49af8a4e SS |
46 | Echo "TDEFINES = " >> "{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 | |
1a8b189e | 51 | |
49af8a4e | 52 | MoveIfChange "{o}"config.new "{o}"config.h |