Make # a line comment character
[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
949f1310
ILT
113TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
114TARG_CPU_O = tc-@target_cpu_type@.o
115TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h
116OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c
117OBJ_FORMAT_O = obj-@obj_format@.o
118OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
119TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
120ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
121ATOF_TARG_O = atof-@atof@.o
122
efec4a28 123# use @target_cpu_type@ for refering to configured target name
ee5cb7fe 124IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
efec4a28
DP
125IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
126IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
127IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
128
fecd2382
RP
129# Lists of files for various purposes.
130
949f1310 131SOURCES = \
fecd2382
RP
132 $(srcdir)/app.c \
133 $(srcdir)/as.c \
134 $(srcdir)/atof-generic.c \
135 $(srcdir)/bignum-copy.c \
136 $(srcdir)/cond.c \
137 $(srcdir)/expr.c \
5d53038b 138 $(srcdir)/flonum-konst.c \
fecd2382
RP
139 $(srcdir)/flonum-copy.c \
140 $(srcdir)/flonum-mult.c \
141 $(srcdir)/frags.c \
142 $(srcdir)/hash.c \
fecd2382
RP
143 $(srcdir)/input-file.c \
144 $(srcdir)/input-scrub.c \
efec4a28 145 $(srcdir)/itbl-ops.c \
dffc8b9e 146 $(srcdir)/literal.c \
fecd2382
RP
147 $(srcdir)/messages.c \
148 $(srcdir)/output-file.c \
149 $(srcdir)/read.c \
fecd2382
RP
150 $(srcdir)/subsegs.c \
151 $(srcdir)/symbols.c \
fecd2382 152 $(srcdir)/write.c \
3340f7e5 153 $(srcdir)/listing.c \
9cc8106c 154 $(srcdir)/ecoff.c \
b63defaa 155 $(srcdir)/stabs.c
fecd2382 156
949f1310 157HEADERS = \
fecd2382
RP
158 $(srcdir)/as.h \
159 $(srcdir)/bignum.h \
160 $(srcdir)/expr.h \
161 $(srcdir)/flonum.h \
162 $(srcdir)/frags.h \
163 $(srcdir)/hash.h \
164 $(srcdir)/input-file.h \
efec4a28 165 $(srcdir)/itbl-ops.h \
542e1629 166 $(srcdir)/listing.h \
fecd2382
RP
167 $(srcdir)/tc.h \
168 $(srcdir)/obj.h \
169 $(srcdir)/read.h \
fecd2382
RP
170 $(srcdir)/struc-symbol.h \
171 $(srcdir)/subsegs.h \
172 $(srcdir)/symbols.h \
9cc8106c
ILT
173 $(srcdir)/write.h \
174 $(srcdir)/ecoff.h
fecd2382 175
7e047ac2
ILT
176TE_OBJS=
177
b11fb939 178# @target_frag@
b3cd8555 179
fecd2382 180OBJS = \
949f1310
ILT
181 $(TARG_CPU_O) \
182 $(OBJ_FORMAT_O) \
183 $(ATOF_TARG_O) \
fecd2382
RP
184 app.o \
185 as.o \
186 atof-generic.o \
187 bignum-copy.o \
188 cond.o \
189 expr.o \
5d53038b 190 flonum-konst.o \
fecd2382
RP
191 flonum-copy.o \
192 flonum-mult.o \
193 frags.o \
194 hash.o \
fecd2382
RP
195 input-file.o \
196 input-scrub.o \
dffc8b9e 197 literal.o \
fecd2382
RP
198 messages.o \
199 output-file.o \
200 read.o \
fecd2382
RP
201 subsegs.o \
202 symbols.o \
fecd2382 203 write.o \
3340f7e5 204 listing.o \
9cc8106c 205 ecoff.o \
c751ad19 206 stabs.o \
7e047ac2
ILT
207 sb.o \
208 macro.o \
816a827b 209 @extra_objects@ \
b3cd8555 210 $(TE_OBJS)
f6b67e4c 211
7e047ac2
ILT
212GASPOBJS = \
213 gasp.o \
214 macro.o \
215 sb.o \
216 hash.o
217
1df6e266 218all: .gdbinit as.new gasp.new
7420b02b
JL
219 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
220 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
79a54a5b 221
7420b02b
JL
222dvi info install-info clean-info:
223 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
224 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
fecd2382 225
c20c7506
JL
226make-gas.com: stamp-mk.com
227stamp-mk.com: vmsconf.sh Makefile
816a827b 228 sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
c20c7506
JL
229 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
230 touch stamp-mk.com
231
fecd2382
RP
232# Now figure out from those variables how to compile and link.
233
234# This is the variable actually used when we compile.
6ded6615 235ALL_CFLAGS = -D_GNU_SOURCE $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382 236
fecd2382
RP
237# How to link with both our special library facilities
238# and the system's installed libraries.
f6b67e4c 239
011d16ac 240LIBDEPS = @OPCODES_DEP@ @BFDDEP@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
b11fb939 241LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
fecd2382
RP
242
243# Specify the directories to be searched for header files.
244# Both . and srcdir are used, in that order,
245# so that tm.h and config.h will be found in the compilation
246# subdirectory rather than in the source directory.
816a827b 247INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. -I$(srcdir)/../bfd
fecd2382
RP
248
249# Always use -I$(srcdir)/config when compiling.
250.c.o:
251 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
252
253# This tells GNU make version 3 not to export all the variables
254# defined in this file into the environment.
255.NOEXPORT:
542e1629 256
fecd2382 257# Files to be copied away after each stage in building.
c20c7506 258STAGESTUFF = *.o as.new gasp.new
fecd2382 259
b11fb939 260$(OBJS): @ALL_OBJ_DEPS@
c92d9ee9 261
011d16ac 262as.new: $(OBJS) $(LIBDEPS)
8ee90d35 263 $(HLDENV) $(CC) $(HLDFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 264
949f1310
ILT
265$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
266 expr.h struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h \
267 obj.h listing.h bignum.h $(srcdir)/../include/libiberty.h
b11fb939 268
138b11d8
ILT
269gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
270 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
a5a4b5ac 271
c97b9003
DZ
272installcheck:
273 @echo No installcheck target is available yet for the GNU assembler.
274
5f757edc
ILT
275site.exp: ./Makefile
276 @echo "Making a new config file..."
277 -@rm -f ./tmp?
278 @touch site.exp
279 -@mv site.exp site.bak
280 @echo "## these variables are automatically generated by make ##" > ./tmp0
281 @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
282 @echo "# do so in the last section." >> ./tmp0
283 @echo set host_os @host_os@ >> ./tmp0
284 @echo set host_alias @host_alias@ >> ./tmp0
285 @echo set host_cpu @host_cpu@ >> ./tmp0
286 @echo set host_vendor @host_vendor@ >> ./tmp0
287 @echo set target_os @target_os@ >> ./tmp0
288 @echo set target_alias @target_alias@ >> ./tmp0
289 @echo set target_cpu @target_cpu@ >> ./tmp0
290 @echo set target_vendor @target_vendor@ >> ./tmp0
291 @echo set host_triplet @host@ >> ./tmp0
292 @echo set target_triplet @target@ >> ./tmp0
293 @echo set target_canonical @target@ >> ./tmp0
b1986513 294 @echo set srcdir ${srcdir}/testsuite >> ./tmp0
5f757edc
ILT
295 @echo set exec_prefix ${exec_prefix} >> ./tmp0
296 @echo set objdir `pwd` >> ./tmp0
297 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
298 @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
299 @mv -f ./tmp0 site.exp
300
301check: site.exp
302 if [ -d testsuite ]; then \
303 true; \
304 else \
305 mkdir testsuite; \
306 fi
307 rm -f testsuite/site.exp
308 cp site.exp testsuite/site.exp
309 rootme=`pwd`; export rootme; \
310 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
1c94de4d
JM
311 $(RPATH_ENVVAR)=$$rootme/../bfd:$$rootme/../opcodes:$$$(RPATH_ENVVAR); \
312 export $(RPATH_ENVVAR); \
5f757edc
ILT
313 cd testsuite; \
314 EXPECT=${EXPECT} ; export EXPECT ; \
315 if [ -f $${rootme}/../expect/expect ] ; then \
316 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
317 export TCL_LIBRARY ; fi ; \
318 $(RUNTEST) --tool gas --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS)
787c6bfe 319
b11fb939 320config.status: configure
8ee90d35 321 $(SHELL) config.status --recheck
b11fb939 322
fc00f451 323config.h: config-stamp ; @true
b11fb939 324config-stamp: Makefile conf
fc00f451 325 -rm -f config.new config-stamp
1e84ff7e
KR
326 echo '/* config.h. Generated automatically by make. */' > config.new
327 echo '#ifndef GAS_VERSION' >> config.new
b11fb939
KR
328 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
329 echo '' >> config.new
330 cat conf >> config.new
331 echo '#endif /* GAS_VERSION */' >> config.new
fc00f451
KR
332 $(srcdir)/../move-if-change config.new config.h
333 touch config-stamp
334
fecd2382
RP
335# Compiling object files from source files.
336
833c46e1 337TARG_CPU_DEP_a29k =
9591ad40
ILT
338TARG_CPU_DEP_alpha = $(srcdir)/../include/opcode/alpha.h subsegs.h \
339 $(srcdir)/../include/obstack.h
833c46e1 340# start-sanitize-arc
9591ad40
ILT
341TARG_CPU_DEP_arc = $(srcdir)/../include/opcode/arc.h subsegs.h \
342 $(srcdir)/../include/obstack.h
833c46e1 343# end-sanitize-arc
9591ad40 344TARG_CPU_DEP_arm = subsegs.h $(srcdir)/../include/obstack.h
833c46e1
KR
345TARG_CPU_DEP_generic =
346TARG_CPU_DEP_h8300 = $(srcdir)/../include/opcode/h8300.h
9591ad40
ILT
347TARG_CPU_DEP_h8500 = $(srcdir)/../opcodes/h8500-opc.h subsegs.h \
348 $(srcdir)/../include/obstack.h
349TARG_CPU_DEP_hppa = subsegs.h $(srcdir)/../include/obstack.h
350TARG_CPU_DEP_i386 = $(srcdir)/../include/opcode/i386.h subsegs.h \
351 $(srcdir)/../include/obstack.h
833c46e1
KR
352TARG_CPU_DEP_i860 =
353TARG_CPU_DEP_i960 =
a1c7c0f3 354TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \
9591ad40
ILT
355 $(srcdir)/config/m68k-parse.h subsegs.h \
356 $(srcdir)/../include/obstack.h
357TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h subsegs.h \
358 $(srcdir)/../include/obstack.h
359TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h subsegs.h \
360 $(srcdir)/../include/obstack.h \
034988c6 361 $(srcdir)/config/itbl-mips.h $(srcdir)/itbl-ops.h
833c46e1 362TARG_CPU_DEP_ns32k =
9591ad40
ILT
363TARG_CPU_DEP_ppc = subsegs.h $(srcdir)/../include/obstack.h
364TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h subsegs.h \
365 $(srcdir)/../include/obstack.h
366TARG_CPU_DEP_sparc = subsegs.h $(srcdir)/../include/opcode/sparc.h \
367 $(srcdir)/../include/obstack.h
833c46e1
KR
368TARG_CPU_DEP_tahoe =
369TARG_CPU_DEP_vax =
9591ad40
ILT
370TARG_CPU_DEP_w65 = $(srcdir)/../opcodes/w65-opc.h subsegs.h \
371 $(srcdir)/../include/obstack.h
833c46e1
KR
372TARG_CPU_DEP_z8k = $(srcdir)/../opcodes/z8k-opc.h
373
949f1310
ILT
374# The implicit .c.o rule doesn't work here, perhaps because of the
375# variables, or perhaps because the sources are not on vpath.
376$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@)
377 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARG_CPU_C)
378$(OBJ_FORMAT_O): $(OBJ_FORMAT_C)
379 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(OBJ_FORMAT_C)
380$(ATOF_TARG_O): $(ATOF_TARG_C)
381 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(ATOF_TARG_C)
382
7e047ac2
ILT
383gasp.o : gasp.c sb.h macro.h config.h
384sb.o : sb.c sb.h config.h
385macro.o : macro.c macro.h sb.h hash.h config.h
84951544 386app.o : app.c write.h
9591ad40
ILT
387as.o : as.c output-file.h write.h subsegs.h sb.h macro.h \
388 $(srcdir)/../include/obstack.h
84951544
KR
389atof-generic.o : atof-generic.c
390bignum-copy.o : bignum-copy.c
9591ad40
ILT
391cond.o : cond.c $(srcdir)/../include/obstack.h
392debug.o : debug.c subsegs.h $(srcdir)/../include/obstack.h
393expr.o : expr.c $(srcdir)/../include/obstack.h
84951544
KR
394flonum-konst.o : flonum-konst.c
395flonum-copy.o : flonum-copy.c
396flonum-mult.o : flonum-mult.c
9591ad40 397frags.o : frags.c subsegs.h $(srcdir)/../include/obstack.h
84951544 398hash.o : hash.c
84951544 399input-file.o : input-file.c input-file.h
7e047ac2 400input-scrub.o : input-scrub.c input-file.h sb.h
9591ad40
ILT
401listing.o : listing.c input-file.h subsegs.h $(srcdir)/../include/obstack.h
402literal.o : literal.c subsegs.h $(srcdir)/../include/obstack.h
84951544
KR
403messages.o : messages.c
404output-file.o : output-file.c output-file.h
9591ad40
ILT
405read.o : read.c sb.h macro.h $(srcdir)/../include/obstack.h
406subsegs.o : subsegs.c subsegs.h $(srcdir)/../include/obstack.h
407symbols.o : symbols.c subsegs.h $(srcdir)/../include/obstack.h
408write.o : write.c subsegs.h output-file.h $(srcdir)/../include/obstack.h
84951544
KR
409ecoff.o : ecoff.c ecoff.h \
410 $(srcdir)/../include/coff/internal.h $(srcdir)/../include/coff/sym.h \
411 $(srcdir)/../include/coff/ecoff.h \
412 $(srcdir)/../include/coff/symconst.h \
413 $(srcdir)/../include/aout/stab_gnu.h
9591ad40
ILT
414stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h \
415 $(srcdir)/../include/obstack.h
d1a9e594 416
816a827b
ILT
417obj-elf.o : $(srcdir)/config/obj-elf.c
418 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
419obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
420 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
034988c6
ILT
421obj-coff.o: $(srcdir)/config/obj-coff.c
422 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-coff.c
816a827b
ILT
423
424e-mipself.o : $(srcdir)/config/e-mipself.c
425 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
426e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
427 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
034988c6
ILT
428e-i386coff.o: $(srcdir)/config/e-i386coff.c
429 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386coff.c
430e-i386elf.o: $(srcdir)/config/e-i386elf.c
431 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386elf.c
816a827b 432
a1c7c0f3
ILT
433# The m68k operand parser.
434
29bc322d
ILT
435# Depend upon itbl-parse.c to serialize a parallel make.
436m68k-parse.c: $(srcdir)/config/m68k-parse.y itbl-parse.c
a1c7c0f3
ILT
437 $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
438 mv -f y.tab.c m68k-parse.c
336435bc 439m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
a1c7c0f3 440
efec4a28
DP
441# The instruction table specification lexical analyzer and parser.
442
efec4a28
DP
443itbl-parse.h : $(srcdir)/itbl-parse.y
444itbl-parse.c : $(srcdir)/itbl-parse.y
445itbl-lex.c : $(srcdir)/itbl-lex.l
446
447itbl-lex.c: $(srcdir)/itbl-lex.l
448 $(LEX) $(LEXFLAGS) $(srcdir)/itbl-lex.l
449 mv -f lex.yy.c itbl-lex.c
450
034988c6 451itbl-lex.o: itbl-lex.c itbl-parse.h
ee5cb7fe 452 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-lex.c
efec4a28 453
29bc322d 454itbl-parse.c: $(srcdir)/itbl-parse.y
ef014e09 455 $(BISON) -d $(BISONFLAGS) $(srcdir)/itbl-parse.y
efec4a28
DP
456 mv -f y.tab.c itbl-parse.c
457 mv -f y.tab.h itbl-parse.h
458
29bc322d
ILT
459itbl-parse.h: itbl-parse.c
460
ee5cb7fe
ILT
461itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
462 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-parse.c
efec4a28 463
034988c6 464itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
efec4a28
DP
465 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
466
f9f0539f 467# stand-alone itbl assembler & disassembler
efec4a28 468itbl-test-ops.o: $(srcdir)/itbl-ops.c \
ee5cb7fe 469 $(srcdir)/itbl-ops.h itbl-parse.h
efec4a28
DP
470 $(CC) -o itbl-test-ops.o -DSTAND_ALONE -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
471
ee5cb7fe 472itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
f9f0539f
DP
473 $(CC) -c -DSTAND_ALONE $(ALL_CFLAGS) $(INCLUDES)\
474 $(srcdir)/testsuite/gas/all/itbl-test.c
efec4a28
DP
475
476IT_TEST_OBJS= itbl-parse.o itbl-lex.o itbl-test-ops.o
477itbl-test: $(IT_TEST_OBJS) itbl-test.o $(LIBDEPS)
478 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o itbl-test itbl-test.o $(IT_TEST_OBJS) $(LIBS)
479
fecd2382
RP
480# Remake the info files.
481
921faa52 482doc: $(srcdir)/as.info
fecd2382 483
921faa52 484$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
c97b9003 485 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
fecd2382 486
b1986513 487diststuff: $(DISTSTUFF) info
367d6244 488
7420b02b 489clean-here:
f2889110 490 -rm -f $(STAGESTUFF) core stamp-mk.com
b1986513
KR
491 -rm -f testsuite/*.o testsuite/*.out \
492 testsuite/gas.log testsuite/gas.sum testsuite/site.exp
fecd2382 493
daa7e184
ILT
494clean mostlyclean: clean-here
495 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 496
fecd2382 497# Like clean but also delete the links made to configure gas.
011d16ac 498
949f1310
ILT
499DISTCLEAN_HERE = config.status Makefile targ-env.h targ-cpu.h obj-format.h \
500 TAGS itbl-cpu.h \
011d16ac
ILT
501 config-stamp config.h conf config.log config.cache .gdbinit \
502 testsuite/Makefile testsuite/config.status
503
367d6244 504distclean: clean-here
daa7e184 505 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
011d16ac
ILT
506 -rm -f $(DISTCLEAN_HERE)
507
508maintainer-clean realclean: clean-here
6b0a6eaa
KR
509 @echo "This command is intended for maintainers to use;"
510 @echo "it deletes files that may require special tools to rebuild."
011d16ac
ILT
511 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
512 -rm -rf $(DISTCLEAN_HERE) $(DISTSTUFF)
542e1629 513
fecd2382
RP
514# Entry points `install', `includes' and `uninstall'.
515
516# Copy the files into directories where they will be run.
542e1629 517install:
7420b02b 518 srcroot=`cd $(srcroot); pwd`; export srcroot; \
c97b9003 519 $(INSTALL_XFORM) as.new $(bindir)/as; \
7420b02b 520 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
1c94de4d
JM
521 test -d $(tooldir) || mkdir $(tooldir); \
522 test -d $(tooldir)/bin || mkdir $(tooldir)/bin; \
28d3e4a3 523 n=`echo as | sed '$(program_transform_name)'`; \
1c94de4d
JM
524 rm -f $(tooldir)/bin/as; \
525 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
526 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as
a5a4b5ac 527 srcroot=`cd $(srcroot); pwd`; export srcroot; \
138b11d8 528 $(INSTALL_XFORM) gasp.new $(bindir)/gasp
fecd2382 529
fecd2382
RP
530# Cancel installation by deleting the installed files.
531uninstall:
fa156ffe 532 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
7e10f53c
ILT
533 rm -f $(bindir)/$$n; \
534 rm -f $(mandir)/$$n.1
fa156ffe 535 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac 536 rm -f $(bindir)/$$n; \
542e1629 537
fecd2382
RP
538# These exist for maintenance purposes.
539
540tags TAGS: force
787c6bfe 541 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
ac7f7dfe 542
542e1629 543bootstrap: as.new force
fecd2382 544 $(MAKE) stage1
3256c4b5
KR
545 rm -f stage && ln -s stage1 stage
546 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 547 $(MAKE) stage2
3256c4b5
KR
548 rm -f stage && ln -s stage2 stage
549 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 550 $(MAKE) comparison against=stage2
fecd2382
RP
551
552bootstrap2: force
3256c4b5
KR
553 rm -f stage && ln -s stage1 stage
554 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 555 $(MAKE) stage2
3256c4b5
KR
556 rm -f stage && ln -s stage2 stage
557 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
da0b2bff 558 $(MAKE) comparison against=stage2
fecd2382
RP
559
560bootstrap3: force
3256c4b5
KR
561 rm -f stage && ln -s stage2 stage
562 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 563 $(MAKE) comparison against=stage2
fecd2382
RP
564
565# Copy the object files from a particular stage into a subdirectory.
566stage1: force
567 -mkdir stage1
568 -mv $(STAGESTUFF) stage1
81f73963 569 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
570
571stage2: force
572 -mkdir stage2
573 -mv $(STAGESTUFF) stage2
81f73963 574 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
575
576stage3: force
577 -mkdir stage3
6a3958b2 578 -mv $(STAGESTUFF) stage3
81f73963 579 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 580
a01bf1fb
RP
581against=stage2
582
f2889110
KR
583# This rule is derived from corresponding code in the Makefile.in for gcc.
584# The "tail +16c" is to bypass headers which may include timestamps or
585# temporary assembly file names.
a01bf1fb 586comparison: force
f2889110 587 x=0 ; \
6b0a6eaa 588 for file in *.o ; do \
f2889110
KR
589 tail +16c ./$$file > tmp-foo1; \
590 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
591 if cmp tmp-foo1 tmp-foo2 ; then \
592 true ; \
593 else \
594 echo $$file differs ; \
595 x=1 ; \
596 fi ; \
597 else true; fi ; \
598 done ; \
599 exit $$x
600 -rm -f tmp-foo*
a01bf1fb 601
6a3958b2 602de-stage1: force
b3cd8555 603 - (cd stage1 ; rm -f as ; mv -f * ..)
6a3958b2
RP
604 - rmdir stage1
605
606de-stage2: force
b3cd8555 607 - (cd stage2 ; rm -f as ; mv -f * ..)
6a3958b2
RP
608 - rmdir stage2
609
610de-stage3: force
b3cd8555 611 - (cd stage3 ; rm -f as ; mv -f * ..)
6a3958b2 612 - rmdir stage3
fecd2382 613
fecd2382 614#In GNU Make, ignore whether `stage*' exists.
daa7e184
ILT
615.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
616.PHONY: TAGS bootstrap
fecd2382
RP
617
618force:
619
fc00f451 620Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
a1c7c0f3 621 $(srcdir)/configure.in config.status conf.in
a26878d1 622 $(SHELL) ./config.status
1df6e266
KR
623.gdbinit: $(srcdir)/gdbinit.in config.status
624 $(SHELL) ./config.status
This page took 0.378969 seconds and 4 git commands to generate.