1 # Sed commands to finish translating the Unix BFD Makefile into MPW syntax.
3 # Whack out unused host and target define bits.
4 /HDEFINES/s/@HDEFINES@//
5 /TDEFINES/s/@TDEFINES@//
7 # Fix pathnames to include directories.
8 /^INCDIR = /s/^INCDIR = .*$/INCDIR = "{topsrcdir}"include/
9 /^CSEARCH = /s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
11 # Comment out setting of vars, configure script will add these itself.
13 # /^ALL_BACKENDS/s/^/#/
18 # Remove extra, useless, "all".
19 /^all \\Option-f _oldest/,/^$/d
21 # Remove the Makefile rebuild rule.
22 /^Makefile /,/--recheck/d
24 # Don't do any recursive subdir stuff.
25 / subdir_do/s/{MAKE}/null-command/
27 /BFD_H/s/^{BFD_H}/#{BFD_H}/
29 # Point at include files that are always in the objdir.
30 /bfd/s/"{s}"bfd\.h/"{o}"bfd.h/g
31 /config/s/"{s}"config\.h/"{o}"config.h/g
32 /elf32-target/s/"{s}"elf32-target\.h/"{o}"elf32-target.h/g
33 /elf32-target/s/^elf32-target\.h/"{o}"elf32-target.h/
34 /elf64-target/s/"{s}"elf64-target\.h/"{o}"elf64-target.h/g
35 /elf64-target/s/^elf64-target\.h/"{o}"elf64-target.h/
37 /"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
41 # Removing duplicates is cool but presently unnecessary,
43 /^ofiles \\Option-f/,/^$/d
44 /ofiles/s/{OFILES} ofiles/{OFILES}/
46 /cat ofiles/s/`cat ofiles`/{OFILES}/
48 # No corefile support.
49 /COREFILE/s/@COREFILE@//
50 /COREFLAG/s/@COREFLAG@//
52 # No PIC foolery in this environment.
53 /@ALLLIBS@/s/@ALLLIBS@/{TARGETLIB}/
54 /@PICLIST@/s/@PICLIST@//
55 /@PICFLAG@/s/@PICFLAG@//
56 /^{OFILES} \\Option-f stamp-picdir/,/^$/d
58 # Remove the pic trickery from the default build rule.
59 /^\.c\.o \\Option-f /,/End If/c\
62 # MPW Make doesn't know about $<.
63 /"{o}"targets.c.o \\Option-f "{s}"targets.c Makefile/,/^$/c\
64 "{o}"targets.c.o \\Option-f "{s}"targets.c Makefile\
65 {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"targets.c -o "{o}"targets.c.o
67 /"{o}"archures.c.o \\Option-f "{s}"archures.c Makefile/,/^$/c\
68 "{o}"archures.c.o \\Option-f "{s}"archures.c Makefile\
69 {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"archures.c -o "{o}"archures.c.o
71 # Remove the .h rebuilding rules, we don't currently have a doc subdir,
72 # or a way to build the prototype-hacking tool that's in it.
73 /^"{srcdir}"bfd-in2.h \\Option-f /,/^$/d
74 /^"{srcdir}"libbfd.h \\Option-f /,/^$/d
75 /^"{srcdir}"libcoff.h \\Option-f /,/^$/d