* config/tc-h8500.c (md_begin): Use a local variable when
[deliverable/binutils-gdb.git] / gas / Makefile.in
1 # Makefile for GNU Assembler
2 # Copyright (C) 1987-1992 Free Software Foundation, Inc.
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
8 #the Free Software Foundation; either version 2, or (at your option)
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
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
27 srcdir = .
28
29 prefix = /usr/local
30
31 program_transform_name =
32 exec_prefix = $(prefix)
33 bindir = $(exec_prefix)/bin
34 libdir = $(exec_prefix)/lib
35 tooldir = $(libdir)/$(target_alias)
36
37 datadir = $(prefix)/lib
38 mandir = $(prefix)/man
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
48 infodir = $(prefix)/info
49 includedir = $(prefix)/include
50 docdir = $(datadir)/doc
51
52 VERSION=2.1.4
53
54 SHELL = /bin/sh
55
56 INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
57 INSTALL_PROGRAM = $(INSTALL)
58 INSTALL_DATA = $(INSTALL)
59 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
60 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
61
62 AR = ar
63 AR_FLAGS = qv
64 BISON = bison
65 MAKEINFO = makeinfo
66 TEXI2DVI = texi2dvi
67 RANLIB = ranlib
68 CFLAGS = -g
69
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
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)"
123
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
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 \
139 $(srcdir)/flonum-konst.c \
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 \
150 $(srcdir)/subsegs.c \
151 $(srcdir)/symbols.c \
152 $(srcdir)/write.c \
153 $(srcdir)/listing.c \
154 $(srcdir)/xmalloc.c
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 \
172 $(srcdir)/listing.h \
173 $(srcdir)/tc.h \
174 $(srcdir)/obj.h \
175 $(srcdir)/read.h \
176 $(srcdir)/struc-symbol.h \
177 $(srcdir)/subsegs.h \
178 $(srcdir)/symbols.h \
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 \
202 flonum-konst.o \
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 \
213 subsegs.o \
214 symbols.o \
215 write.o \
216 listing.o \
217 xmalloc.o
218
219 #### host, target, and site specific Makefile frags come in here.
220
221 all: as.new
222 @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
223
224 dvi info:
225 @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
226
227 install-info:
228 @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info)
229
230 clean-info:
231 @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info)
232
233 # Now figure out from those variables how to compile and link.
234
235 # This is the variable actually used when we compile.
236 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) \
237 $(BFDDEF)
238
239 # How to link with both our special library facilities
240 # and the system's installed libraries.
241
242 LIBS = ../opcodes/libopcodes.a $(BFDLIB) $(LOCAL_LOADLIBES) \
243 ../libiberty/libiberty.a
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.
249 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include
250 SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
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:
259
260 # Files to be copied away after each stage in building.
261 STAGESTUFF = *.o as.new
262
263 as.new: $(OBJS) $(LIBS)
264 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
265
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)
272
273 config.status:
274 @echo You must configure gas. Look at the INSTALL file for details.
275 @false
276
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
283 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
284 $(srcdir)/../move-if-change config.new config.h
285 touch config-stamp
286
287 # Compiling object files from source files.
288
289 app.o : app.c as.h host.h targ-env.h obj-format.h \
290 targ-cpu.h struc-symbol.h \
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 \
293 targ-cpu.h struc-symbol.h \
294 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \
295 tc.h obj.h config.h
296 atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \
297 targ-cpu.h struc-symbol.h \
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 \
301 targ-cpu.h struc-symbol.h \
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 \
304 targ-cpu.h struc-symbol.h \
305 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
306
307 debug.o : debug.c as.h host.h targ-env.h obj-format.h \
308 targ-cpu.h struc-symbol.h \
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 \
312 targ-cpu.h struc-symbol.h \
313 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
314
315 flonum-konst.o : flonum-konst.c flonum.h bignum.h
316 flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \
317 targ-cpu.h struc-symbol.h \
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 \
321 targ-cpu.h struc-symbol.h \
322 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
323 subsegs.h
324 hash.o : hash.c as.h host.h targ-env.h obj-format.h \
325 targ-cpu.h struc-symbol.h \
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 \
330 struc-symbol.h write.h flonum.h bignum.h expr.h \
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 \
334 targ-cpu.h struc-symbol.h \
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
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
340 messages.o : messages.c as.h host.h targ-env.h obj-format.h \
341 targ-cpu.h struc-symbol.h \
342 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
343 output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \
344 targ-cpu.h struc-symbol.h \
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 \
348 targ-cpu.h struc-symbol.h \
349 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
350 subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \
351 targ-cpu.h struc-symbol.h \
352 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
353 subsegs.h
354 symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
355 targ-cpu.h struc-symbol.h \
356 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
357 subsegs.h
358 write.o : write.c as.h host.h targ-env.h obj-format.h \
359 targ-cpu.h struc-symbol.h \
360 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
361 subsegs.h output-file.h
362 xmalloc.o : xmalloc.c
363 atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
364 targ-cpu.h struc-symbol.h \
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 \
368 targ-cpu.h struc-symbol.h \
369 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
370 subsegs.h symbols.h tc.h obj.h
371 targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \
372 targ-cpu.h struc-symbol.h \
373 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
374 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
375
376 # Remake the info files.
377
378 doc: $(srcdir)/as.info
379
380 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
381 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
382
383 clean:
384 @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean)
385 @(cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean)
386 -rm -f $(STAGESTUFF) core
387
388 # Like clean but also delete the links made to configure gas.
389 distclean: clean
390 -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \
391 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS
392
393 # Entry points `install', `includes' and `uninstall'.
394
395 # Copy the files into directories where they will be run.
396 install:
397 $(INSTALL_XFORM) as.new $(bindir)/as; \
398 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1;
399 -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
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
406
407 # Cancel installation by deleting the installed files.
408 uninstall:
409 -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
410 rm -f $(bindir)/$$n; \
411 rm -f $(mandir)/$$n.1
412
413 # These exist for maintenance purposes.
414
415 tags TAGS: force
416 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
417
418 bootstrap: as.new force
419 $(MAKE) stage1
420 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
421 $(MAKE) stage2
422 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
423 $(MAKE) comparison against=stage2
424
425 bootstrap2: force
426 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
427 $(MAKE) stage2
428 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
429 $(MAKE) comparison against=stage2
430
431 bootstrap3: force
432 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
433 $(MAKE) comparison against=stage2
434
435 # Copy the object files from a particular stage into a subdirectory.
436 stage1: force
437 -mkdir stage1
438 -mv $(STAGESTUFF) stage1
439 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
440
441 stage2: force
442 -mkdir stage2
443 -mv $(STAGESTUFF) stage2
444 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
445
446 stage3: force
447 -mkdir stage3
448 -mv $(STAGESTUFF) stage3
449 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
450
451 against=stage2
452
453 comparison: force
454 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
455
456 de-stage1: force
457 - (cd stage1 ; rm as ; mv -f * ..)
458 - rmdir stage1
459
460 de-stage2: force
461 - (cd stage2 ; rm as ; mv -f * ..)
462 - rmdir stage2
463
464 de-stage3: force
465 - (cd stage3 ; rm as ; mv -f * ..)
466 - rmdir stage3
467
468 #In GNU Make, ignore whether `stage*' exists.
469 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
470
471 force:
472
473 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
474 $(srcdir)/configure.in
475 $(SHELL) ./config.status
This page took 0.041253 seconds and 4 git commands to generate.