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