Commit | Line | Data |
---|---|---|
ea838f99 SS |
1 | # Makefile fragment for GAS. |
2 | ||
9e4eebc2 SS |
3 | VERSION = cygnus-2.3.1 |
4 | ||
5 | gC = gC1 | |
6 | ||
ea838f99 SS |
7 | s = "{srcdir}" |
8 | ||
9 | o = : | |
10 | ||
ea838f99 SS |
11 | CROSS = -d CROSS_COMPILE |
12 | ||
b06fe940 | 13 | ALL_CFLAGS = {CFLAGS} {CROSS} -d TARGET_BYTES_BIG_ENDIAN -d BFD_ASSEMBLER -i "{topsrcdir}"include: -i "{topsrcdir}"bfd:,"{srcdir}",::bfd:,::extra-include,"{srcroot}"include:mpw: |
ea838f99 SS |
14 | # debug options: -mbg on -sym on |
15 | ||
0f8cb88d | 16 | "{o}" \Option-f : "{s}" |
ea838f99 SS |
17 | |
18 | # Default rule that puts each file into separate segment. | |
19 | ||
0f8cb88d | 20 | .c.o \Option-f .c |
b06fe940 | 21 | {CC} {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.c.o |
ea838f99 | 22 | |
9e4eebc2 SS |
23 | .gc.o \Option-f .c |
24 | {gC} {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.gc.o | |
25 | ||
edd9075c SS |
26 | prefix = usr:local: |
27 | ||
28 | bindir = {prefix}bin: | |
29 | ||
0f8cb88d SS |
30 | OBJECTS = \Option-d |
31 | "{o}"app.c.o \Option-d | |
921e047b | 32 | "{o}"as.c.o \Option-d |
0f8cb88d SS |
33 | "{o}"atof-generic.c.o \Option-d |
34 | "{o}"bignum-copy.c.o \Option-d | |
35 | "{o}"cond.c.o \Option-d | |
36 | "{o}"expr.c.o \Option-d | |
37 | "{o}"flonum-konst.c.o \Option-d | |
38 | "{o}"flonum-copy.c.o \Option-d | |
39 | "{o}"flonum-mult.c.o \Option-d | |
40 | "{o}"frags.c.o \Option-d | |
41 | "{o}"hash.c.o \Option-d | |
42 | "{o}"hex-value.c.o \Option-d | |
43 | "{o}"input-file.c.o \Option-d | |
44 | "{o}"input-scrub.c.o \Option-d | |
45 | "{o}"listing.c.o \Option-d | |
46 | "{o}"messages.c.o \Option-d | |
47 | "{o}"output-file.c.o \Option-d | |
48 | "{o}"read.c.o \Option-d | |
49 | "{o}"stabs.c.o \Option-d | |
50 | "{o}"subsegs.c.o \Option-d | |
51 | "{o}"symbols.c.o \Option-d | |
52 | "{o}"write.c.o \Option-d | |
53 | "{o}"ecoff.c.o \Option-d | |
54 | "{o}"xmalloc.c.o \Option-d | |
ea838f99 | 55 | |
9e4eebc2 SS |
56 | TARG_OBJECTS = "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"atof-targ.c.o |
57 | ||
58 | # If you put config.h in INCLUDES, then MPW's stupid make will always | |
59 | # want to rebuild everything. Better to do in two stages. | |
60 | ||
ea838f99 | 61 | INCLUDES = |
9e4eebc2 | 62 | # "{o}"config.h |
ea838f99 SS |
63 | # host.h |
64 | #"{s}".h | |
65 | ||
9e4eebc2 SS |
66 | CLIBS = ::libiberty:libiberty.o ::bfd:libbfd.o ::opcodes:libopcodes.o |
67 | ||
0f8cb88d | 68 | all \Option-f as.new |
ea838f99 | 69 | |
9e4eebc2 SS |
70 | as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS} |
71 | Link {LDFLAGS} -o as.new {OBJECTS} {TARG_OBJECTS} {CLIBS} {EXTRALIBS} | |
72 | ||
73 | ||
74 | "{o}"config.h \Option-f "{o}"config-stamp | |
75 | ||
76 | "{o}"config-stamp \Option-f Makefile | |
77 | Delete -i -y "{o}"config.new "{o}"config-stamp | |
78 | echo '#ifndef TARGET_CPU' > "{o}"config.new | |
79 | echo '#define TARGET_CPU "{target_cpu}"' >> "{o}"config.new | |
80 | echo '#define TARGET_ALIAS "{target_alias}"' >> "{o}"config.new | |
81 | echo '#define TARGET_CANONICAL "{target_canonical}"' >> "{o}"config.new | |
82 | echo '#define GAS_VERSION "{VERSION}"' >> "{o}"config.new | |
83 | # if [ "$(defs)" != "" ]; then \ | |
84 | # for d in .. $(defs) ; do \ | |
85 | # if [ "$$d" != ".." ]; then \ | |
86 | # echo "#define $$d" >> "{o}"config.new ; \ | |
87 | # else true; fi; \ | |
88 | # done ; \ | |
89 | # else true; fi | |
90 | echo '#endif /* TARGET_CPU */' >> "{o}"config.new | |
91 | MoveIfChange "{o}"config.new "{o}"config.h | |
921e047b | 92 | Echo ' ' >"{o}"config-stamp |
ea838f99 | 93 | |
0f8cb88d | 94 | "{o}"app.c.o \Option-f "{s}"app.c {INCLUDES} |
921e047b | 95 | "{o}"as.c.o \Option-f "{s}"as.c {INCLUDES} |
0f8cb88d | 96 | "{o}"atof-generic.c.o \Option-f "{s}"atof-generic.c {INCLUDES} |
9e4eebc2 | 97 | "{o}"bignum-copy.c.o \Option-f "{s}"bignum-copy.c {INCLUDES} |
0f8cb88d SS |
98 | "{o}"cond.c.o \Option-f "{s}"cond.c {INCLUDES} |
99 | "{o}"expr.c.o \Option-f "{s}"expr.c {INCLUDES} | |
100 | "{o}"flonum-konst.c.o \Option-f "{s}"flonum-konst.c {INCLUDES} | |
101 | "{o}"flonum-copy.c.o \Option-f "{s}"flonum-copy.c {INCLUDES} | |
102 | "{o}"flonum-mult.c.o \Option-f "{s}"flonum-mult.c {INCLUDES} | |
103 | "{o}"frags.c.o \Option-f "{s}"frags.c {INCLUDES} | |
104 | "{o}"hash.c.o \Option-f "{s}"hash.c {INCLUDES} | |
105 | "{o}"hex-value.c.o \Option-f "{s}"hex-value.c {INCLUDES} | |
106 | "{o}"input-file.c.o \Option-f "{s}"input-file.c {INCLUDES} | |
107 | "{o}"input-scrub.c.o \Option-f "{s}"input-scrub.c {INCLUDES} | |
108 | "{o}"listing.c.o \Option-f "{s}"listing.c {INCLUDES} | |
109 | "{o}"messages.c.o \Option-f "{s}"messages.c {INCLUDES} | |
110 | "{o}"output-file.c.o \Option-f "{s}"output-file.c {INCLUDES} | |
111 | "{o}"read.c.o \Option-f "{s}"read.c {INCLUDES} | |
112 | "{o}"subsegs.c.o \Option-f "{s}"subsegs.c {INCLUDES} | |
113 | "{o}"symbols.c.o \Option-f "{s}"symbols.c {INCLUDES} | |
114 | "{o}"write.c.o \Option-f "{s}"write.c {INCLUDES} | |
115 | "{o}"ecoff.c.o \Option-f "{s}"ecoff.c {INCLUDES} | |
116 | "{o}"xmalloc.c.o \Option-f "{s}"xmalloc.c {INCLUDES} | |
edd9075c | 117 | |
9e4eebc2 SS |
118 | "{o}"targ-cpu.c.o \Option-f "{o}"targ-cpu.c {INCLUDES} |
119 | "{o}"obj-format.c.o \Option-f "{o}"obj-format.c {INCLUDES} | |
120 | "{o}"atof-targ.c.o \Option-f "{o}"atof-targ.c {INCLUDES} | |
121 | ||
921e047b SS |
122 | install \Option-f all install-only |
123 | ||
124 | install-only \Option-f | |
edd9075c SS |
125 | If "`Exists "{prefix}"`" == "" |
126 | Echo "{prefix}" does not exist, cannot install anything | |
127 | Exit 1 | |
128 | End If | |
129 | If "`Exists "{bindir}"`" == "" | |
130 | NewFolder "{bindir}" | |
131 | End If | |
132 | Duplicate -y :as.new "{bindir}"as |