x
[deliverable/binutils-gdb.git] / gas / Makefile.in
CommitLineData
fecd2382 1# Makefile for GNU Assembler
7b9f3d46 2# Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1997
011d16ac 3# Free Software Foundation, Inc.
fecd2382 4
7420b02b 5# This file is part of GNU GAS.
fecd2382 6
7420b02b
JL
7# GNU GAS is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
fecd2382 11
7420b02b
JL
12# GNU GAS is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
fecd2382 16
7420b02b 17# You should have received a copy of the GNU General Public License
7b9f3d46
ILT
18# along with GNU GAS; see the file COPYING. If not, write to the Free
19# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20# 02111-1307, USA.
fecd2382 21
fecd2382
RP
22# The targets for external use include:
23# all, doc, proto, install, uninstall, includes, TAGS,
daa7e184 24# clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
fecd2382
RP
25
26# Variables that exist for you to override.
27# See below for how to change them for certain systems.
28
b11fb939
KR
29VPATH = @srcdir@
30srcdir = @srcdir@
7420b02b 31srcroot = $(srcdir)/..
1058238c 32
fa156ffe 33target_alias = @target_alias@
1bc37618 34prefix = @prefix@
1058238c 35
fa156ffe 36program_transform_name = @program_transform_name@
1bc37618 37exec_prefix = @exec_prefix@
1c94de4d
JM
38bindir = @bindir@
39libdir = @libdir@
b63defaa 40tooldir = $(exec_prefix)/$(target_alias)
787c6bfe 41
1c94de4d
JM
42datadir = @datadir@
43mandir = @mandir@
1058238c
RP
44man1dir = $(mandir)/man1
45man2dir = $(mandir)/man2
46man3dir = $(mandir)/man3
47man4dir = $(mandir)/man4
48man5dir = $(mandir)/man5
49man6dir = $(mandir)/man6
50man7dir = $(mandir)/man7
51man8dir = $(mandir)/man8
52man9dir = $(mandir)/man9
1c94de4d
JM
53infodir = @infodir@
54includedir = @includedir@
1058238c 55
8ee90d35 56VERSION=cygnus-2.7.1
c97b9003 57
fecd2382 58SHELL = /bin/sh
1058238c 59
7420b02b 60INSTALL = $${srcroot}/install.sh -c
1c94de4d
JM
61INSTALL_PROGRAM = @INSTALL_PROGRAM@
62INSTALL_DATA = @INSTALL_DATA@
011d16ac 63INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
c97b9003 64INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
fecd2382 65
7b9f3d46 66DISTSTUFF= make-gas.com m68k-parse.c itbl-parse.c itbl-lex.c
6d60424f 67
1058238c
RP
68AR = ar
69AR_FLAGS = qv
a1c7c0f3
ILT
70BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
71BISONFLAGS =
7b9f3d46
ILT
72LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
73LEXFLAGS =
1058238c 74MAKEINFO = makeinfo
c97b9003 75TEXI2DVI = texi2dvi
fecd2382 76RANLIB = ranlib
b11fb939 77CC = @CC@
011d16ac 78HLDFLAGS = @HLDFLAGS@
8ee90d35 79HLDENV = @HLDENV@
1c94de4d 80RPATH_ENVVAR = @RPATH_ENVVAR@
efec4a28
DP
81CFLAGS = -g
82LDFLAGS =
4b857710 83
7420b02b
JL
84MAKEOVERRIDES=
85
5f757edc
ILT
86EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
87 echo $${rootme}/../expect/expect ; \
88 else echo expect ; fi`
89
4b857710
ILT
90FLAGS_TO_PASS = \
91 "prefix=$(prefix)" \
92 "exec_prefix=$(exec_prefix)" \
93 "tooldir=$(tooldir)" \
94 "AR=$(AR)" \
95 "AR_FLAGS=$(AR_FLAGS)" \
96 "CC=$(CC)" \
97 "CFLAGS=$(CFLAGS)" \
98 "RANLIB=$(RANLIB)" \
99 "LOADLIBES=$(LOADLIBES)" \
100 "LDFLAGS=$(LDFLAGS)" \
101 "BISON=$(BISON)" \
102 "LEX=$(LEX)" \
103 "MAKEINFO=$(MAKEINFO)" \
104 "INSTALL=$(INSTALL)" \
105 "INSTALL_DATA=$(INSTALL_DATA)" \
106 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
fecd2382 107
011d16ac
ILT
108RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
109 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
833c46e1
KR
110 fi`
111RUNTESTFLAGS=
c97b9003 112
efec4a28 113# use @target_cpu_type@ for refering to configured target name
ee5cb7fe 114IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
efec4a28
DP
115IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
116IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
117IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
118
fecd2382
RP
119# Lists of files for various purposes.
120
121REAL_SOURCES = \
122 $(srcdir)/app.c \
123 $(srcdir)/as.c \
124 $(srcdir)/atof-generic.c \
125 $(srcdir)/bignum-copy.c \
126 $(srcdir)/cond.c \
127 $(srcdir)/expr.c \
5d53038b 128 $(srcdir)/flonum-konst.c \
fecd2382
RP
129 $(srcdir)/flonum-copy.c \
130 $(srcdir)/flonum-mult.c \
131 $(srcdir)/frags.c \
132 $(srcdir)/hash.c \
fecd2382
RP
133 $(srcdir)/input-file.c \
134 $(srcdir)/input-scrub.c \
efec4a28 135 $(srcdir)/itbl-ops.c \
dffc8b9e 136 $(srcdir)/literal.c \
fecd2382
RP
137 $(srcdir)/messages.c \
138 $(srcdir)/output-file.c \
139 $(srcdir)/read.c \
fecd2382
RP
140 $(srcdir)/subsegs.c \
141 $(srcdir)/symbols.c \
fecd2382 142 $(srcdir)/write.c \
3340f7e5 143 $(srcdir)/listing.c \
9cc8106c 144 $(srcdir)/ecoff.c \
b63defaa 145 $(srcdir)/stabs.c
fecd2382
RP
146
147# in an expedient order
148LINKED_SOURCES = \
149 targ-cpu.c \
150 obj-format.c \
151 atof-targ.c
152
153SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
154
155REAL_HEADERS = \
156 $(srcdir)/as.h \
157 $(srcdir)/bignum.h \
158 $(srcdir)/expr.h \
159 $(srcdir)/flonum.h \
160 $(srcdir)/frags.h \
161 $(srcdir)/hash.h \
162 $(srcdir)/input-file.h \
efec4a28 163 $(srcdir)/itbl-ops.h \
542e1629 164 $(srcdir)/listing.h \
fecd2382
RP
165 $(srcdir)/tc.h \
166 $(srcdir)/obj.h \
167 $(srcdir)/read.h \
fecd2382
RP
168 $(srcdir)/struc-symbol.h \
169 $(srcdir)/subsegs.h \
170 $(srcdir)/symbols.h \
9cc8106c
ILT
171 $(srcdir)/write.h \
172 $(srcdir)/ecoff.h
fecd2382
RP
173
174LINKED_HEADERS = \
fecd2382
RP
175 targ-env.h \
176 targ-cpu.h \
177 obj-format.h \
ee5cb7fe 178 atof-targ.h
fecd2382
RP
179
180HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
181
7e047ac2
ILT
182TE_OBJS=
183
b11fb939 184# @target_frag@
b3cd8555 185
fecd2382
RP
186OBJS = \
187 targ-cpu.o \
188 obj-format.o \
189 atof-targ.o \
190 app.o \
191 as.o \
192 atof-generic.o \
193 bignum-copy.o \
194 cond.o \
195 expr.o \
5d53038b 196 flonum-konst.o \
fecd2382
RP
197 flonum-copy.o \
198 flonum-mult.o \
199 frags.o \
200 hash.o \
fecd2382
RP
201 input-file.o \
202 input-scrub.o \
dffc8b9e 203 literal.o \
fecd2382
RP
204 messages.o \
205 output-file.o \
206 read.o \
fecd2382
RP
207 subsegs.o \
208 symbols.o \
fecd2382 209 write.o \
3340f7e5 210 listing.o \
9cc8106c 211 ecoff.o \
c751ad19 212 stabs.o \
7e047ac2
ILT
213 sb.o \
214 macro.o \
816a827b 215 @extra_objects@ \
b3cd8555 216 $(TE_OBJS)
f6b67e4c 217
7e047ac2
ILT
218GASPOBJS = \
219 gasp.o \
220 macro.o \
221 sb.o \
222 hash.o
223
1df6e266 224all: .gdbinit as.new gasp.new
7420b02b
JL
225 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
226 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
79a54a5b 227
7420b02b
JL
228dvi info install-info clean-info:
229 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
230 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
fecd2382 231
c20c7506
JL
232make-gas.com: stamp-mk.com
233stamp-mk.com: vmsconf.sh Makefile
816a827b 234 sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
c20c7506
JL
235 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
236 touch stamp-mk.com
237
fecd2382
RP
238# Now figure out from those variables how to compile and link.
239
240# This is the variable actually used when we compile.
6ded6615 241ALL_CFLAGS = -D_GNU_SOURCE $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382 242
fecd2382
RP
243# How to link with both our special library facilities
244# and the system's installed libraries.
f6b67e4c 245
011d16ac 246LIBDEPS = @OPCODES_DEP@ @BFDDEP@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
b11fb939 247LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
fecd2382
RP
248
249# Specify the directories to be searched for header files.
250# Both . and srcdir are used, in that order,
251# so that tm.h and config.h will be found in the compilation
252# subdirectory rather than in the source directory.
816a827b 253INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
fecd2382
RP
254
255# Always use -I$(srcdir)/config when compiling.
256.c.o:
257 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
258
259# This tells GNU make version 3 not to export all the variables
260# defined in this file into the environment.
261.NOEXPORT:
542e1629 262
fecd2382 263# Files to be copied away after each stage in building.
c20c7506 264STAGESTUFF = *.o as.new gasp.new
fecd2382 265
b11fb939 266$(OBJS): @ALL_OBJ_DEPS@
c92d9ee9 267
011d16ac 268as.new: $(OBJS) $(LIBDEPS)
8ee90d35 269 $(HLDENV) $(CC) $(HLDFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 270
84951544
KR
271$(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \
272 struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \
034988c6 273 listing.h bignum.h $(srcdir)/../include/libiberty.h
b11fb939 274
138b11d8
ILT
275gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
276 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
a5a4b5ac 277
c97b9003
DZ
278installcheck:
279 @echo No installcheck target is available yet for the GNU assembler.
280
5f757edc
ILT
281site.exp: ./Makefile
282 @echo "Making a new config file..."
283 -@rm -f ./tmp?
284 @touch site.exp
285 -@mv site.exp site.bak
286 @echo "## these variables are automatically generated by make ##" > ./tmp0
287 @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
288 @echo "# do so in the last section." >> ./tmp0
289 @echo set host_os @host_os@ >> ./tmp0
290 @echo set host_alias @host_alias@ >> ./tmp0
291 @echo set host_cpu @host_cpu@ >> ./tmp0
292 @echo set host_vendor @host_vendor@ >> ./tmp0
293 @echo set target_os @target_os@ >> ./tmp0
294 @echo set target_alias @target_alias@ >> ./tmp0
295 @echo set target_cpu @target_cpu@ >> ./tmp0
296 @echo set target_vendor @target_vendor@ >> ./tmp0
297 @echo set host_triplet @host@ >> ./tmp0
298 @echo set target_triplet @target@ >> ./tmp0
299 @echo set target_canonical @target@ >> ./tmp0
b1986513 300 @echo set srcdir ${srcdir}/testsuite >> ./tmp0
5f757edc
ILT
301 @echo set exec_prefix ${exec_prefix} >> ./tmp0
302 @echo set objdir `pwd` >> ./tmp0
303 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
304 @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
305 @mv -f ./tmp0 site.exp
306
307check: site.exp
308 if [ -d testsuite ]; then \
309 true; \
310 else \
311 mkdir testsuite; \
312 fi
313 rm -f testsuite/site.exp
314 cp site.exp testsuite/site.exp
315 rootme=`pwd`; export rootme; \
316 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
1c94de4d
JM
317 $(RPATH_ENVVAR)=$$rootme/../bfd:$$rootme/../opcodes:$$$(RPATH_ENVVAR); \
318 export $(RPATH_ENVVAR); \
5f757edc
ILT
319 cd testsuite; \
320 EXPECT=${EXPECT} ; export EXPECT ; \
321 if [ -f $${rootme}/../expect/expect ] ; then \
322 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
323 export TCL_LIBRARY ; fi ; \
324 $(RUNTEST) --tool gas --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS)
787c6bfe 325
b11fb939 326config.status: configure
8ee90d35 327 $(SHELL) config.status --recheck
b11fb939 328
fc00f451 329config.h: config-stamp ; @true
b11fb939 330config-stamp: Makefile conf
fc00f451 331 -rm -f config.new config-stamp
1e84ff7e
KR
332 echo '/* config.h. Generated automatically by make. */' > config.new
333 echo '#ifndef GAS_VERSION' >> config.new
b11fb939
KR
334 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
335 echo '' >> config.new
336 cat conf >> config.new
337 echo '#endif /* GAS_VERSION */' >> config.new
fc00f451
KR
338 $(srcdir)/../move-if-change config.new config.h
339 touch config-stamp
340
fecd2382
RP
341# Compiling object files from source files.
342
833c46e1 343TARG_CPU_DEP_a29k =
1c94de4d 344TARG_CPU_DEP_alpha = $(srcdir)/../include/opcode/alpha.h subsegs.h
833c46e1 345# start-sanitize-arc
1c94de4d 346TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h subsegs.h
833c46e1 347# end-sanitize-arc
1c94de4d 348TARG_CPU_DEP_arm = subsegs.h
833c46e1
KR
349TARG_CPU_DEP_generic =
350TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
1c94de4d
JM
351TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h subsegs.h
352TARG_CPU_DEP_hppa = subsegs.h
353TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h subsegs.h
833c46e1
KR
354TARG_CPU_DEP_i860 =
355TARG_CPU_DEP_i960 =
a1c7c0f3 356TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
7e047ac2 357 $(srcdir)/config/m68k-parse.h subsegs.h
1c94de4d 358TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h subsegs.h
efec4a28 359TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h subsegs.h \
034988c6 360 $(srcdir)/config/itbl-mips.h $(srcdir)/itbl-ops.h
833c46e1 361TARG_CPU_DEP_ns32k =
1c94de4d
JM
362TARG_CPU_DEP_ppc = subsegs.h
363TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h subsegs.h
ef014e09 364TARG_CPU_DEP_sparc = subsegs.h $(srcdir)/../include/opcode/sparc.h
833c46e1
KR
365TARG_CPU_DEP_tahoe =
366TARG_CPU_DEP_vax =
1c94de4d 367TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h subsegs.h
833c46e1
KR
368TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
369
7e047ac2
ILT
370gasp.o : gasp.c sb.h macro.h config.h
371sb.o : sb.c sb.h config.h
372macro.o : macro.c macro.h sb.h hash.h config.h
84951544 373app.o : app.c write.h
7e047ac2 374as.o : as.c output-file.h write.h subsegs.h sb.h macro.h
84951544
KR
375atof-generic.o : atof-generic.c
376bignum-copy.o : bignum-copy.c
377cond.o : cond.c
378debug.o : debug.c subsegs.h
379expr.o : expr.c
380flonum-konst.o : flonum-konst.c
381flonum-copy.o : flonum-copy.c
382flonum-mult.o : flonum-mult.c
383frags.o : frags.c subsegs.h
384hash.o : hash.c
84951544 385input-file.o : input-file.c input-file.h
7e047ac2 386input-scrub.o : input-scrub.c input-file.h sb.h
84951544
KR
387listing.o : listing.c input-file.h subsegs.h
388literal.o : literal.c subsegs.h
389messages.o : messages.c
390output-file.o : output-file.c output-file.h
7e047ac2 391read.o : read.c sb.h macro.h
84951544
KR
392subsegs.o : subsegs.c subsegs.h
393symbols.o : symbols.c subsegs.h
394write.o : write.c subsegs.h output-file.h
395ecoff.o : ecoff.c ecoff.h \
396 $(srcdir)/../include/coff/internal.h $(srcdir)/../include/coff/sym.h \
397 $(srcdir)/../include/coff/ecoff.h \
398 $(srcdir)/../include/coff/symconst.h \
399 $(srcdir)/../include/aout/stab_gnu.h
400stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h
401atof-targ.o : atof-targ.c
402obj-format.o : obj-format.c
efec4a28 403targ-cpu.o : targ-cpu.c $(TARG_CPU_DEP_@target_cpu_type@) $(IT_HDRS)
d1a9e594 404
816a827b
ILT
405obj-elf.o : $(srcdir)/config/obj-elf.c
406 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
407obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
408 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
034988c6
ILT
409obj-coff.o: $(srcdir)/config/obj-coff.c
410 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-coff.c
816a827b
ILT
411
412e-mipself.o : $(srcdir)/config/e-mipself.c
413 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
414e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
415 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
034988c6
ILT
416e-i386coff.o: $(srcdir)/config/e-i386coff.c
417 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386coff.c
418e-i386elf.o: $(srcdir)/config/e-i386elf.c
419 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386elf.c
816a827b 420
a1c7c0f3
ILT
421# The m68k operand parser.
422
423m68k-parse.c: $(srcdir)/config/m68k-parse.y
424 $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
425 mv -f y.tab.c m68k-parse.c
336435bc 426m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
a1c7c0f3 427
efec4a28
DP
428
429# The instruction table specification lexical analyzer and parser.
430
431itbl-cpu.h : $(srcdir)/config/itbl-@target_cpu_type@.h
432itbl-parse.h : $(srcdir)/itbl-parse.y
433itbl-parse.c : $(srcdir)/itbl-parse.y
434itbl-lex.c : $(srcdir)/itbl-lex.l
435
436itbl-lex.c: $(srcdir)/itbl-lex.l
437 $(LEX) $(LEXFLAGS) $(srcdir)/itbl-lex.l
438 mv -f lex.yy.c itbl-lex.c
439
034988c6 440itbl-lex.o: itbl-lex.c itbl-parse.h
ee5cb7fe 441 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-lex.c
efec4a28
DP
442
443itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
ef014e09 444 $(BISON) -d $(BISONFLAGS) $(srcdir)/itbl-parse.y
efec4a28
DP
445 mv -f y.tab.c itbl-parse.c
446 mv -f y.tab.h itbl-parse.h
447
ee5cb7fe
ILT
448itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
449 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-parse.c
efec4a28 450
034988c6 451itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
efec4a28
DP
452 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
453
f9f0539f 454# stand-alone itbl assembler & disassembler
efec4a28 455itbl-test-ops.o: $(srcdir)/itbl-ops.c \
ee5cb7fe 456 $(srcdir)/itbl-ops.h itbl-parse.h
efec4a28
DP
457 $(CC) -o itbl-test-ops.o -DSTAND_ALONE -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
458
ee5cb7fe 459itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
f9f0539f
DP
460 $(CC) -c -DSTAND_ALONE $(ALL_CFLAGS) $(INCLUDES)\
461 $(srcdir)/testsuite/gas/all/itbl-test.c
efec4a28
DP
462
463IT_TEST_OBJS= itbl-parse.o itbl-lex.o itbl-test-ops.o
464itbl-test: $(IT_TEST_OBJS) itbl-test.o $(LIBDEPS)
465 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o itbl-test itbl-test.o $(IT_TEST_OBJS) $(LIBS)
466
467# target itbl definitions for configuring coprocessor itbl support.
468# configure should have taken care of this for us...
469itbl-cpu.h: $(srcdir)/config/itbl-@target_cpu_type@.h
470 ln -s $(srcdir)/config/itbl-@target_cpu_type@.h itbl-cpu.h
471
472
fecd2382
RP
473# Remake the info files.
474
921faa52 475doc: $(srcdir)/as.info
fecd2382 476
921faa52 477$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
c97b9003 478 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
fecd2382 479
b1986513 480diststuff: $(DISTSTUFF) info
367d6244 481
7420b02b 482clean-here:
f2889110 483 -rm -f $(STAGESTUFF) core stamp-mk.com
b1986513
KR
484 -rm -f testsuite/*.o testsuite/*.out \
485 testsuite/gas.log testsuite/gas.sum testsuite/site.exp
fecd2382 486
daa7e184
ILT
487clean mostlyclean: clean-here
488 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 489
fecd2382 490# Like clean but also delete the links made to configure gas.
011d16ac
ILT
491
492DISTCLEAN_HERE = config.status Makefile targ-env.h targ-cpu.h \
493 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
efec4a28 494 atof-targ.h itbl-cpu.h \
011d16ac
ILT
495 config-stamp config.h conf config.log config.cache .gdbinit \
496 testsuite/Makefile testsuite/config.status
497
367d6244 498distclean: clean-here
daa7e184 499 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
011d16ac
ILT
500 -rm -f $(DISTCLEAN_HERE)
501
502maintainer-clean realclean: clean-here
6b0a6eaa
KR
503 @echo "This command is intended for maintainers to use;"
504 @echo "it deletes files that may require special tools to rebuild."
011d16ac
ILT
505 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
506 -rm -rf $(DISTCLEAN_HERE) $(DISTSTUFF)
542e1629 507
fecd2382
RP
508# Entry points `install', `includes' and `uninstall'.
509
510# Copy the files into directories where they will be run.
542e1629 511install:
7420b02b 512 srcroot=`cd $(srcroot); pwd`; export srcroot; \
c97b9003 513 $(INSTALL_XFORM) as.new $(bindir)/as; \
7420b02b 514 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
1c94de4d
JM
515 test -d $(tooldir) || mkdir $(tooldir); \
516 test -d $(tooldir)/bin || mkdir $(tooldir)/bin; \
28d3e4a3 517 n=`echo as | sed '$(program_transform_name)'`; \
1c94de4d
JM
518 rm -f $(tooldir)/bin/as; \
519 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
520 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as
a5a4b5ac 521 srcroot=`cd $(srcroot); pwd`; export srcroot; \
138b11d8 522 $(INSTALL_XFORM) gasp.new $(bindir)/gasp
fecd2382 523
fecd2382
RP
524# Cancel installation by deleting the installed files.
525uninstall:
fa156ffe 526 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
7e10f53c
ILT
527 rm -f $(bindir)/$$n; \
528 rm -f $(mandir)/$$n.1
fa156ffe 529 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac 530 rm -f $(bindir)/$$n; \
542e1629 531
fecd2382
RP
532# These exist for maintenance purposes.
533
534tags TAGS: force
787c6bfe 535 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
ac7f7dfe 536
542e1629 537bootstrap: as.new force
fecd2382 538 $(MAKE) stage1
3256c4b5
KR
539 rm -f stage && ln -s stage1 stage
540 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 541 $(MAKE) stage2
3256c4b5
KR
542 rm -f stage && ln -s stage2 stage
543 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 544 $(MAKE) comparison against=stage2
fecd2382
RP
545
546bootstrap2: force
3256c4b5
KR
547 rm -f stage && ln -s stage1 stage
548 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 549 $(MAKE) stage2
3256c4b5
KR
550 rm -f stage && ln -s stage2 stage
551 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
da0b2bff 552 $(MAKE) comparison against=stage2
fecd2382
RP
553
554bootstrap3: force
3256c4b5
KR
555 rm -f stage && ln -s stage2 stage
556 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 557 $(MAKE) comparison against=stage2
fecd2382
RP
558
559# Copy the object files from a particular stage into a subdirectory.
560stage1: force
561 -mkdir stage1
562 -mv $(STAGESTUFF) stage1
81f73963 563 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
564
565stage2: force
566 -mkdir stage2
567 -mv $(STAGESTUFF) stage2
81f73963 568 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
569
570stage3: force
571 -mkdir stage3
6a3958b2 572 -mv $(STAGESTUFF) stage3
81f73963 573 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 574
a01bf1fb
RP
575against=stage2
576
f2889110
KR
577# This rule is derived from corresponding code in the Makefile.in for gcc.
578# The "tail +16c" is to bypass headers which may include timestamps or
579# temporary assembly file names.
a01bf1fb 580comparison: force
f2889110 581 x=0 ; \
6b0a6eaa 582 for file in *.o ; do \
f2889110
KR
583 tail +16c ./$$file > tmp-foo1; \
584 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
585 if cmp tmp-foo1 tmp-foo2 ; then \
586 true ; \
587 else \
588 echo $$file differs ; \
589 x=1 ; \
590 fi ; \
591 else true; fi ; \
592 done ; \
593 exit $$x
594 -rm -f tmp-foo*
a01bf1fb 595
6a3958b2 596de-stage1: force
b3cd8555 597 - (cd stage1 ; rm -f as ; mv -f * ..)
6a3958b2
RP
598 - rmdir stage1
599
600de-stage2: force
b3cd8555 601 - (cd stage2 ; rm -f as ; mv -f * ..)
6a3958b2
RP
602 - rmdir stage2
603
604de-stage3: force
b3cd8555 605 - (cd stage3 ; rm -f as ; mv -f * ..)
6a3958b2 606 - rmdir stage3
fecd2382 607
fecd2382 608#In GNU Make, ignore whether `stage*' exists.
daa7e184
ILT
609.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
610.PHONY: TAGS bootstrap
fecd2382
RP
611
612force:
613
fc00f451 614Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
a1c7c0f3 615 $(srcdir)/configure.in config.status conf.in
a26878d1 616 $(SHELL) ./config.status
1df6e266
KR
617.gdbinit: $(srcdir)/gdbinit.in config.status
618 $(SHELL) ./config.status
This page took 0.221625 seconds and 4 git commands to generate.