]>
Commit | Line | Data |
---|---|---|
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). | |
22 | ALL = asm29k avax a68 a386 asparc a32k a860 a960 | |
23 | MDSRC=vax.c m68k.c i386.c sparc.c am29k.c ns32k.c | |
24 | ||
25 | BINDIR = $(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. | |
35 | G0 = -g -I. -DUSG | |
36 | LDFLAGS = $(CFLAGS) | |
37 | LOADLIBES = # -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... [email protected]] | |
136 | ||
137 | O1 = -DNO_STDARG | |
138 | O2 = # -DNO_VARARGS | |
139 | O3 = # -DNON_BROKEN_WORDS | |
140 | O4 = # -Dm68851 | |
141 | O5 = # -DEXEC_VERSION=1 | |
142 | O6 = # -DSIGTY=void | |
143 | O6 = # -DNS32532 | |
144 | O7 = # -DNS32381 | |
145 | O8 = # -DDOT_LABEL_PREFIX | |
146 | O9 = # -DSEQUENT_COMPATABILITY | |
147 | ||
148 | G1 = # -DREGISTER_PREFIX=\'%\' | |
149 | G2 = # -DUSE_SYSTEM_HDR | |
150 | G3 = # -DUSE_HP_HDR | |
151 | G4 = # -DLOCAL_LABELS_DOLLAR | |
152 | G5 = # -DLOCAL_LABELS_FB | |
153 | G6 = # -DDEBUG | |
154 | G7 = # -DREQUIRE_CHAR_CLOSE_QUOTE | |
155 | G8 = -DB_OUT | |
156 | G9 = -DBACKSLASH_V | |
157 | ||
158 | OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7) $(O8) $(O9) | |
159 | ||
160 | CFLAGS = $(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 | ||
198 | a =\ | |
199 | as.o xrealloc.o xmalloc.o hash.o hex-value.o \ | |
200 | atof-generic.o messages.o expr.o app.o \ | |
201 | frags.o input-file.o input-scrub.o output-file.o \ | |
202 | subsegs.o symbols.o version.o \ | |
203 | flonum-const.o flonum-copy.o flonum-mult.o strstr.o bignum-copy.o \ | |
204 | obstack.o cond.o | |
205 | #gdb.o gdb-file.o gdb-symbols.o gdb-blocks.o gdb-lines.o | |
206 | ||
207 | a: $(DEFAULT_GAS) | |
208 | @rm -f a | |
209 | @ln $(DEFAULT_GAS) a | |
210 | ||
211 | # i960 GAS ------------------------------------------------------------------ | |
212 | t = i960.o i960-opcode.o atof-ieee.o ver960.o read-i960.o write-i960.o | |
213 | ||
214 | T = i960.c i960-opcode.c atof-ieee.c ver960.c | |
215 | ||
216 | i960.o: i960.c i960-opcode.h as.h frags.h struc-symbol.h | |
217 | i960.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h | |
218 | $(CC) -c $(CFLAGS) -DI80960 i960.c | |
219 | ||
220 | write-i960.o: write.c | |
221 | $(CC) -c $(CFLAGS) write.c | |
222 | mv write.o write-i960.o | |
223 | ||
224 | read-i960.o: read.c | |
225 | $(CC) -c $(CFLAGS) read.c | |
226 | mv read.o read-i960.o | |
227 | ||
228 | a960_cheat: $a $t | |
229 | $(CC) -o a960 $(LDFLAGS) $a $t $(LOADLIBES) | |
230 | ||
231 | a960: force | |
232 | $(MAKE) 'CFLAGS=$(CFLAGS) -DI80960' a960_cheat | |
233 | ||
234 | force: | |
235 | ||
236 | # AM29K GAS ------------------------------------------------------------------ | |
237 | u = am29k.o atof-ieee.o write.o read.o | |
238 | ||
239 | U = am29k.c am29k-opcode.h | |
240 | ||
241 | am29k.o: am29k.c a.out.gnu.h as.h expr.h flonum.h frags.h hash.h | |
242 | am29k.o: am29k-opcode.h md.h obstack.h struc-symbol.h | |
243 | $(CC) $(CFLAGS) -c am29k.c | |
244 | ||
245 | asm29k: $a $u | |
246 | $(CC) -o asm29k $(LDFLAGS) $a $u $(LOADLIBES) | |
247 | ||
248 | # I860 GAS ------------------------------------------------------------------ | |
249 | u = i860.o atof-ieee.o write.o read.o | |
250 | ||
251 | U = i860.c i860-opcode.h | |
252 | ||
253 | i860.o: i860.c i860-opcode.h as.h frags.h struc-symbol.h | |
254 | i860.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h | |
255 | $(CC) -c $(CFLAGS) i860.c | |
256 | ||
257 | atof-ieee.o: flonum.h | |
258 | ||
259 | a860: $a $u | |
260 | $(CC) -o a860 $(LDFLAGS) $a $u $(LOADLIBES) | |
261 | ||
262 | # SPARC GAS ------------------------------------------------------------------ | |
263 | v = sparc.o atof-ieee.o write.o read.o | |
264 | ||
265 | V = sparc.c sparc-opcode.h | |
266 | ||
267 | atof-ieee.o: flonum.h | |
268 | sparc.o: sparc.c reloc.h sparc-opcode.h as.h frags.h struc-symbol.h | |
269 | sparc.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h | |
270 | $(CC) -c $(CFLAGS) -DSPARC sparc.c | |
271 | ||
272 | asparc: $a $v | |
273 | $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES) | |
274 | ||
275 | # NS32K GAS ------------------------------------------------------------------ | |
276 | w = ns32k.o atof-ieee.o write-ns32k.o read-ns32k.o | |
277 | ||
278 | W = ns32k.c ns32k-opcode.h | |
279 | ||
280 | atof-ieee.o: flonum.h | |
281 | ns32k.o: as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h | |
282 | ns32k.o: write.h symbols.h ns32k-opcode.h ns32k.c | |
283 | $(CC) $(CFLAGS) $(OPTIONS) -c ns32k.c | |
284 | ||
285 | write-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 | ||
291 | read-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 | ||
297 | a32k: $a $w | |
298 | $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES) | |
299 | ||
300 | # 80386 GAS ------------------------------------------------------------------ | |
301 | x = i386.o atof-ieee.o write.o read.o | |
302 | ||
303 | X = i386.c i386.h i386-opcode.h | |
304 | ||
305 | i386.o: i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h | |
306 | i386.o: symbols.h hash.h md.h i386.h i386-opcode.h | |
307 | $(CC) $(CFLAGS) $(OPTIONS) -c i386.c | |
308 | ||
309 | atof-ieee.o: flonum.h | |
310 | ||
311 | a386: $a $x | |
312 | $(CC) -o a386 $(LDFLAGS) $a $x $(LOADLIBES) | |
313 | ||
314 | # 68020 GAS ------------------------------------------------------------------ | |
315 | y = m68k.o atof-ieee.o write.o read.o | |
316 | ||
317 | Y = m68k.c atof-ieee.c m68k-opcode.h m-hpux.h m-sun3.h m-generic.h | |
318 | ||
319 | atof-ieee.o: flonum.h | |
320 | ||
321 | m68k.o: m68k.c a.out.gnu.h as.h expr.h flonum.h frags.h hash.h | |
322 | m68k.o: m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h | |
323 | $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c | |
324 | ||
325 | a68: $a $y | |
326 | $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES) | |
327 | ||
328 | # VAX GAS -------------------------------------------------------------------- | |
329 | z = vax.o atof-vax.o write.o read.o | |
330 | ||
331 | Z = 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 | ||
334 | vax.o: vax.c a.out.gnu.h as.h expr.h flonum.h frags.h md.h obstack.h | |
335 | vax.o: read.h struc-symbol.h symbols.h vax-inst.h vax-opcode.h | |
336 | atof-vax.o: as.h flonum.h read.h | |
337 | ||
338 | avax: $a $z | |
339 | $(CC) -o avax $(LDFLAGS) $a $z $(LOADLIBES) | |
340 | ||
341 | # global files --------------------------------------------------------------- | |
342 | ||
343 | hash.o: hash.c | |
344 | $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c | |
345 | ||
346 | xmalloc.o: xmalloc.c | |
347 | $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c | |
348 | ||
349 | xrealloc.o: xrealloc.c | |
350 | $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c | |
351 | ||
352 | A =\ | |
353 | as.c xrealloc.c xmalloc.c hash.c hex-value.c \ | |
354 | atof-generic.c messages.c expr.c bignum-copy.c \ | |
355 | frags.c input-file.c input-scrub.c output-file.c read.c \ | |
356 | subsegs.c symbols.c write.c strstr.c \ | |
357 | flonum-const.c flonum-copy.c flonum-mult.c app.c version.c \ | |
358 | obstack.c cond.c \ | |
359 | #gdb.c gdb-file.c gdb-symbols.c gdb-blocks.c \ | |
360 | #gdb-lines.c | |
361 | ||
362 | H = \ | |
363 | a.out.gnu.h as.h bignum.h expr.h flonum.h \ | |
364 | frags.h hash.h input-file.h md.h \ | |
365 | obstack.h read.h reloc.h struc-symbol.h subsegs.h \ | |
366 | symbols.h write.h | |
367 | ||
368 | dist: 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 | ||
376 | clean: | |
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 | ||
379 | all: $(ALL) | |
380 | ||
381 | install: install_tools | |
382 | install_tools: a | |
383 | cp a $(BINDIR)/as | |
384 | ||
385 | # For things like: emacs `make mdsrc` | |
386 | mdsrc: | |
387 | @ls $(MDSRC) | |
388 | ||
389 | LINT = /usr/5bin/lint | |
390 | LINTFLAGS = | |
391 | ||
392 | lint: | |
393 | $(LINT) $(LINTFLAGS) $(CFLAGS) $A | |
394 | ||
395 | # General .o-->.h dependencies | |
396 | ||
397 | app.o: as.h | |
398 | as.o: a.out.gnu.h as.h read.h struc-symbol.h write.h | |
399 | atof-generic.o: flonum.h | |
400 | bignum-copy.o: bignum.h | |
401 | expr.o: a.out.gnu.h as.h expr.h flonum.h obstack.h read.h struc-symbol.h | |
402 | expr.o: symbols.h | |
403 | flonum-const.o: flonum.h | |
404 | flonum-copy.o: flonum.h | |
405 | flonum-mult.o: flonum.h | |
406 | flonum-normal.o:flonum.h | |
407 | flonum-print.o: flonum.h | |
408 | frags.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 | |
413 | hash.o: hash.h | |
414 | input-file.o: input-file.h | |
415 | input-scrub.o: as.h input-file.h read.h | |
416 | messages.o: as.h | |
417 | obstack.o: obstack.h | |
418 | read.o: a.out.gnu.h as.h expr.h flonum.h frags.h hash.h md.h obstack.h | |
419 | read.o: read.h struc-symbol.h symbols.h reloc.h | |
420 | subsegs.o: a.out.gnu.h as.h frags.h obstack.h struc-symbol.h subsegs.h write.h | |
421 | symbols.o: a.out.gnu.h as.h frags.h hash.h obstack.h struc-symbol.h symbols.h | |
422 | write.o: a.out.gnu.h as.h md.h obstack.h struc-symbol.h subsegs.h | |
423 | write.o: symbols.h write.h reloc.h | |
424 | ||
425 | flonum.h: bignum.h | |
426 | ||
427 | etags tags: TAGS | |
428 | ||
429 | TAGS: force | |
430 | etags Makefile* README* config.gas *.[hc] | |
431 | ||
432 | force: | |
433 | ||
434 | # End of Makefile |