]>
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 | ||
c97b9003 DZ |
52 | VERSION=2.1.4 |
53 | ||
fecd2382 | 54 | SHELL = /bin/sh |
1058238c | 55 | |
5ebaf24b | 56 | INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c |
fecd2382 | 57 | INSTALL_PROGRAM = $(INSTALL) |
1058238c | 58 | INSTALL_DATA = $(INSTALL) |
5ebaf24b | 59 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
c97b9003 | 60 | INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1 |
fecd2382 | 61 | |
1058238c RP |
62 | AR = ar |
63 | AR_FLAGS = qv | |
64 | BISON = bison | |
65 | MAKEINFO = makeinfo | |
c97b9003 | 66 | TEXI2DVI = texi2dvi |
fecd2382 | 67 | RANLIB = ranlib |
4b857710 ILT |
68 | CFLAGS = -g |
69 | ||
c97b9003 DZ |
70 | AS_FOR_TARGET = $${here}/as.new |
71 | ||
72 | CC_FOR_TARGET = ` \ | |
73 | if [ -f $${here}/../gcc/Makefile ] ; then \ | |
74 | echo $${here}/../gcc/xgcc -B$${here}/../gcc/; \ | |
75 | else \ | |
76 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
77 | echo $(CC); \ | |
78 | else \ | |
79 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
80 | fi; \ | |
81 | fi` | |
82 | ||
83 | NM_FOR_TARGET = ` \ | |
84 | if [ -f $${here}/../binutils/Makefile ] ; then \ | |
85 | echo $${here}/../binutils/nm ; \ | |
86 | else \ | |
87 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
88 | echo $(NM); \ | |
89 | else \ | |
90 | t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \ | |
91 | fi; \ | |
92 | fi` | |
93 | ||
94 | OBJDUMP=objdump | |
95 | OBJDUMP_FOR_TARGET = ` \ | |
96 | if [ -f $${here}/../binutils/Makefile ] ; then \ | |
97 | echo $${here}/../binutils/objdump ; \ | |
98 | else \ | |
99 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
100 | echo $(OBJDUMP); \ | |
101 | else \ | |
102 | t='$(program_transform_name)'; echo objdump | sed -e '' $$t ; \ | |
103 | fi; \ | |
104 | fi` | |
105 | ||
4b857710 ILT |
106 | FLAGS_TO_PASS = \ |
107 | "prefix=$(prefix)" \ | |
108 | "exec_prefix=$(exec_prefix)" \ | |
109 | "tooldir=$(tooldir)" \ | |
110 | "AR=$(AR)" \ | |
111 | "AR_FLAGS=$(AR_FLAGS)" \ | |
112 | "CC=$(CC)" \ | |
113 | "CFLAGS=$(CFLAGS)" \ | |
114 | "RANLIB=$(RANLIB)" \ | |
115 | "LOADLIBES=$(LOADLIBES)" \ | |
116 | "LDFLAGS=$(LDFLAGS)" \ | |
117 | "BISON=$(BISON)" \ | |
118 | "LEX=$(LEX)" \ | |
119 | "MAKEINFO=$(MAKEINFO)" \ | |
120 | "INSTALL=$(INSTALL)" \ | |
121 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
122 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" | |
fecd2382 | 123 | |
c97b9003 DZ |
124 | CHECKFLAGS= \ |
125 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ | |
126 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
127 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ | |
128 | "OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" | |
129 | ||
fecd2382 RP |
130 | # Lists of files for various purposes. |
131 | ||
132 | REAL_SOURCES = \ | |
133 | $(srcdir)/app.c \ | |
134 | $(srcdir)/as.c \ | |
135 | $(srcdir)/atof-generic.c \ | |
136 | $(srcdir)/bignum-copy.c \ | |
137 | $(srcdir)/cond.c \ | |
138 | $(srcdir)/expr.c \ | |
5d53038b | 139 | $(srcdir)/flonum-konst.c \ |
fecd2382 RP |
140 | $(srcdir)/flonum-copy.c \ |
141 | $(srcdir)/flonum-mult.c \ | |
142 | $(srcdir)/frags.c \ | |
143 | $(srcdir)/hash.c \ | |
144 | $(srcdir)/hex-value.c \ | |
145 | $(srcdir)/input-file.c \ | |
146 | $(srcdir)/input-scrub.c \ | |
147 | $(srcdir)/messages.c \ | |
148 | $(srcdir)/output-file.c \ | |
149 | $(srcdir)/read.c \ | |
fecd2382 RP |
150 | $(srcdir)/subsegs.c \ |
151 | $(srcdir)/symbols.c \ | |
fecd2382 | 152 | $(srcdir)/write.c \ |
3340f7e5 | 153 | $(srcdir)/listing.c \ |
7f2cb270 | 154 | $(srcdir)/xmalloc.c |
fecd2382 RP |
155 | |
156 | # in an expedient order | |
157 | LINKED_SOURCES = \ | |
158 | targ-cpu.c \ | |
159 | obj-format.c \ | |
160 | atof-targ.c | |
161 | ||
162 | SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES) | |
163 | ||
164 | REAL_HEADERS = \ | |
165 | $(srcdir)/as.h \ | |
166 | $(srcdir)/bignum.h \ | |
167 | $(srcdir)/expr.h \ | |
168 | $(srcdir)/flonum.h \ | |
169 | $(srcdir)/frags.h \ | |
170 | $(srcdir)/hash.h \ | |
171 | $(srcdir)/input-file.h \ | |
542e1629 | 172 | $(srcdir)/listing.h \ |
fecd2382 RP |
173 | $(srcdir)/tc.h \ |
174 | $(srcdir)/obj.h \ | |
175 | $(srcdir)/read.h \ | |
fecd2382 RP |
176 | $(srcdir)/struc-symbol.h \ |
177 | $(srcdir)/subsegs.h \ | |
178 | $(srcdir)/symbols.h \ | |
fecd2382 RP |
179 | $(srcdir)/write.h |
180 | ||
181 | LINKED_HEADERS = \ | |
182 | a.out.gnu.h \ | |
183 | a.out.h \ | |
184 | host.h \ | |
185 | targ-env.h \ | |
186 | targ-cpu.h \ | |
187 | obj-format.h \ | |
188 | atof-targ.h | |
189 | ||
190 | HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS) | |
191 | ||
192 | OBJS = \ | |
193 | targ-cpu.o \ | |
194 | obj-format.o \ | |
195 | atof-targ.o \ | |
196 | app.o \ | |
197 | as.o \ | |
198 | atof-generic.o \ | |
199 | bignum-copy.o \ | |
200 | cond.o \ | |
201 | expr.o \ | |
5d53038b | 202 | flonum-konst.o \ |
fecd2382 RP |
203 | flonum-copy.o \ |
204 | flonum-mult.o \ | |
205 | frags.o \ | |
206 | hash.o \ | |
207 | hex-value.o \ | |
208 | input-file.o \ | |
209 | input-scrub.o \ | |
210 | messages.o \ | |
211 | output-file.o \ | |
212 | read.o \ | |
fecd2382 RP |
213 | subsegs.o \ |
214 | symbols.o \ | |
fecd2382 | 215 | write.o \ |
3340f7e5 | 216 | listing.o \ |
7f2cb270 | 217 | xmalloc.o |
fecd2382 | 218 | |
f6b67e4c RP |
219 | #### host, target, and site specific Makefile frags come in here. |
220 | ||
542e1629 | 221 | all: as.new |
4b857710 | 222 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) |
79a54a5b | 223 | |
c97b9003 DZ |
224 | dvi info: |
225 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@) | |
79a54a5b | 226 | |
81f73963 | 227 | install-info: |
4b857710 | 228 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info) |
79a54a5b RP |
229 | |
230 | clean-info: | |
4b857710 | 231 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info) |
fecd2382 | 232 | |
fecd2382 RP |
233 | # Now figure out from those variables how to compile and link. |
234 | ||
235 | # This is the variable actually used when we compile. | |
fc00f451 KR |
236 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) \ |
237 | $(BFDDEF) | |
fecd2382 | 238 | |
fecd2382 RP |
239 | # How to link with both our special library facilities |
240 | # and the system's installed libraries. | |
f6b67e4c | 241 | |
fc00f451 KR |
242 | LIBS = ../opcodes/libopcodes.a $(BFDLIB) $(LOCAL_LOADLIBES) \ |
243 | ../libiberty/libiberty.a | |
fecd2382 RP |
244 | |
245 | # Specify the directories to be searched for header files. | |
246 | # Both . and srcdir are used, in that order, | |
247 | # so that tm.h and config.h will be found in the compilation | |
248 | # subdirectory rather than in the source directory. | |
50fccebe | 249 | INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include |
1058238c | 250 | SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config |
fecd2382 RP |
251 | |
252 | # Always use -I$(srcdir)/config when compiling. | |
253 | .c.o: | |
254 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $< | |
255 | ||
256 | # This tells GNU make version 3 not to export all the variables | |
257 | # defined in this file into the environment. | |
258 | .NOEXPORT: | |
542e1629 | 259 | |
fecd2382 | 260 | # Files to be copied away after each stage in building. |
da0b2bff | 261 | STAGESTUFF = *.o as.new |
fecd2382 | 262 | |
7f2cb270 | 263 | as.new: $(OBJS) $(LIBS) |
da0b2bff | 264 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) |
fecd2382 | 265 | |
c97b9003 DZ |
266 | installcheck: |
267 | @echo No installcheck target is available yet for the GNU assembler. | |
268 | ||
269 | check: as.new | |
270 | @(here=`pwd` ; export here ; \ | |
271 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check) | |
787c6bfe | 272 | |
fecd2382 RP |
273 | config.status: |
274 | @echo You must configure gas. Look at the INSTALL file for details. | |
275 | @false | |
276 | ||
fc00f451 KR |
277 | config.h: config-stamp ; @true |
278 | config-stamp: Makefile | |
279 | -rm -f config.new config-stamp | |
280 | echo '#define TARGET_CPU "$(target_cpu)"' > config.new | |
281 | echo '#define TARGET_ALIAS "$(target_alias)"' >> config.new | |
282 | echo '#define TARGET_CANONICAL "$(target_canonical)"' >> config.new | |
c97b9003 | 283 | echo '#define GAS_VERSION "$(VERSION)"' >> config.new |
fc00f451 KR |
284 | $(srcdir)/../move-if-change config.new config.h |
285 | touch config-stamp | |
286 | ||
fecd2382 RP |
287 | # Compiling object files from source files. |
288 | ||
fecd2382 | 289 | app.o : app.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 290 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
291 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
292 | as.o : as.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 293 | targ-cpu.h struc-symbol.h \ |
7f2cb270 | 294 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \ |
fc00f451 | 295 | tc.h obj.h config.h |
fecd2382 | 296 | atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 297 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
298 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
299 | bignum-copy.o : bignum-copy.c as.h host.h \ | |
300 | targ-env.h obj-format.h \ | |
d1a9e594 | 301 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
302 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
303 | cond.o : cond.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 304 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
305 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
306 | ||
fecd2382 | 307 | debug.o : debug.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 308 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
309 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
310 | subsegs.h | |
311 | expr.o : expr.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 312 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
313 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
314 | ||
5d53038b | 315 | flonum-konst.o : flonum-konst.c flonum.h bignum.h |
fecd2382 | 316 | flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 317 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
318 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
319 | flonum-mult.o : flonum-mult.c flonum.h bignum.h | |
320 | frags.o : frags.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 321 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 322 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 323 | subsegs.h |
fecd2382 | 324 | hash.o : hash.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 325 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
326 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
327 | hex-value.o : hex-value.c | |
328 | input-file.o : input-file.c as.h host.h \ | |
329 | targ-env.h obj-format.h targ-cpu.h \ | |
d1a9e594 | 330 | struc-symbol.h write.h flonum.h bignum.h expr.h \ |
fecd2382 RP |
331 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h |
332 | input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \ | |
333 | as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 334 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
335 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
336 | input-file.h | |
3340f7e5 RP |
337 | listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \ |
338 | listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \ | |
339 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h | |
fecd2382 | 340 | messages.o : messages.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 341 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 342 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
fecd2382 | 343 | output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 344 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
345 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
346 | output-file.h | |
347 | read.o : read.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 348 | targ-cpu.h struc-symbol.h \ |
da7aaffb | 349 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
fecd2382 | 350 | subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 351 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 352 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 353 | subsegs.h |
fecd2382 | 354 | symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 355 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 356 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 357 | subsegs.h |
fecd2382 | 358 | write.o : write.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 359 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 360 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 361 | subsegs.h output-file.h |
fecd2382 | 362 | xmalloc.o : xmalloc.c |
fecd2382 | 363 | atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 364 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
365 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
366 | symbols.h tc.h obj.h | |
367 | obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 368 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 369 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
7f2cb270 | 370 | subsegs.h symbols.h tc.h obj.h |
69498fa2 | 371 | targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \ |
d1a9e594 | 372 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 373 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
da0b2bff | 374 | symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS) |
d1a9e594 | 375 | |
fecd2382 RP |
376 | # Remake the info files. |
377 | ||
921faa52 | 378 | doc: $(srcdir)/as.info |
fecd2382 | 379 | |
921faa52 | 380 | $(srcdir)/as.info: $(srcdir)/doc/as.texinfo |
c97b9003 | 381 | @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) |
fecd2382 | 382 | |
fecd2382 | 383 | clean: |
4b857710 | 384 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean) |
c97b9003 | 385 | @(cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean) |
542e1629 | 386 | -rm -f $(STAGESTUFF) core |
fecd2382 RP |
387 | |
388 | # Like clean but also delete the links made to configure gas. | |
542e1629 RP |
389 | distclean: clean |
390 | -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \ | |
c97b9003 | 391 | targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS |
542e1629 | 392 | |
fecd2382 RP |
393 | # Entry points `install', `includes' and `uninstall'. |
394 | ||
395 | # Copy the files into directories where they will be run. | |
542e1629 | 396 | install: |
c97b9003 DZ |
397 | $(INSTALL_XFORM) as.new $(bindir)/as; \ |
398 | $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; | |
7e10f53c | 399 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
efbfb612 ILT |
400 | if [ -d $(tooldir) ]; then \ |
401 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
402 | rm -f $(tooldir)/bin/as; \ | |
403 | ln $(bindir)/$$n $(tooldir)/bin/as \ | |
404 | || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \ | |
405 | else true; fi | |
fecd2382 | 406 | |
fecd2382 RP |
407 | # Cancel installation by deleting the installed files. |
408 | uninstall: | |
7e10f53c ILT |
409 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
410 | rm -f $(bindir)/$$n; \ | |
411 | rm -f $(mandir)/$$n.1 | |
542e1629 | 412 | |
fecd2382 RP |
413 | # These exist for maintenance purposes. |
414 | ||
415 | tags TAGS: force | |
787c6bfe | 416 | etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in |
fecd2382 | 417 | |
542e1629 | 418 | bootstrap: as.new force |
fecd2382 | 419 | $(MAKE) stage1 |
542e1629 | 420 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 421 | $(MAKE) stage2 |
542e1629 | 422 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 423 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
424 | |
425 | bootstrap2: force | |
542e1629 | 426 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 427 | $(MAKE) stage2 |
542e1629 | 428 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
da0b2bff | 429 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
430 | |
431 | bootstrap3: force | |
542e1629 | 432 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 433 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
434 | |
435 | # Copy the object files from a particular stage into a subdirectory. | |
436 | stage1: force | |
437 | -mkdir stage1 | |
438 | -mv $(STAGESTUFF) stage1 | |
81f73963 | 439 | if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi |
fecd2382 RP |
440 | |
441 | stage2: force | |
442 | -mkdir stage2 | |
443 | -mv $(STAGESTUFF) stage2 | |
81f73963 | 444 | if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi |
fecd2382 RP |
445 | |
446 | stage3: force | |
447 | -mkdir stage3 | |
6a3958b2 | 448 | -mv $(STAGESTUFF) stage3 |
81f73963 | 449 | if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi |
fecd2382 | 450 | |
a01bf1fb RP |
451 | against=stage2 |
452 | ||
453 | comparison: force | |
454 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
455 | ||
6a3958b2 | 456 | de-stage1: force |
da0b2bff | 457 | - (cd stage1 ; rm as ; mv -f * ..) |
6a3958b2 RP |
458 | - rmdir stage1 |
459 | ||
460 | de-stage2: force | |
da0b2bff | 461 | - (cd stage2 ; rm as ; mv -f * ..) |
6a3958b2 RP |
462 | - rmdir stage2 |
463 | ||
464 | de-stage3: force | |
da0b2bff | 465 | - (cd stage3 ; rm as ; mv -f * ..) |
6a3958b2 | 466 | - rmdir stage3 |
fecd2382 | 467 | |
fecd2382 RP |
468 | #In GNU Make, ignore whether `stage*' exists. |
469 | .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap | |
fecd2382 RP |
470 | |
471 | force: | |
472 | ||
fc00f451 KR |
473 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \ |
474 | $(srcdir)/configure.in | |
a26878d1 | 475 | $(SHELL) ./config.status |