* coff-mips.c (mips_relocate_section): Don't convert a reloc
[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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 # The targets for external use include:
21 # all, doc, proto, install, uninstall, includes, TAGS,
22 # clean, mostlyclean, distclean, 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 VPATH = @srcdir@
28 srcdir = @srcdir@
29 srcroot = $(srcdir)/..
30
31 target_alias = @target_alias@
32 prefix = @prefix@
33
34 program_transform_name = @program_transform_name@
35 exec_prefix = @exec_prefix@
36 bindir = $(exec_prefix)/bin
37 libdir = $(exec_prefix)/lib
38 tooldir = $(exec_prefix)/$(target_alias)
39
40 datadir = $(prefix)/lib
41 mandir = $(prefix)/man
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
51 infodir = $(prefix)/info
52 includedir = $(prefix)/include
53 docdir = $(datadir)/doc
54
55 VERSION=cygnus-2.5.3
56
57 SHELL = /bin/sh
58
59 INSTALL = $${srcroot}/install.sh -c
60 INSTALL_PROGRAM = $(INSTALL)
61 INSTALL_DATA = $(INSTALL)
62 INSTALL_XFORM = $(INSTALL) -t='-e $(program_transform_name)'
63 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
64
65 DISTSTUFF= make-gas.com m68k-parse.c
66
67 AR = ar
68 AR_FLAGS = qv
69 BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
70 BISONFLAGS =
71 MAKEINFO = makeinfo
72 TEXI2DVI = texi2dvi
73 RANLIB = ranlib
74 CC = @CC@
75 CFLAGS = -g
76
77 MAKEOVERRIDES=
78
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)"
96
97 RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
98 echo ${srcdir}/../dejagnu/runtest ; else echo runtest; \
99 fi`
100 RUNTESTFLAGS=
101 CHECKFLAGS= \
102 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
103 "RUNTEST=$(RUNTEST)"
104
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 \
114 $(srcdir)/flonum-konst.c \
115 $(srcdir)/flonum-copy.c \
116 $(srcdir)/flonum-mult.c \
117 $(srcdir)/frags.c \
118 $(srcdir)/hash.c \
119 $(srcdir)/input-file.c \
120 $(srcdir)/input-scrub.c \
121 $(srcdir)/literal.c \
122 $(srcdir)/messages.c \
123 $(srcdir)/output-file.c \
124 $(srcdir)/read.c \
125 $(srcdir)/subsegs.c \
126 $(srcdir)/symbols.c \
127 $(srcdir)/write.c \
128 $(srcdir)/listing.c \
129 $(srcdir)/ecoff.c \
130 $(srcdir)/stabs.c
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 \
148 $(srcdir)/listing.h \
149 $(srcdir)/tc.h \
150 $(srcdir)/obj.h \
151 $(srcdir)/read.h \
152 $(srcdir)/struc-symbol.h \
153 $(srcdir)/subsegs.h \
154 $(srcdir)/symbols.h \
155 $(srcdir)/write.h \
156 $(srcdir)/ecoff.h
157
158 LINKED_HEADERS = \
159 targ-env.h \
160 targ-cpu.h \
161 obj-format.h \
162 atof-targ.h
163
164 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
165
166 TE_OBJS=
167
168 # @target_frag@
169
170 OBJS = \
171 targ-cpu.o \
172 obj-format.o \
173 atof-targ.o \
174 app.o \
175 as.o \
176 atof-generic.o \
177 bignum-copy.o \
178 cond.o \
179 expr.o \
180 flonum-konst.o \
181 flonum-copy.o \
182 flonum-mult.o \
183 frags.o \
184 hash.o \
185 input-file.o \
186 input-scrub.o \
187 literal.o \
188 messages.o \
189 output-file.o \
190 read.o \
191 subsegs.o \
192 symbols.o \
193 write.o \
194 listing.o \
195 ecoff.o \
196 stabs.o \
197 sb.o \
198 macro.o \
199 @extra_objects@ \
200 $(TE_OBJS)
201
202 GASPOBJS = \
203 gasp.o \
204 macro.o \
205 sb.o \
206 hash.o
207
208 all: .gdbinit as.new gasp.new
209 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
210 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
211
212 dvi info install-info clean-info:
213 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
214 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
215
216 make-gas.com: stamp-mk.com
217 stamp-mk.com: vmsconf.sh Makefile
218 sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
219 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
220 touch stamp-mk.com
221
222 # Now figure out from those variables how to compile and link.
223
224 # This is the variable actually used when we compile.
225 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
226
227 # How to link with both our special library facilities
228 # and the system's installed libraries.
229
230 LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
231
232 # Specify the directories to be searched for header files.
233 # Both . and srcdir are used, in that order,
234 # so that tm.h and config.h will be found in the compilation
235 # subdirectory rather than in the source directory.
236 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
237
238 # Always use -I$(srcdir)/config when compiling.
239 .c.o:
240 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
241
242 # This tells GNU make version 3 not to export all the variables
243 # defined in this file into the environment.
244 .NOEXPORT:
245
246 # Files to be copied away after each stage in building.
247 STAGESTUFF = *.o as.new gasp.new
248
249 $(OBJS): @ALL_OBJ_DEPS@
250
251 as.new: $(OBJS) $(LIBS)
252 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
253
254 $(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \
255 struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \
256 listing.h bignum.h
257
258 gasp.new: $(GASPOBJS)
259 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) $(LIBS) $(LOADLIBES)
260
261 installcheck:
262 @echo No installcheck target is available yet for the GNU assembler.
263
264 check:
265 @(here=`pwd` ; export here ; \
266 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
267
268 config.status: configure
269 if [ -r config.status ]; then \
270 sh ./config.status --recheck ; \
271 else \
272 echo You must configure gas. Look at the INSTALL file for details. ; \
273 exit 1 ; \
274 fi
275
276 config.h: config-stamp ; @true
277 config-stamp: Makefile conf
278 -rm -f config.new config-stamp
279 echo '/* config.h. Generated automatically by make. */' > config.new
280 echo '#ifndef GAS_VERSION' >> config.new
281 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
282 echo '' >> config.new
283 cat conf >> config.new
284 echo '#endif /* GAS_VERSION */' >> config.new
285 $(srcdir)/../move-if-change config.new config.h
286 touch config-stamp
287
288 # Compiling object files from source files.
289
290 TARG_CPU_DEP_a29k =
291 TARG_CPU_DEP_alpha =
292 # start-sanitize-arc
293 TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h
294 # end-sanitize-arc
295 TARG_CPU_DEP_arm =
296 TARG_CPU_DEP_generic =
297 TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
298 TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h
299 TARG_CPU_DEP_hppa =
300 TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h
301 TARG_CPU_DEP_i860 =
302 TARG_CPU_DEP_i960 =
303 TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
304 $(srcdir)/config/m68k-parse.h subsegs.h
305 TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h
306 TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h
307 TARG_CPU_DEP_ns32k =
308 TARG_CPU_DEP_ppc =
309 # start-sanitize-rce
310 TARG_CPU_DEP_rce = $(srcdir)/../opcodes/rce-opc.h
311 # end-sanitize-rce
312 TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h
313 TARG_CPU_DEP_sparc =
314 TARG_CPU_DEP_tahoe =
315 TARG_CPU_DEP_vax =
316 TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h
317 TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
318
319 gasp.o : gasp.c sb.h macro.h config.h
320 sb.o : sb.c sb.h config.h
321 macro.o : macro.c macro.h sb.h hash.h config.h
322 app.o : app.c write.h
323 as.o : as.c output-file.h write.h subsegs.h sb.h macro.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
334 input-file.o : input-file.c input-file.h
335 input-scrub.o : input-scrub.c input-file.h sb.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 sb.h macro.h
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
352 targ-cpu.o : targ-cpu.c $(TARG_CPU_DEP_@target_cpu_type@)
353
354 obj-elf.o : $(srcdir)/config/obj-elf.c
355 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
356 obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
357 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
358
359 e-mipself.o : $(srcdir)/config/e-mipself.c
360 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
361 e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
362 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
363
364 # The m68k operand parser.
365
366 m68k-parse.c: $(srcdir)/config/m68k-parse.y
367 $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
368 mv -f y.tab.c m68k-parse.c
369 m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
370
371 # Remake the info files.
372
373 doc: $(srcdir)/as.info
374
375 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
376 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
377
378 diststuff: $(DISTSTUFF)
379
380 clean-here:
381 -rm -f $(STAGESTUFF) core stamp-mk.com
382
383 clean mostlyclean: clean-here
384 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
385 @if [ -d testsuite ] ; then \
386 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
387 else true; fi
388
389 # Like clean but also delete the links made to configure gas.
390 distclean: clean-here
391 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
392 @if [ -d testsuite ] ; then \
393 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
394 else true; fi
395 -rm -f config.status Makefile targ-env.h targ-cpu.h \
396 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
397 config-stamp config.h conf config.log config.cache .gdbinit
398 realclean: clean distclean
399 -rm -rf $(DISTSTUFF)
400
401 # Entry points `install', `includes' and `uninstall'.
402
403 # Copy the files into directories where they will be run.
404 install:
405 srcroot=`cd $(srcroot); pwd`; export srcroot; \
406 $(INSTALL_XFORM) as.new $(bindir)/as; \
407 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
408 n=`echo as | sed '$(program_transform_name)'`; \
409 if [ -d $(tooldir) ]; then \
410 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
411 rm -f $(tooldir)/bin/as; \
412 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
413 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
414 else true; fi
415 srcroot=`cd $(srcroot); pwd`; export srcroot; \
416 $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \
417 n=`echo gasp | sed '$(program_transform_name)' `; \
418 if [ -d $(tooldir) ]; then \
419 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
420 rm -f $(tooldir)/bin/gasp; \
421 ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \
422 || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \
423 else true; fi
424
425 # Cancel installation by deleting the installed files.
426 uninstall:
427 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
428 rm -f $(bindir)/$$n; \
429 rm -f $(mandir)/$$n.1
430 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
431 rm -f $(bindir)/$$n; \
432
433 # These exist for maintenance purposes.
434
435 tags TAGS: force
436 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
437
438 bootstrap: as.new force
439 $(MAKE) stage1
440 rm -f stage && ln -s stage1 stage
441 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
442 $(MAKE) stage2
443 rm -f stage && ln -s stage2 stage
444 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
445 $(MAKE) comparison against=stage2
446
447 bootstrap2: force
448 rm -f stage && ln -s stage1 stage
449 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
450 $(MAKE) stage2
451 rm -f stage && ln -s stage2 stage
452 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
453 $(MAKE) comparison against=stage2
454
455 bootstrap3: force
456 rm -f stage && ln -s stage2 stage
457 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
458 $(MAKE) comparison against=stage2
459
460 # Copy the object files from a particular stage into a subdirectory.
461 stage1: force
462 -mkdir stage1
463 -mv $(STAGESTUFF) stage1
464 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
465
466 stage2: force
467 -mkdir stage2
468 -mv $(STAGESTUFF) stage2
469 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
470
471 stage3: force
472 -mkdir stage3
473 -mv $(STAGESTUFF) stage3
474 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
475
476 against=stage2
477
478 # This rule is derived from corresponding code in the Makefile.in for gcc.
479 # The "tail +16c" is to bypass headers which may include timestamps or
480 # temporary assembly file names.
481 comparison: force
482 x=0 ; \
483 for file in $(STAGESTUFF) ; do \
484 tail +16c ./$$file > tmp-foo1; \
485 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
486 if cmp tmp-foo1 tmp-foo2 ; then \
487 true ; \
488 else \
489 echo $$file differs ; \
490 x=1 ; \
491 fi ; \
492 else true; fi ; \
493 done ; \
494 exit $$x
495 -rm -f tmp-foo*
496
497 de-stage1: force
498 - (cd stage1 ; rm -f as ; mv -f * ..)
499 - rmdir stage1
500
501 de-stage2: force
502 - (cd stage2 ; rm -f as ; mv -f * ..)
503 - rmdir stage2
504
505 de-stage3: force
506 - (cd stage3 ; rm -f as ; mv -f * ..)
507 - rmdir stage3
508
509 #In GNU Make, ignore whether `stage*' exists.
510 .PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
511 .PHONY: TAGS bootstrap
512
513 force:
514
515 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
516 $(srcdir)/configure.in config.status conf.in
517 $(SHELL) ./config.status
518 .gdbinit: $(srcdir)/gdbinit.in config.status
519 $(SHELL) ./config.status
This page took 0.03989 seconds and 4 git commands to generate.