Commit | Line | Data |
---|---|---|
28d3e4a3 | 1 | ## @configure_input@ |
fecd2382 | 2 | # Makefile for GNU Assembler |
7420b02b | 3 | # Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc. |
fecd2382 | 4 | |
7420b02b | 5 | # This file is part of GNU GAS. |
fecd2382 | 6 | |
7420b02b JL |
7 | # GNU GAS is free software; you can redistribute it and/or modify |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation; either version 2, or (at your option) | |
10 | # any later version. | |
fecd2382 | 11 | |
7420b02b JL |
12 | # GNU GAS is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
fecd2382 | 16 | |
7420b02b JL |
17 | # You should have received a copy of the GNU General Public License |
18 | # along with GNU GAS; see the file COPYING. If not, write to | |
19 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
fecd2382 | 20 | |
fecd2382 RP |
21 | # The targets for external use include: |
22 | # all, doc, proto, install, uninstall, includes, TAGS, | |
daa7e184 | 23 | # clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4. |
fecd2382 RP |
24 | |
25 | # Variables that exist for you to override. | |
26 | # See below for how to change them for certain systems. | |
27 | ||
b11fb939 KR |
28 | VPATH = @srcdir@ |
29 | srcdir = @srcdir@ | |
7420b02b | 30 | srcroot = $(srcdir)/.. |
1058238c | 31 | |
fa156ffe | 32 | target_alias = @target_alias@ |
1bc37618 | 33 | prefix = @prefix@ |
1058238c | 34 | |
fa156ffe | 35 | program_transform_name = @program_transform_name@ |
1bc37618 | 36 | exec_prefix = @exec_prefix@ |
787c6bfe RP |
37 | bindir = $(exec_prefix)/bin |
38 | libdir = $(exec_prefix)/lib | |
b63defaa | 39 | tooldir = $(exec_prefix)/$(target_alias) |
787c6bfe | 40 | |
1058238c | 41 | datadir = $(prefix)/lib |
787c6bfe | 42 | mandir = $(prefix)/man |
1058238c RP |
43 | man1dir = $(mandir)/man1 |
44 | man2dir = $(mandir)/man2 | |
45 | man3dir = $(mandir)/man3 | |
46 | man4dir = $(mandir)/man4 | |
47 | man5dir = $(mandir)/man5 | |
48 | man6dir = $(mandir)/man6 | |
49 | man7dir = $(mandir)/man7 | |
50 | man8dir = $(mandir)/man8 | |
51 | man9dir = $(mandir)/man9 | |
787c6bfe | 52 | infodir = $(prefix)/info |
1058238c RP |
53 | includedir = $(prefix)/include |
54 | docdir = $(datadir)/doc | |
55 | ||
aa30c7ee | 56 | VERSION=cygnus-2.5.3 |
c97b9003 | 57 | |
fecd2382 | 58 | SHELL = /bin/sh |
1058238c | 59 | |
7420b02b | 60 | INSTALL = $${srcroot}/install.sh -c |
fecd2382 | 61 | INSTALL_PROGRAM = $(INSTALL) |
1058238c | 62 | INSTALL_DATA = $(INSTALL) |
aa30c7ee | 63 | INSTALL_XFORM = $(INSTALL) -t='-e $(program_transform_name)' |
c97b9003 | 64 | INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1 |
fecd2382 | 65 | |
6d60424f KR |
66 | DISTSTUFF= make-gas.com |
67 | ||
1058238c RP |
68 | AR = ar |
69 | AR_FLAGS = qv | |
f2889110 | 70 | BISON = bison -y |
1058238c | 71 | MAKEINFO = makeinfo |
c97b9003 | 72 | TEXI2DVI = texi2dvi |
fecd2382 | 73 | RANLIB = ranlib |
b11fb939 | 74 | CC = @CC@ |
4b857710 ILT |
75 | CFLAGS = -g |
76 | ||
7420b02b JL |
77 | MAKEOVERRIDES= |
78 | ||
4b857710 ILT |
79 | FLAGS_TO_PASS = \ |
80 | "prefix=$(prefix)" \ | |
81 | "exec_prefix=$(exec_prefix)" \ | |
82 | "tooldir=$(tooldir)" \ | |
83 | "AR=$(AR)" \ | |
84 | "AR_FLAGS=$(AR_FLAGS)" \ | |
85 | "CC=$(CC)" \ | |
86 | "CFLAGS=$(CFLAGS)" \ | |
87 | "RANLIB=$(RANLIB)" \ | |
88 | "LOADLIBES=$(LOADLIBES)" \ | |
89 | "LDFLAGS=$(LDFLAGS)" \ | |
90 | "BISON=$(BISON)" \ | |
91 | "LEX=$(LEX)" \ | |
92 | "MAKEINFO=$(MAKEINFO)" \ | |
93 | "INSTALL=$(INSTALL)" \ | |
94 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
95 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" | |
fecd2382 | 96 | |
833c46e1 KR |
97 | RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \ |
98 | echo ${srcdir}/../dejagnu/runtest ; else echo runtest; \ | |
99 | fi` | |
100 | RUNTESTFLAGS= | |
c97b9003 | 101 | CHECKFLAGS= \ |
03372cf4 | 102 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
5a051773 | 103 | "RUNTEST=$(RUNTEST)" |
c97b9003 | 104 | |
fecd2382 RP |
105 | # Lists of files for various purposes. |
106 | ||
107 | REAL_SOURCES = \ | |
108 | $(srcdir)/app.c \ | |
109 | $(srcdir)/as.c \ | |
110 | $(srcdir)/atof-generic.c \ | |
111 | $(srcdir)/bignum-copy.c \ | |
112 | $(srcdir)/cond.c \ | |
113 | $(srcdir)/expr.c \ | |
5d53038b | 114 | $(srcdir)/flonum-konst.c \ |
fecd2382 RP |
115 | $(srcdir)/flonum-copy.c \ |
116 | $(srcdir)/flonum-mult.c \ | |
117 | $(srcdir)/frags.c \ | |
118 | $(srcdir)/hash.c \ | |
fecd2382 RP |
119 | $(srcdir)/input-file.c \ |
120 | $(srcdir)/input-scrub.c \ | |
dffc8b9e | 121 | $(srcdir)/literal.c \ |
fecd2382 RP |
122 | $(srcdir)/messages.c \ |
123 | $(srcdir)/output-file.c \ | |
124 | $(srcdir)/read.c \ | |
fecd2382 RP |
125 | $(srcdir)/subsegs.c \ |
126 | $(srcdir)/symbols.c \ | |
fecd2382 | 127 | $(srcdir)/write.c \ |
3340f7e5 | 128 | $(srcdir)/listing.c \ |
9cc8106c | 129 | $(srcdir)/ecoff.c \ |
b63defaa | 130 | $(srcdir)/stabs.c |
fecd2382 RP |
131 | |
132 | # in an expedient order | |
133 | LINKED_SOURCES = \ | |
134 | targ-cpu.c \ | |
135 | obj-format.c \ | |
136 | atof-targ.c | |
137 | ||
138 | SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES) | |
139 | ||
140 | REAL_HEADERS = \ | |
141 | $(srcdir)/as.h \ | |
142 | $(srcdir)/bignum.h \ | |
143 | $(srcdir)/expr.h \ | |
144 | $(srcdir)/flonum.h \ | |
145 | $(srcdir)/frags.h \ | |
146 | $(srcdir)/hash.h \ | |
147 | $(srcdir)/input-file.h \ | |
542e1629 | 148 | $(srcdir)/listing.h \ |
fecd2382 RP |
149 | $(srcdir)/tc.h \ |
150 | $(srcdir)/obj.h \ | |
151 | $(srcdir)/read.h \ | |
fecd2382 RP |
152 | $(srcdir)/struc-symbol.h \ |
153 | $(srcdir)/subsegs.h \ | |
154 | $(srcdir)/symbols.h \ | |
9cc8106c ILT |
155 | $(srcdir)/write.h \ |
156 | $(srcdir)/ecoff.h | |
fecd2382 RP |
157 | |
158 | LINKED_HEADERS = \ | |
fecd2382 RP |
159 | targ-env.h \ |
160 | targ-cpu.h \ | |
161 | obj-format.h \ | |
162 | atof-targ.h | |
163 | ||
164 | HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS) | |
165 | ||
b11fb939 | 166 | # @target_frag@ |
b3cd8555 | 167 | |
fecd2382 RP |
168 | OBJS = \ |
169 | targ-cpu.o \ | |
170 | obj-format.o \ | |
171 | atof-targ.o \ | |
172 | app.o \ | |
173 | as.o \ | |
174 | atof-generic.o \ | |
175 | bignum-copy.o \ | |
176 | cond.o \ | |
177 | expr.o \ | |
5d53038b | 178 | flonum-konst.o \ |
fecd2382 RP |
179 | flonum-copy.o \ |
180 | flonum-mult.o \ | |
181 | frags.o \ | |
182 | hash.o \ | |
fecd2382 RP |
183 | input-file.o \ |
184 | input-scrub.o \ | |
dffc8b9e | 185 | literal.o \ |
fecd2382 RP |
186 | messages.o \ |
187 | output-file.o \ | |
188 | read.o \ | |
fecd2382 RP |
189 | subsegs.o \ |
190 | symbols.o \ | |
fecd2382 | 191 | write.o \ |
3340f7e5 | 192 | listing.o \ |
9cc8106c | 193 | ecoff.o \ |
c751ad19 | 194 | stabs.o \ |
b3cd8555 | 195 | $(TE_OBJS) |
f6b67e4c | 196 | |
c92d9ee9 KR |
197 | # These are objects we know we'll be pulling in from other directories. |
198 | # For VMS, we have to build them explicitly. | |
199 | VMS_OTHER_OBJS = \ | |
b63defaa KR |
200 | ../libiberty/xmalloc.o \ |
201 | ../libiberty/xexit.o \ | |
c92d9ee9 KR |
202 | ../libiberty/obstack.o \ |
203 | ../libiberty/strdup.o \ | |
204 | ../libiberty/strncasecmp.o \ | |
b21e6e53 KR |
205 | ../libiberty/concat.o \ |
206 | ../libiberty/getopt.o \ | |
207 | ../libiberty/getopt1.o \ | |
833c46e1 KR |
208 | ../libiberty/getruntime.o \ |
209 | ../libiberty/hex.o | |
c92d9ee9 | 210 | |
1df6e266 | 211 | all: .gdbinit as.new gasp.new |
7420b02b JL |
212 | @srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
213 | (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) | |
79a54a5b | 214 | |
7420b02b JL |
215 | dvi info install-info clean-info: |
216 | @srcroot=`cd $(srcroot); pwd`; export srcroot; \ | |
217 | (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@) | |
fecd2382 | 218 | |
c20c7506 JL |
219 | make-gas.com: stamp-mk.com |
220 | stamp-mk.com: vmsconf.sh Makefile | |
c92d9ee9 | 221 | sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com |
c20c7506 JL |
222 | $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com |
223 | touch stamp-mk.com | |
224 | ||
fecd2382 RP |
225 | # Now figure out from those variables how to compile and link. |
226 | ||
227 | # This is the variable actually used when we compile. | |
420065a5 | 228 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) |
fecd2382 | 229 | |
fecd2382 RP |
230 | # How to link with both our special library facilities |
231 | # and the system's installed libraries. | |
f6b67e4c | 232 | |
b11fb939 | 233 | LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a |
fecd2382 RP |
234 | |
235 | # Specify the directories to be searched for header files. | |
236 | # Both . and srcdir are used, in that order, | |
237 | # so that tm.h and config.h will be found in the compilation | |
238 | # subdirectory rather than in the source directory. | |
c7072f56 | 239 | INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. |
fecd2382 RP |
240 | |
241 | # Always use -I$(srcdir)/config when compiling. | |
242 | .c.o: | |
243 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $< | |
244 | ||
245 | # This tells GNU make version 3 not to export all the variables | |
246 | # defined in this file into the environment. | |
247 | .NOEXPORT: | |
542e1629 | 248 | |
fecd2382 | 249 | # Files to be copied away after each stage in building. |
c20c7506 | 250 | STAGESTUFF = *.o as.new gasp.new |
fecd2382 | 251 | |
b11fb939 | 252 | $(OBJS): @ALL_OBJ_DEPS@ |
c92d9ee9 | 253 | |
7f2cb270 | 254 | as.new: $(OBJS) $(LIBS) |
da0b2bff | 255 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) |
fecd2382 | 256 | |
84951544 KR |
257 | $(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \ |
258 | struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \ | |
259 | listing.h bignum.h | |
b11fb939 | 260 | |
a5a4b5ac SC |
261 | gasp.new: gasp.o |
262 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new gasp.o $(LIBS) $(LOADLIBES) | |
263 | ||
c97b9003 DZ |
264 | installcheck: |
265 | @echo No installcheck target is available yet for the GNU assembler. | |
266 | ||
0b3d0999 | 267 | check: |
c97b9003 DZ |
268 | @(here=`pwd` ; export here ; \ |
269 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check) | |
787c6bfe | 270 | |
b11fb939 KR |
271 | config.status: configure |
272 | if [ -r config.status ]; then \ | |
1be01033 | 273 | sh ./config.status --recheck ; \ |
b11fb939 KR |
274 | else \ |
275 | echo You must configure gas. Look at the INSTALL file for details. ; \ | |
276 | exit 1 ; \ | |
277 | fi | |
278 | ||
fc00f451 | 279 | config.h: config-stamp ; @true |
b11fb939 | 280 | config-stamp: Makefile conf |
fc00f451 | 281 | -rm -f config.new config-stamp |
1e84ff7e KR |
282 | echo '/* config.h. Generated automatically by make. */' > config.new |
283 | echo '#ifndef GAS_VERSION' >> config.new | |
b11fb939 KR |
284 | echo '#define GAS_VERSION "$(VERSION)"' >> config.new |
285 | echo '' >> config.new | |
286 | cat conf >> config.new | |
287 | echo '#endif /* GAS_VERSION */' >> config.new | |
fc00f451 KR |
288 | $(srcdir)/../move-if-change config.new config.h |
289 | touch config-stamp | |
290 | ||
fecd2382 RP |
291 | # Compiling object files from source files. |
292 | ||
833c46e1 KR |
293 | TARG_CPU_DEP_a29k = |
294 | TARG_CPU_DEP_alpha = | |
295 | # start-sanitize-arc | |
296 | TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h | |
297 | # end-sanitize-arc | |
298 | TARG_CPU_DEP_arm = | |
299 | TARG_CPU_DEP_generic = | |
300 | TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h | |
301 | TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h | |
302 | TARG_CPU_DEP_hppa = | |
303 | TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h | |
304 | TARG_CPU_DEP_i860 = | |
305 | TARG_CPU_DEP_i960 = | |
306 | TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h | |
307 | TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h | |
308 | TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h | |
309 | TARG_CPU_DEP_ns32k = | |
310 | TARG_CPU_DEP_ppc = | |
311 | # start-sanitize-rce | |
312 | TARG_CPU_DEP_rce = $(srcdir)/../opcodes/rce-opc.h | |
313 | # end-sanitize-rce | |
314 | TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h | |
315 | TARG_CPU_DEP_sparc = | |
316 | TARG_CPU_DEP_tahoe = | |
317 | TARG_CPU_DEP_vax = | |
318 | TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h | |
319 | TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h | |
320 | ||
620a590e | 321 | gasp.o : gasp.c config.h |
84951544 KR |
322 | app.o : app.c write.h |
323 | as.o : as.c output-file.h write.h subsegs.h | |
324 | atof-generic.o : atof-generic.c | |
325 | bignum-copy.o : bignum-copy.c | |
326 | cond.o : cond.c | |
327 | debug.o : debug.c subsegs.h | |
328 | expr.o : expr.c | |
329 | flonum-konst.o : flonum-konst.c | |
330 | flonum-copy.o : flonum-copy.c | |
331 | flonum-mult.o : flonum-mult.c | |
332 | frags.o : frags.c subsegs.h | |
333 | hash.o : hash.c | |
84951544 KR |
334 | input-file.o : input-file.c input-file.h |
335 | input-scrub.o : input-scrub.c input-file.h | |
336 | listing.o : listing.c input-file.h subsegs.h | |
337 | literal.o : literal.c subsegs.h | |
338 | messages.o : messages.c | |
339 | output-file.o : output-file.c output-file.h | |
340 | read.o : read.c | |
341 | subsegs.o : subsegs.c subsegs.h | |
342 | symbols.o : symbols.c subsegs.h | |
343 | write.o : write.c subsegs.h output-file.h | |
344 | ecoff.o : ecoff.c ecoff.h \ | |
345 | $(srcdir)/../include/coff/internal.h $(srcdir)/../include/coff/sym.h \ | |
346 | $(srcdir)/../include/coff/ecoff.h \ | |
347 | $(srcdir)/../include/coff/symconst.h \ | |
348 | $(srcdir)/../include/aout/stab_gnu.h | |
349 | stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h | |
350 | atof-targ.o : atof-targ.c | |
351 | obj-format.o : obj-format.c | |
833c46e1 | 352 | targ-cpu.o : targ-cpu.c $(TARG_CPU_DEP_@cpu_type@) |
d1a9e594 | 353 | |
fecd2382 RP |
354 | # Remake the info files. |
355 | ||
921faa52 | 356 | doc: $(srcdir)/as.info |
fecd2382 | 357 | |
921faa52 | 358 | $(srcdir)/as.info: $(srcdir)/doc/as.texinfo |
c97b9003 | 359 | @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) |
fecd2382 | 360 | |
6d60424f | 361 | diststuff: $(DISTSTUFF) |
367d6244 | 362 | |
7420b02b | 363 | clean-here: |
f2889110 | 364 | -rm -f $(STAGESTUFF) core stamp-mk.com |
fecd2382 | 365 | |
daa7e184 ILT |
366 | clean mostlyclean: clean-here |
367 | @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@ | |
7420b02b | 368 | @if [ -d testsuite ] ; then \ |
daa7e184 | 369 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \ |
7420b02b JL |
370 | else true; fi |
371 | ||
fecd2382 | 372 | # Like clean but also delete the links made to configure gas. |
367d6244 | 373 | distclean: clean-here |
daa7e184 | 374 | @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@ |
7420b02b | 375 | @if [ -d testsuite ] ; then \ |
daa7e184 | 376 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \ |
7420b02b | 377 | else true; fi |
b11fb939 | 378 | -rm -f config.status Makefile targ-env.h targ-cpu.h \ |
7420b02b | 379 | targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \ |
f2889110 | 380 | config-stamp config.h conf config.log config.cache .gdbinit |
367d6244 | 381 | realclean: clean distclean |
6d60424f | 382 | -rm -rf $(DISTSTUFF) |
542e1629 | 383 | |
fecd2382 RP |
384 | # Entry points `install', `includes' and `uninstall'. |
385 | ||
386 | # Copy the files into directories where they will be run. | |
542e1629 | 387 | install: |
7420b02b | 388 | srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
c97b9003 | 389 | $(INSTALL_XFORM) as.new $(bindir)/as; \ |
7420b02b | 390 | $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \ |
28d3e4a3 | 391 | n=`echo as | sed '$(program_transform_name)'`; \ |
efbfb612 ILT |
392 | if [ -d $(tooldir) ]; then \ |
393 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
394 | rm -f $(tooldir)/bin/as; \ | |
ac7f7dfe | 395 | ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \ |
efbfb612 ILT |
396 | || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \ |
397 | else true; fi | |
a5a4b5ac SC |
398 | srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
399 | $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \ | |
28d3e4a3 | 400 | n=`echo gasp | sed '$(program_transform_name)' `; \ |
a5a4b5ac SC |
401 | if [ -d $(tooldir) ]; then \ |
402 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
403 | rm -f $(tooldir)/bin/gasp; \ | |
ac7f7dfe ILT |
404 | ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \ |
405 | || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \ | |
a5a4b5ac | 406 | else true; fi |
fecd2382 | 407 | |
fecd2382 RP |
408 | # Cancel installation by deleting the installed files. |
409 | uninstall: | |
fa156ffe | 410 | -n=`t='$(program_transform_name)'; echo as | sed $$t`; \ |
7e10f53c ILT |
411 | rm -f $(bindir)/$$n; \ |
412 | rm -f $(mandir)/$$n.1 | |
fa156ffe | 413 | -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \ |
a5a4b5ac | 414 | rm -f $(bindir)/$$n; \ |
542e1629 | 415 | |
fecd2382 RP |
416 | # These exist for maintenance purposes. |
417 | ||
418 | tags TAGS: force | |
787c6bfe | 419 | etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in |
ac7f7dfe | 420 | |
542e1629 | 421 | bootstrap: as.new force |
fecd2382 | 422 | $(MAKE) stage1 |
3256c4b5 KR |
423 | rm -f stage && ln -s stage1 stage |
424 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new | |
fecd2382 | 425 | $(MAKE) stage2 |
3256c4b5 KR |
426 | rm -f stage && ln -s stage2 stage |
427 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new | |
a01bf1fb | 428 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
429 | |
430 | bootstrap2: force | |
3256c4b5 KR |
431 | rm -f stage && ln -s stage1 stage |
432 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new | |
fecd2382 | 433 | $(MAKE) stage2 |
3256c4b5 KR |
434 | rm -f stage && ln -s stage2 stage |
435 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new | |
da0b2bff | 436 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
437 | |
438 | bootstrap3: force | |
3256c4b5 KR |
439 | rm -f stage && ln -s stage2 stage |
440 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new | |
a01bf1fb | 441 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
442 | |
443 | # Copy the object files from a particular stage into a subdirectory. | |
444 | stage1: force | |
445 | -mkdir stage1 | |
446 | -mv $(STAGESTUFF) stage1 | |
81f73963 | 447 | if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi |
fecd2382 RP |
448 | |
449 | stage2: force | |
450 | -mkdir stage2 | |
451 | -mv $(STAGESTUFF) stage2 | |
81f73963 | 452 | if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi |
fecd2382 RP |
453 | |
454 | stage3: force | |
455 | -mkdir stage3 | |
6a3958b2 | 456 | -mv $(STAGESTUFF) stage3 |
81f73963 | 457 | if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi |
fecd2382 | 458 | |
a01bf1fb RP |
459 | against=stage2 |
460 | ||
f2889110 KR |
461 | # This rule is derived from corresponding code in the Makefile.in for gcc. |
462 | # The "tail +16c" is to bypass headers which may include timestamps or | |
463 | # temporary assembly file names. | |
a01bf1fb | 464 | comparison: force |
f2889110 KR |
465 | x=0 ; \ |
466 | for file in $(STAGESTUFF) ; do \ | |
467 | tail +16c ./$$file > tmp-foo1; \ | |
468 | if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \ | |
469 | if cmp tmp-foo1 tmp-foo2 ; then \ | |
470 | true ; \ | |
471 | else \ | |
472 | echo $$file differs ; \ | |
473 | x=1 ; \ | |
474 | fi ; \ | |
475 | else true; fi ; \ | |
476 | done ; \ | |
477 | exit $$x | |
478 | -rm -f tmp-foo* | |
a01bf1fb | 479 | |
6a3958b2 | 480 | de-stage1: force |
b3cd8555 | 481 | - (cd stage1 ; rm -f as ; mv -f * ..) |
6a3958b2 RP |
482 | - rmdir stage1 |
483 | ||
484 | de-stage2: force | |
b3cd8555 | 485 | - (cd stage2 ; rm -f as ; mv -f * ..) |
6a3958b2 RP |
486 | - rmdir stage2 |
487 | ||
488 | de-stage3: force | |
b3cd8555 | 489 | - (cd stage3 ; rm -f as ; mv -f * ..) |
6a3958b2 | 490 | - rmdir stage3 |
fecd2382 | 491 | |
fecd2382 | 492 | #In GNU Make, ignore whether `stage*' exists. |
daa7e184 ILT |
493 | .PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean |
494 | .PHONY: TAGS bootstrap | |
fecd2382 RP |
495 | |
496 | force: | |
497 | ||
fc00f451 | 498 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \ |
1be01033 | 499 | $(srcdir)/configure.in config.status |
a26878d1 | 500 | $(SHELL) ./config.status |
1df6e266 KR |
501 | .gdbinit: $(srcdir)/gdbinit.in config.status |
502 | $(SHELL) ./config.status |