]>
Commit | Line | Data |
---|---|---|
fecd2382 | 1 | # Makefile for GNU Assembler |
79a54a5b | 2 | # Copyright (C) 1987-1992 Free Software Foundation, Inc. |
fecd2382 RP |
3 | |
4 | #This file is part of GNU GAS. | |
5 | ||
6 | #GNU GAS is free software; you can redistribute it and/or modify | |
7 | #it under the terms of the GNU General Public License as published by | |
1058238c | 8 | #the Free Software Foundation; either version 2, or (at your option) |
fecd2382 RP |
9 | #any later version. |
10 | ||
11 | #GNU GAS is distributed in the hope that it will be useful, | |
12 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | #GNU General Public License for more details. | |
15 | ||
16 | #You should have received a copy of the GNU General Public License | |
17 | #along with GNU GAS; see the file COPYING. If not, write to | |
18 | #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | ||
fecd2382 RP |
20 | # The targets for external use include: |
21 | # all, doc, proto, install, uninstall, includes, TAGS, | |
22 | # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4. | |
23 | ||
24 | # Variables that exist for you to override. | |
25 | # See below for how to change them for certain systems. | |
26 | ||
1058238c RP |
27 | srcdir = . |
28 | ||
29 | prefix = /usr/local | |
30 | ||
7e10f53c | 31 | program_transform_name = |
787c6bfe RP |
32 | exec_prefix = $(prefix) |
33 | bindir = $(exec_prefix)/bin | |
34 | libdir = $(exec_prefix)/lib | |
efbfb612 | 35 | tooldir = $(libdir)/$(target_alias) |
787c6bfe | 36 | |
1058238c | 37 | datadir = $(prefix)/lib |
787c6bfe | 38 | mandir = $(prefix)/man |
1058238c RP |
39 | man1dir = $(mandir)/man1 |
40 | man2dir = $(mandir)/man2 | |
41 | man3dir = $(mandir)/man3 | |
42 | man4dir = $(mandir)/man4 | |
43 | man5dir = $(mandir)/man5 | |
44 | man6dir = $(mandir)/man6 | |
45 | man7dir = $(mandir)/man7 | |
46 | man8dir = $(mandir)/man8 | |
47 | man9dir = $(mandir)/man9 | |
787c6bfe | 48 | infodir = $(prefix)/info |
1058238c RP |
49 | includedir = $(prefix)/include |
50 | docdir = $(datadir)/doc | |
51 | ||
fecd2382 | 52 | SHELL = /bin/sh |
1058238c | 53 | |
fecd2382 | 54 | INSTALL = install -c |
fecd2382 | 55 | INSTALL_PROGRAM = $(INSTALL) |
1058238c | 56 | INSTALL_DATA = $(INSTALL) |
fecd2382 | 57 | |
1058238c RP |
58 | AR = ar |
59 | AR_FLAGS = qv | |
60 | BISON = bison | |
61 | MAKEINFO = makeinfo | |
fecd2382 | 62 | RANLIB = ranlib |
4b857710 ILT |
63 | CFLAGS = -g |
64 | ||
65 | FLAGS_TO_PASS = \ | |
66 | "prefix=$(prefix)" \ | |
67 | "exec_prefix=$(exec_prefix)" \ | |
68 | "tooldir=$(tooldir)" \ | |
69 | "AR=$(AR)" \ | |
70 | "AR_FLAGS=$(AR_FLAGS)" \ | |
71 | "CC=$(CC)" \ | |
72 | "CFLAGS=$(CFLAGS)" \ | |
73 | "RANLIB=$(RANLIB)" \ | |
74 | "LOADLIBES=$(LOADLIBES)" \ | |
75 | "LDFLAGS=$(LDFLAGS)" \ | |
76 | "BISON=$(BISON)" \ | |
77 | "LEX=$(LEX)" \ | |
78 | "MAKEINFO=$(MAKEINFO)" \ | |
79 | "INSTALL=$(INSTALL)" \ | |
80 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
81 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" | |
fecd2382 | 82 | |
fecd2382 RP |
83 | # Lists of files for various purposes. |
84 | ||
85 | REAL_SOURCES = \ | |
86 | $(srcdir)/app.c \ | |
87 | $(srcdir)/as.c \ | |
88 | $(srcdir)/atof-generic.c \ | |
89 | $(srcdir)/bignum-copy.c \ | |
90 | $(srcdir)/cond.c \ | |
91 | $(srcdir)/expr.c \ | |
5d53038b | 92 | $(srcdir)/flonum-konst.c \ |
fecd2382 RP |
93 | $(srcdir)/flonum-copy.c \ |
94 | $(srcdir)/flonum-mult.c \ | |
95 | $(srcdir)/frags.c \ | |
96 | $(srcdir)/hash.c \ | |
97 | $(srcdir)/hex-value.c \ | |
98 | $(srcdir)/input-file.c \ | |
99 | $(srcdir)/input-scrub.c \ | |
100 | $(srcdir)/messages.c \ | |
101 | $(srcdir)/output-file.c \ | |
102 | $(srcdir)/read.c \ | |
fecd2382 RP |
103 | $(srcdir)/subsegs.c \ |
104 | $(srcdir)/symbols.c \ | |
fecd2382 | 105 | $(srcdir)/write.c \ |
3340f7e5 | 106 | $(srcdir)/listing.c \ |
7f2cb270 | 107 | $(srcdir)/xmalloc.c |
fecd2382 RP |
108 | |
109 | # in an expedient order | |
110 | LINKED_SOURCES = \ | |
111 | targ-cpu.c \ | |
112 | obj-format.c \ | |
113 | atof-targ.c | |
114 | ||
115 | SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES) | |
116 | ||
117 | REAL_HEADERS = \ | |
118 | $(srcdir)/as.h \ | |
119 | $(srcdir)/bignum.h \ | |
120 | $(srcdir)/expr.h \ | |
121 | $(srcdir)/flonum.h \ | |
122 | $(srcdir)/frags.h \ | |
123 | $(srcdir)/hash.h \ | |
124 | $(srcdir)/input-file.h \ | |
542e1629 | 125 | $(srcdir)/listing.h \ |
fecd2382 RP |
126 | $(srcdir)/tc.h \ |
127 | $(srcdir)/obj.h \ | |
128 | $(srcdir)/read.h \ | |
fecd2382 RP |
129 | $(srcdir)/struc-symbol.h \ |
130 | $(srcdir)/subsegs.h \ | |
131 | $(srcdir)/symbols.h \ | |
fecd2382 RP |
132 | $(srcdir)/write.h |
133 | ||
134 | LINKED_HEADERS = \ | |
135 | a.out.gnu.h \ | |
136 | a.out.h \ | |
137 | host.h \ | |
138 | targ-env.h \ | |
139 | targ-cpu.h \ | |
140 | obj-format.h \ | |
141 | atof-targ.h | |
142 | ||
143 | HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS) | |
144 | ||
145 | OBJS = \ | |
146 | targ-cpu.o \ | |
147 | obj-format.o \ | |
148 | atof-targ.o \ | |
149 | app.o \ | |
150 | as.o \ | |
151 | atof-generic.o \ | |
152 | bignum-copy.o \ | |
153 | cond.o \ | |
154 | expr.o \ | |
5d53038b | 155 | flonum-konst.o \ |
fecd2382 RP |
156 | flonum-copy.o \ |
157 | flonum-mult.o \ | |
158 | frags.o \ | |
159 | hash.o \ | |
160 | hex-value.o \ | |
161 | input-file.o \ | |
162 | input-scrub.o \ | |
163 | messages.o \ | |
164 | output-file.o \ | |
165 | read.o \ | |
fecd2382 RP |
166 | subsegs.o \ |
167 | symbols.o \ | |
168 | version.o \ | |
169 | write.o \ | |
3340f7e5 | 170 | listing.o \ |
7f2cb270 | 171 | xmalloc.o |
fecd2382 | 172 | |
f6b67e4c RP |
173 | #### host, target, and site specific Makefile frags come in here. |
174 | ||
fc00f451 KR |
175 | VERSION=2.0.1-alpha |
176 | ||
542e1629 | 177 | all: as.new |
4b857710 | 178 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) |
79a54a5b | 179 | |
1058238c | 180 | info: |
4b857710 | 181 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) info) |
79a54a5b | 182 | |
81f73963 | 183 | install-info: |
4b857710 | 184 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info) |
79a54a5b RP |
185 | |
186 | clean-info: | |
4b857710 | 187 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info) |
fecd2382 | 188 | |
fecd2382 RP |
189 | # Now figure out from those variables how to compile and link. |
190 | ||
191 | # This is the variable actually used when we compile. | |
fc00f451 KR |
192 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) \ |
193 | $(BFDDEF) | |
fecd2382 | 194 | |
fecd2382 RP |
195 | # How to link with both our special library facilities |
196 | # and the system's installed libraries. | |
f6b67e4c | 197 | |
fc00f451 KR |
198 | LIBS = ../opcodes/libopcodes.a $(BFDLIB) $(LOCAL_LOADLIBES) \ |
199 | ../libiberty/libiberty.a | |
fecd2382 RP |
200 | |
201 | # Specify the directories to be searched for header files. | |
202 | # Both . and srcdir are used, in that order, | |
203 | # so that tm.h and config.h will be found in the compilation | |
204 | # subdirectory rather than in the source directory. | |
1058238c RP |
205 | INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include |
206 | SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config | |
fecd2382 RP |
207 | |
208 | # Always use -I$(srcdir)/config when compiling. | |
209 | .c.o: | |
210 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $< | |
211 | ||
212 | # This tells GNU make version 3 not to export all the variables | |
213 | # defined in this file into the environment. | |
214 | .NOEXPORT: | |
542e1629 | 215 | |
fecd2382 | 216 | # Files to be copied away after each stage in building. |
da0b2bff | 217 | STAGESTUFF = *.o as.new |
fecd2382 | 218 | |
7f2cb270 | 219 | as.new: $(OBJS) $(LIBS) |
da0b2bff | 220 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) |
fecd2382 | 221 | |
80c8fd72 | 222 | installcheck check: |
fc00f451 | 223 | @echo No checks are available yet for the GNU assembler. |
787c6bfe | 224 | |
fecd2382 RP |
225 | config.status: |
226 | @echo You must configure gas. Look at the INSTALL file for details. | |
227 | @false | |
228 | ||
fc00f451 KR |
229 | config.h: config-stamp ; @true |
230 | config-stamp: Makefile | |
231 | -rm -f config.new config-stamp | |
232 | echo '#define TARGET_CPU "$(target_cpu)"' > config.new | |
233 | echo '#define TARGET_ALIAS "$(target_alias)"' >> config.new | |
234 | echo '#define TARGET_CANONICAL "$(target_canonical)"' >> config.new | |
235 | $(srcdir)/../move-if-change config.new config.h | |
236 | touch config-stamp | |
237 | ||
238 | version.c: vers-stamp ; @true | |
239 | vers-stamp: Makefile | |
240 | echo '#include "ansidecl.h"' > version.new | |
241 | echo 'CONST char version_string[] = "$(VERSION)";' >> version.new | |
242 | $(srcdir)/../move-if-change version.new version.c | |
243 | touch vers-stamp | |
244 | ||
fecd2382 RP |
245 | # Compiling object files from source files. |
246 | ||
fecd2382 | 247 | app.o : app.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 248 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
249 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
250 | as.o : as.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 251 | targ-cpu.h struc-symbol.h \ |
7f2cb270 | 252 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \ |
fc00f451 | 253 | tc.h obj.h config.h |
fecd2382 | 254 | atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 255 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
256 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
257 | bignum-copy.o : bignum-copy.c as.h host.h \ | |
258 | targ-env.h obj-format.h \ | |
d1a9e594 | 259 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
260 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
261 | cond.o : cond.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 262 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
263 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
264 | ||
fecd2382 | 265 | debug.o : debug.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 266 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
267 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
268 | subsegs.h | |
269 | expr.o : expr.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 270 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
271 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
272 | ||
5d53038b | 273 | flonum-konst.o : flonum-konst.c flonum.h bignum.h |
fecd2382 | 274 | flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 275 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
276 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
277 | flonum-mult.o : flonum-mult.c flonum.h bignum.h | |
278 | frags.o : frags.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 279 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 280 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 281 | subsegs.h |
fecd2382 | 282 | hash.o : hash.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 283 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
284 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
285 | hex-value.o : hex-value.c | |
286 | input-file.o : input-file.c as.h host.h \ | |
287 | targ-env.h obj-format.h targ-cpu.h \ | |
d1a9e594 | 288 | struc-symbol.h write.h flonum.h bignum.h expr.h \ |
fecd2382 RP |
289 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h |
290 | input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \ | |
291 | as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 292 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
293 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
294 | input-file.h | |
3340f7e5 RP |
295 | listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \ |
296 | listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \ | |
297 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h | |
fecd2382 | 298 | messages.o : messages.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 299 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 300 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
fecd2382 | 301 | output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 302 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
303 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
304 | output-file.h | |
305 | read.o : read.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 306 | targ-cpu.h struc-symbol.h \ |
da7aaffb | 307 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
fecd2382 | 308 | subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 309 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 310 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 311 | subsegs.h |
fecd2382 | 312 | symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 313 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 314 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 315 | subsegs.h |
fecd2382 RP |
316 | version.o : version.c |
317 | write.o : write.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 318 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 319 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 320 | subsegs.h output-file.h |
fecd2382 | 321 | xmalloc.o : xmalloc.c |
fecd2382 | 322 | atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 323 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
324 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
325 | symbols.h tc.h obj.h | |
326 | obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 327 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 328 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
7f2cb270 | 329 | subsegs.h symbols.h tc.h obj.h |
69498fa2 | 330 | targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \ |
d1a9e594 | 331 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 332 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
da0b2bff | 333 | symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS) |
d1a9e594 | 334 | |
fecd2382 RP |
335 | # Remake the info files. |
336 | ||
921faa52 | 337 | doc: $(srcdir)/as.info |
fecd2382 | 338 | |
921faa52 | 339 | $(srcdir)/as.info: $(srcdir)/doc/as.texinfo |
4b857710 | 340 | @(cd doc; make $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) |
fecd2382 | 341 | |
fecd2382 | 342 | clean: |
4b857710 | 343 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean) |
542e1629 | 344 | -rm -f $(STAGESTUFF) core |
fecd2382 RP |
345 | |
346 | # Like clean but also delete the links made to configure gas. | |
542e1629 RP |
347 | distclean: clean |
348 | -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \ | |
349 | targ-cpu.c obj-format.h obj-format.c atof-targ.c \ | |
350 | gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs | |
351 | gas.tps gas.vrs TAGS gas.info* gas.?? gas.??s gas.log \ | |
352 | gas.toc gas.*aux *.dvi | |
353 | ||
fecd2382 RP |
354 | # Entry points `install', `includes' and `uninstall'. |
355 | ||
356 | # Copy the files into directories where they will be run. | |
542e1629 | 357 | install: |
4b857710 ILT |
358 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ |
359 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
360 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi | |
361 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ | |
362 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
363 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
7e10f53c ILT |
364 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
365 | rm -f $(bindir)/$$n; \ | |
366 | $(INSTALL_PROGRAM) as.new $(bindir)/$$n; \ | |
efbfb612 ILT |
367 | $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1; \ |
368 | if [ -d $(tooldir) ]; then \ | |
369 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
370 | rm -f $(tooldir)/bin/as; \ | |
371 | ln $(bindir)/$$n $(tooldir)/bin/as \ | |
372 | || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \ | |
373 | else true; fi | |
fecd2382 | 374 | |
fecd2382 RP |
375 | # Cancel installation by deleting the installed files. |
376 | uninstall: | |
7e10f53c ILT |
377 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
378 | rm -f $(bindir)/$$n; \ | |
379 | rm -f $(mandir)/$$n.1 | |
542e1629 | 380 | |
fecd2382 RP |
381 | # These exist for maintenance purposes. |
382 | ||
383 | tags TAGS: force | |
787c6bfe | 384 | etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in |
fecd2382 | 385 | |
542e1629 | 386 | bootstrap: as.new force |
fecd2382 | 387 | $(MAKE) stage1 |
542e1629 | 388 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 389 | $(MAKE) stage2 |
542e1629 | 390 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 391 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
392 | |
393 | bootstrap2: force | |
542e1629 | 394 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 395 | $(MAKE) stage2 |
542e1629 | 396 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
da0b2bff | 397 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
398 | |
399 | bootstrap3: force | |
542e1629 | 400 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 401 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
402 | |
403 | # Copy the object files from a particular stage into a subdirectory. | |
404 | stage1: force | |
405 | -mkdir stage1 | |
406 | -mv $(STAGESTUFF) stage1 | |
81f73963 | 407 | if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi |
fecd2382 RP |
408 | |
409 | stage2: force | |
410 | -mkdir stage2 | |
411 | -mv $(STAGESTUFF) stage2 | |
81f73963 | 412 | if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi |
fecd2382 RP |
413 | |
414 | stage3: force | |
415 | -mkdir stage3 | |
6a3958b2 | 416 | -mv $(STAGESTUFF) stage3 |
81f73963 | 417 | if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi |
fecd2382 | 418 | |
a01bf1fb RP |
419 | against=stage2 |
420 | ||
421 | comparison: force | |
422 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
423 | ||
6a3958b2 | 424 | de-stage1: force |
da0b2bff | 425 | - (cd stage1 ; rm as ; mv -f * ..) |
6a3958b2 RP |
426 | - rmdir stage1 |
427 | ||
428 | de-stage2: force | |
da0b2bff | 429 | - (cd stage2 ; rm as ; mv -f * ..) |
6a3958b2 RP |
430 | - rmdir stage2 |
431 | ||
432 | de-stage3: force | |
da0b2bff | 433 | - (cd stage3 ; rm as ; mv -f * ..) |
6a3958b2 | 434 | - rmdir stage3 |
fecd2382 | 435 | |
fecd2382 RP |
436 | #In GNU Make, ignore whether `stage*' exists. |
437 | .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap | |
fecd2382 RP |
438 | |
439 | force: | |
440 | ||
fc00f451 KR |
441 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \ |
442 | $(srcdir)/configure.in | |
a26878d1 | 443 | $(SHELL) ./config.status |