* subsegs.c (subseg_change): allow and handle a change into SEG_BSS.
[deliverable/binutils-gdb.git] / gas / Makefile.old
CommitLineData
0e39a8bb
RP
1# Makefile for GAS.
2# Copyright (C) 1989, Free Software Foundation
3#
4# This file is part of GAS, the GNU Assembler.
5#
6# 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 1, or (at your option)
9# any later version.
10#
11# 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 GAS; see the file COPYING. If not, write to
18# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20# This makefile may be used to make the VAX, 68020, 80386,
21# SPARC, AMD 29000, ns32k, or i860 assembler(s).
22ALL = asm29k avax a68 a386 asparc a32k a860 a960
23MDSRC=vax.c m68k.c i386.c sparc.c am29k.c ns32k.c
24
25BINDIR = $(DESTDIR)/bin
26
27# If you are on a BSD system, un-comment the next two lines, and comment out
28# the lines for SystemV and HPUX below
29#G0 = -g -I. #-O -Wall
30#LDFLAGS = $(CFLAGS)
31#
32# To compile gas on a System Five machine, comment out the two lines above
33# and un-comment out the next three lines
34# Comment out the -lPW on the LOADLIBES line if you are using GCC.
35G0 = -g -I. -DUSG
36LDFLAGS = $(CFLAGS)
37LOADLIBES = # -lmalloc -lPW
38#
39# To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the
40# next two lines. (If you are using GCC, comment out the alloca.o part)
41# (Get alloca from the emacs distribution, or use GCC.)
42# HPUX 7.0 may have a bug in setvbuf. gas gives an error message like
43# 1:"Unknown operator" -- Statement 'NO_APP' ignored
44# if setvbuf is broken. Re-compile input-file.c (and only input-file.c
45# with -DVMS and the problem should go away.
46#
47# G0 = -g -I. -DUSG
48# LOADLIBES = alloca.o
49#
50# To compile gas for a Sequent Symmetry, comment out all the above lines,
51# and un-comment the next two lines.
52# G0 = -g -I. -DUSE_SYSTEM_HDR -DEXEC_VERSION=1
53# LOADLIBES = -lc /usr/att/lib/libc.a
54
55# Use these lines to build gas using hc.
56#CC=hc29 -cmdlink.cmd -Dconst= -I../include/msdos
57#CC=gcc29k
58#LOADLIBES= ../binutils/alloca.o
59
60# If you just want to compile the vax assembler, type 'make avax'
61
62# If you just want to compile the i386 assembler, type 'make a386'
63
64# If you just want to compile the ns32k assembler, type 'make a32k'
65
66# If you just want to compile the sparc assembler, type 'make asparc'
67
68# If you just want to compile the AMD 29000 assembler, type 'make asm29k'
69
70# If you just want to compile the a860 assembler, type 'make a860'
71
72# If you just want to compile the a960 assembler, type 'make a960'
73
74# If you just want to compile the mc68020 assembler, make sure m68k.h
75# is correctly set up, and type type 'make a68' (Except on HPUX machines,
76# where you will have to make the changes marked below before typing
77# 'make a68'
78# m68k.h should be a symbolic or hard-link to one of
79# m-sun3.h , m-hpux.h or m-generic.h
80# depending on which machine you want to compile the 68020 assembler for.
81#
82# If you want the 68k assembler to be completely compatable with the the
83# SUN one, un-comment the -DLOCAL_LABELS_FB and -DLOCAL_LABELS_DOLLAR
84# lines below.
85#
86# Gas prefers STDARG's, but if your machine doesn't have stdarg.h, you
87# should define remove the # from the -DNO_STDARG line below. In this
88# case gas will try to use VARARGS instead. (but keep reading).
89#
90# If your machine does not have vfprintf, but does have _doprnt(),
91# remove the # from the -DNO_VARARGS line below.
92#
93# If the return-type of a signal-hander is void (instead of int),
94# remove the # from the -DSIGTY line below.
95#
96# To include the mc68851 mmu coprocessor instructions in the 68020 assembler,
97# remove the # from the -Dm68851 line below.
98#
99# If you want the 68020 assembler use a register prefix character, un-comment
100# the REGISTER_PREFIX line, and (maybe) change the '%' to the appropriate
101# character.
102#
103# If you want the assembler to treat .L* or ..* symbols as local, instead of
104# the usual L* symbols, un-comment the DOT_LABEL_PREFIX line.
105#
106# If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr
107# opcodes (unlike most 80386 assemblers), remove the # from
108# the -DNON_BROKEN_WORDS line below.
109#
110# To compile 80386 Gas for the Sequent Symmetry, un-comment the -DEXEC_VERSION
111# and the -DUSE_SYSTEM_HDR lines below.
112#
113# To compile gas for the HP 9000/300 un-comment the -DUSE_HP_HDR line below.
114#
115# For the ns32k, the options are 32532 or 32032 CPU and 32381 or 32081 FPU.
116# To select the NS32532, remove the # from the -DNS32532 line below.
117# To compile in tne NS32381 opcodes in addition to the NS32081 opcodes
118# (the 32381 is a superset of the 32081), remove the # from the -DNS32381
119# line below.
120#
121# For the ns32k on a Sequent, uncomment the SEQUENT_COMPATABILITY line below.
122#
123# If you want character constants to *require* closing single quotes,
124# eg 'c' rather than 'c then use the -DREQUIRE_CHAR_CLOSE_QUOTE lines
125# below. The default is for the closing quote to be optional.
126#
127# To produce intel's b.out format, use the B_OUT line below.
128#
129# if you want to allow "\v" to mean a control-k, use the BACKSLASH_V
130# line below.
131
132# [Why is there a distinction between "Ox" and "Gx"? It would seem easier
133# to not have to figure out that your code isn't working because some
134# define's are only seen by some modules and you tested it in a module
135# where it never gets defined... gnu@cygnus.com]
136
137O1 = -DNO_STDARG
138O2 = # -DNO_VARARGS
139O3 = # -DNON_BROKEN_WORDS
140O4 = # -Dm68851
141O5 = # -DEXEC_VERSION=1
142O6 = # -DSIGTY=void
143O6 = # -DNS32532
144O7 = # -DNS32381
145O8 = # -DDOT_LABEL_PREFIX
146O9 = # -DSEQUENT_COMPATABILITY
147
148G1 = # -DREGISTER_PREFIX=\'%\'
149G2 = # -DUSE_SYSTEM_HDR
150G3 = # -DUSE_HP_HDR
151G4 = # -DLOCAL_LABELS_DOLLAR
152G5 = # -DLOCAL_LABELS_FB
153G6 = # -DDEBUG
154G7 = # -DREQUIRE_CHAR_CLOSE_QUOTE
155G8 = -DB_OUT
156G9 = -DBACKSLASH_V
157
158OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7) $(O8) $(O9)
159
160CFLAGS = $(G0) $(G1) $(G2) $(G3) $(G4) $(G5) $(G6) $(G7) $(G8) $(G9) $(OPTIONS)
161
162#
163# To make the 68020 assembler compile as the default, un-comment the next
164# line, and comment out all the other lines that start with DEFAULT_GAS
165#DEFAULT_GAS=a68
166#
167# To make the VAX assembler compile as the default, un-comment the next
168# line and commment out all the other lines that start with DEFAULT_GAS
169#DEFAULT_GAS=avax
170#
171# To make the 80386 assembler compile as the default, un-comment the next
172# line and commment out all the other lines that start with DEFAULT_GAS
173#DEFAULT_GAS=a386
174#
175# To make the ns32k assembler compile as the default, un-comment the next
176# line and commment out all the other lines that start with DEFAULT_GAS
177#DEFAULT_GAS=a32k
178#
179# To make the sparc assembler compile as the default, un-comment the next
180# line and commment out all the other lines that start with DEFAULT_GAS
181#DEFAULT_GAS=asparc
182#
183#
184# To make the i860 assembler compile as the default, un-comment the next
185# line and comment out all the other lines that start with DEFAULT_GAS
186#DEFAULT_GAS=a860
187#
188# To make the asm29k assembler compile as the default, un-comment the next
189# line and commment out all the other lines that start with DEFAULT_GAS
190#DEFAULT_GAS=asm29k
191#
192# To make the i960 assembler compile as the default, un-comment the next
193# line and commment out all the other lines that start with DEFAULT_GAS
194#DEFAULT_GAS=a960
195
196# Global Sources -------------------------------------------------------------
197
198a =\
199as.o xrealloc.o xmalloc.o hash.o hex-value.o \
200atof-generic.o messages.o expr.o app.o \
201frags.o input-file.o input-scrub.o output-file.o \
202subsegs.o symbols.o version.o \
203flonum-const.o flonum-copy.o flonum-mult.o strstr.o bignum-copy.o \
204obstack.o cond.o
205#gdb.o gdb-file.o gdb-symbols.o gdb-blocks.o gdb-lines.o
206
207a: $(DEFAULT_GAS)
208 @rm -f a
209 @ln $(DEFAULT_GAS) a
210
211# i960 GAS ------------------------------------------------------------------
212t = i960.o i960-opcode.o atof-ieee.o ver960.o read-i960.o write-i960.o
213
214T = i960.c i960-opcode.c atof-ieee.c ver960.c
215
216i960.o: i960.c i960-opcode.h as.h frags.h struc-symbol.h
217i960.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h
218 $(CC) -c $(CFLAGS) -DI80960 i960.c
219
220write-i960.o: write.c
221 $(CC) -c $(CFLAGS) write.c
222 mv write.o write-i960.o
223
224read-i960.o: read.c
225 $(CC) -c $(CFLAGS) read.c
226 mv read.o read-i960.o
227
228a960_cheat: $a $t
229 $(CC) -o a960 $(LDFLAGS) $a $t $(LOADLIBES)
230
231a960: force
232 $(MAKE) 'CFLAGS=$(CFLAGS) -DI80960' a960_cheat
233
234force:
235
236# AM29K GAS ------------------------------------------------------------------
237u = am29k.o atof-ieee.o write.o read.o
238
239U = am29k.c am29k-opcode.h
240
241am29k.o: am29k.c a.out.gnu.h as.h expr.h flonum.h frags.h hash.h
242am29k.o: am29k-opcode.h md.h obstack.h struc-symbol.h
243 $(CC) $(CFLAGS) -c am29k.c
244
245asm29k: $a $u
246 $(CC) -o asm29k $(LDFLAGS) $a $u $(LOADLIBES)
247
248# I860 GAS ------------------------------------------------------------------
249u = i860.o atof-ieee.o write.o read.o
250
251U = i860.c i860-opcode.h
252
253i860.o: i860.c i860-opcode.h as.h frags.h struc-symbol.h
254i860.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h
255 $(CC) -c $(CFLAGS) i860.c
256
257atof-ieee.o: flonum.h
258
259a860: $a $u
260 $(CC) -o a860 $(LDFLAGS) $a $u $(LOADLIBES)
261
262# SPARC GAS ------------------------------------------------------------------
263v = sparc.o atof-ieee.o write.o read.o
264
265V = sparc.c sparc-opcode.h
266
267atof-ieee.o: flonum.h
268sparc.o: sparc.c reloc.h sparc-opcode.h as.h frags.h struc-symbol.h
269sparc.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h
270 $(CC) -c $(CFLAGS) -DSPARC sparc.c
271
272asparc: $a $v
273 $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES)
274
275# NS32K GAS ------------------------------------------------------------------
276w = ns32k.o atof-ieee.o write-ns32k.o read-ns32k.o
277
278W = ns32k.c ns32k-opcode.h
279
280atof-ieee.o: flonum.h
281ns32k.o: as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h
282ns32k.o: write.h symbols.h ns32k-opcode.h ns32k.c
283 $(CC) $(CFLAGS) $(OPTIONS) -c ns32k.c
284
285write-ns32k.o: write.c
286 rm -f write-ns32k.c
287 cp write.c write-ns32k.c
288 $(CC) -c -DNS32K $(CFLAGS) write-ns32k.c
289 rm -f write-ns32k.c
290
291read-ns32k.o: read.c
292 rm -f read-ns32k.c
293 cp read.c read-ns32k.c
294 $(CC) -c -DNS32K $(CFLAGS) read-ns32k.c
295 rm -f read-ns32k.c
296
297a32k: $a $w
298 $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES)
299
300# 80386 GAS ------------------------------------------------------------------
301x = i386.o atof-ieee.o write.o read.o
302
303X = i386.c i386.h i386-opcode.h
304
305i386.o: i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h
306i386.o: symbols.h hash.h md.h i386.h i386-opcode.h
307 $(CC) $(CFLAGS) $(OPTIONS) -c i386.c
308
309atof-ieee.o: flonum.h
310
311a386: $a $x
312 $(CC) -o a386 $(LDFLAGS) $a $x $(LOADLIBES)
313
314# 68020 GAS ------------------------------------------------------------------
315y = m68k.o atof-ieee.o write.o read.o
316
317Y = m68k.c atof-ieee.c m68k-opcode.h m-hpux.h m-sun3.h m-generic.h
318
319atof-ieee.o: flonum.h
320
321m68k.o: m68k.c a.out.gnu.h as.h expr.h flonum.h frags.h hash.h
322m68k.o: m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h
323 $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c
324
325a68: $a $y
326 $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
327
328# VAX GAS --------------------------------------------------------------------
329z = vax.o atof-vax.o write.o read.o
330
331Z = vax.c atof-vax.c vax-opcode.h vax-inst.h \
332 make-gas.com objrecdef.h vms.c vms-dbg.c README-vms-dbg
333
334vax.o: vax.c a.out.gnu.h as.h expr.h flonum.h frags.h md.h obstack.h
335vax.o: read.h struc-symbol.h symbols.h vax-inst.h vax-opcode.h
336atof-vax.o: as.h flonum.h read.h
337
338avax: $a $z
339 $(CC) -o avax $(LDFLAGS) $a $z $(LOADLIBES)
340
341# global files ---------------------------------------------------------------
342
343hash.o: hash.c
344 $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c
345
346xmalloc.o: xmalloc.c
347 $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c
348
349xrealloc.o: xrealloc.c
350 $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c
351
352A =\
353as.c xrealloc.c xmalloc.c hash.c hex-value.c \
354atof-generic.c messages.c expr.c bignum-copy.c \
355frags.c input-file.c input-scrub.c output-file.c read.c \
356subsegs.c symbols.c write.c strstr.c \
357flonum-const.c flonum-copy.c flonum-mult.c app.c version.c \
358obstack.c cond.c \
359#gdb.c gdb-file.c gdb-symbols.c gdb-blocks.c \
360#gdb-lines.c
361
362H = \
363a.out.gnu.h as.h bignum.h expr.h flonum.h \
364frags.h hash.h input-file.h md.h \
365obstack.h read.h reloc.h struc-symbol.h subsegs.h \
366symbols.h write.h
367
368dist: COPYING README ChangeLog $A $H $U $V $W $X $Y $Z Makefile
369 echo gas-`sed -n -e '/ version /s/[^0-9.]*\([0-9.]*\).*/\1/p' < version.c` > .fname
370 mkdir `cat .fname`
371
372 ln COPYING README ChangeLog $A $H $U $V $W $X $Y $Z Makefile `cat .fname`
373 tar cvhZf `cat .fname`.tar.Z `cat .fname`
374 -rm -rf .fname `cat .fname`
375
376clean:
377 rm -f a avax a68 a386 a32k asparc asm29k a860 a960 $a $u $v $w $x $y $z a core gmon.out bugs a.out
378
379all: $(ALL)
380
381install: install_tools
382install_tools: a
383 cp a $(BINDIR)/as
384
385# For things like: emacs `make mdsrc`
386mdsrc:
387 @ls $(MDSRC)
388
389LINT = /usr/5bin/lint
390LINTFLAGS =
391
392lint:
393 $(LINT) $(LINTFLAGS) $(CFLAGS) $A
394
395# General .o-->.h dependencies
396
397app.o: as.h
398as.o: a.out.gnu.h as.h read.h struc-symbol.h write.h
399atof-generic.o: flonum.h
400bignum-copy.o: bignum.h
401expr.o: a.out.gnu.h as.h expr.h flonum.h obstack.h read.h struc-symbol.h
402expr.o: symbols.h
403flonum-const.o: flonum.h
404flonum-copy.o: flonum.h
405flonum-mult.o: flonum.h
406flonum-normal.o:flonum.h
407flonum-print.o: flonum.h
408frags.o: a.out.gnu.h as.h frags.h obstack.h struc-symbol.h subsegs.h
409#gdb.o: as.h
410#gdb-blocks.o: as.h
411#gdb-lines.o: as.h frags.h obstack.h
412#gdb-symbols.o: a.out.gnu.h as.h struc-symbol.h
413hash.o: hash.h
414input-file.o: input-file.h
415input-scrub.o: as.h input-file.h read.h
416messages.o: as.h
417obstack.o: obstack.h
418read.o: a.out.gnu.h as.h expr.h flonum.h frags.h hash.h md.h obstack.h
419read.o: read.h struc-symbol.h symbols.h reloc.h
420subsegs.o: a.out.gnu.h as.h frags.h obstack.h struc-symbol.h subsegs.h write.h
421symbols.o: a.out.gnu.h as.h frags.h hash.h obstack.h struc-symbol.h symbols.h
422write.o: a.out.gnu.h as.h md.h obstack.h struc-symbol.h subsegs.h
423write.o: symbols.h write.h reloc.h
424
425flonum.h: bignum.h
426
427etags tags: TAGS
428
429TAGS: force
430 etags Makefile* README* config.gas *.[hc]
431
432force:
433
434# End of Makefile
This page took 0.072725 seconds and 4 git commands to generate.