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