changes from Minh Tran-Le <TRANLE@INTELLICORP.COM> to support i386
[deliverable/binutils-gdb.git] / gas / Makefile.in
CommitLineData
fecd2382 1# Makefile for GNU Assembler
79a54a5b 2# Copyright (C) 1987-1992 Free Software Foundation, Inc.
fecd2382
RP
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
1058238c 8#the Free Software Foundation; either version 2, or (at your option)
fecd2382
RP
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, 675 Mass Ave, Cambridge, MA 02139, USA.
19
fecd2382
RP
20# The targets for external use include:
21# all, doc, proto, install, uninstall, includes, TAGS,
22# clean, cleanconfig, 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
1058238c
RP
27srcdir = .
28
29prefix = /usr/local
30
31bindir = $(prefix)/bin
32datadir = $(prefix)/lib
33libdir = $(prefix)/lib
34mandir = $(datadir)/man
35man1dir = $(mandir)/man1
36man2dir = $(mandir)/man2
37man3dir = $(mandir)/man3
38man4dir = $(mandir)/man4
39man5dir = $(mandir)/man5
40man6dir = $(mandir)/man6
41man7dir = $(mandir)/man7
42man8dir = $(mandir)/man8
43man9dir = $(mandir)/man9
3340f7e5 44infodir = $(datadir)/info
1058238c
RP
45includedir = $(prefix)/include
46docdir = $(datadir)/doc
47
fecd2382 48SHELL = /bin/sh
1058238c 49
fecd2382 50INSTALL = install -c
fecd2382 51INSTALL_PROGRAM = $(INSTALL)
1058238c 52INSTALL_DATA = $(INSTALL)
fecd2382 53
1058238c
RP
54AR = ar
55AR_FLAGS = qv
56BISON = bison
57MAKEINFO = makeinfo
fecd2382 58RANLIB = ranlib
6d5460ab 59MINUS_G = -g
fecd2382 60
fecd2382
RP
61# Lists of files for various purposes.
62
63REAL_SOURCES = \
64 $(srcdir)/app.c \
65 $(srcdir)/as.c \
66 $(srcdir)/atof-generic.c \
67 $(srcdir)/bignum-copy.c \
68 $(srcdir)/cond.c \
69 $(srcdir)/expr.c \
70 $(srcdir)/flonum-const.c \
71 $(srcdir)/flonum-copy.c \
72 $(srcdir)/flonum-mult.c \
73 $(srcdir)/frags.c \
74 $(srcdir)/hash.c \
75 $(srcdir)/hex-value.c \
76 $(srcdir)/input-file.c \
77 $(srcdir)/input-scrub.c \
78 $(srcdir)/messages.c \
542e1629 79 $(srcdir)/obstack.c \
fecd2382
RP
80 $(srcdir)/output-file.c \
81 $(srcdir)/read.c \
542e1629 82 $(srcdir)/strerror.c \
fecd2382
RP
83 $(srcdir)/strstr.c \
84 $(srcdir)/subsegs.c \
85 $(srcdir)/symbols.c \
86 $(srcdir)/version.c \
87 $(srcdir)/write.c \
3340f7e5 88 $(srcdir)/listing.c \
fecd2382
RP
89 $(srcdir)/xmalloc.c \
90 $(srcdir)/xrealloc.c
91
92# in an expedient order
93LINKED_SOURCES = \
94 targ-cpu.c \
95 obj-format.c \
96 atof-targ.c
97
98SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
99
100REAL_HEADERS = \
101 $(srcdir)/as.h \
102 $(srcdir)/bignum.h \
103 $(srcdir)/expr.h \
104 $(srcdir)/flonum.h \
105 $(srcdir)/frags.h \
106 $(srcdir)/hash.h \
107 $(srcdir)/input-file.h \
542e1629 108 $(srcdir)/listing.h \
fecd2382
RP
109 $(srcdir)/tc.h \
110 $(srcdir)/obj.h \
542e1629 111 $(srcdir)/obstack.h \
fecd2382 112 $(srcdir)/read.h \
fecd2382
RP
113 $(srcdir)/struc-symbol.h \
114 $(srcdir)/subsegs.h \
115 $(srcdir)/symbols.h \
116 $(srcdir)/syscalls.h \
117 $(srcdir)/write.h
118
119LINKED_HEADERS = \
120 a.out.gnu.h \
121 a.out.h \
122 host.h \
123 targ-env.h \
124 targ-cpu.h \
125 obj-format.h \
126 atof-targ.h
127
128HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
129
130OBJS = \
131 targ-cpu.o \
132 obj-format.o \
133 atof-targ.o \
134 app.o \
135 as.o \
136 atof-generic.o \
137 bignum-copy.o \
138 cond.o \
139 expr.o \
140 flonum-const.o \
141 flonum-copy.o \
142 flonum-mult.o \
143 frags.o \
144 hash.o \
145 hex-value.o \
146 input-file.o \
147 input-scrub.o \
148 messages.o \
542e1629 149 obstack.o \
fecd2382
RP
150 output-file.o \
151 read.o \
542e1629 152 strerror.o \
fecd2382
RP
153 strstr.o \
154 subsegs.o \
155 symbols.o \
156 version.o \
157 write.o \
3340f7e5 158 listing.o \
fecd2382
RP
159 xmalloc.o \
160 xrealloc.o
161
f6b67e4c
RP
162#### host, target, and site specific Makefile frags come in here.
163
542e1629 164all: as.new
79a54a5b
RP
165 (cd doc ; $(MAKE) all)
166
1058238c 167info:
79a54a5b
RP
168 (cd doc ; $(MAKE) info)
169
81f73963 170install-info:
79a54a5b
RP
171 (cd doc ; $(MAKE) install-info)
172
173clean-info:
174 (cd doc ; $(MAKE) clean-info)
fecd2382 175
fecd2382
RP
176# Now figure out from those variables how to compile and link.
177
178# This is the variable actually used when we compile.
6d5460ab 179ALL_CFLAGS = $(MINUS_G) $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382 180
fecd2382
RP
181# How to link with both our special library facilities
182# and the system's installed libraries.
f6b67e4c 183
542e1629 184LIBS = $(LOCAL_LOADLIBES) $(CLIB) # ../libiberty/libiberty.a
fecd2382
RP
185
186# Specify the directories to be searched for header files.
187# Both . and srcdir are used, in that order,
188# so that tm.h and config.h will be found in the compilation
189# subdirectory rather than in the source directory.
1058238c
RP
190INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
191SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
fecd2382
RP
192
193# Always use -I$(srcdir)/config when compiling.
194.c.o:
195 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
196
197# This tells GNU make version 3 not to export all the variables
198# defined in this file into the environment.
199.NOEXPORT:
542e1629 200
fecd2382 201# Files to be copied away after each stage in building.
da0b2bff 202STAGESTUFF = *.o as.new
fecd2382 203
da0b2bff
RP
204as.new: $(OBJS) $(LIBDEPS)
205 -mv -f as.new as.old
206 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 207
fecd2382
RP
208config.status:
209 @echo You must configure gas. Look at the INSTALL file for details.
210 @false
211
fecd2382
RP
212# Compiling object files from source files.
213
fecd2382 214app.o : app.c as.h host.h targ-env.h obj-format.h \
d1a9e594 215 targ-cpu.h struc-symbol.h \
fecd2382
RP
216 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
217as.o : as.c as.h host.h targ-env.h obj-format.h \
d1a9e594 218 targ-cpu.h struc-symbol.h \
fecd2382
RP
219 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
220atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \
d1a9e594 221 targ-cpu.h struc-symbol.h \
fecd2382
RP
222 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
223bignum-copy.o : bignum-copy.c as.h host.h \
224 targ-env.h obj-format.h \
d1a9e594 225 targ-cpu.h struc-symbol.h \
fecd2382
RP
226 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
227cond.o : cond.c as.h host.h targ-env.h obj-format.h \
d1a9e594 228 targ-cpu.h struc-symbol.h \
fecd2382 229 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 230
fecd2382 231debug.o : debug.c as.h host.h targ-env.h obj-format.h \
d1a9e594 232 targ-cpu.h struc-symbol.h \
fecd2382
RP
233 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
234 subsegs.h
235expr.o : expr.c as.h host.h targ-env.h obj-format.h \
d1a9e594 236 targ-cpu.h struc-symbol.h \
fecd2382 237 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 238
fecd2382
RP
239flonum-const.o : flonum-const.c flonum.h bignum.h
240flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \
d1a9e594 241 targ-cpu.h struc-symbol.h \
fecd2382
RP
242 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
243flonum-mult.o : flonum-mult.c flonum.h bignum.h
244frags.o : frags.c as.h host.h targ-env.h obj-format.h \
d1a9e594 245 targ-cpu.h struc-symbol.h \
fecd2382 246 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 247 subsegs.h
fecd2382 248hash.o : hash.c as.h host.h targ-env.h obj-format.h \
d1a9e594 249 targ-cpu.h struc-symbol.h \
fecd2382
RP
250 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
251hex-value.o : hex-value.c
252input-file.o : input-file.c as.h host.h \
253 targ-env.h obj-format.h targ-cpu.h \
d1a9e594 254 struc-symbol.h write.h flonum.h bignum.h expr.h \
fecd2382
RP
255 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
256input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
257 as.h host.h targ-env.h obj-format.h \
d1a9e594 258 targ-cpu.h struc-symbol.h \
fecd2382
RP
259 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
260 input-file.h
3340f7e5
RP
261listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \
262 listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
263 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
fecd2382 264messages.o : messages.c as.h host.h targ-env.h obj-format.h \
d1a9e594 265 targ-cpu.h struc-symbol.h \
fecd2382 266 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
d1a9e594 267obstack.o : obstack.c
fecd2382 268output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \
d1a9e594 269 targ-cpu.h struc-symbol.h \
fecd2382
RP
270 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
271 output-file.h
272read.o : read.c as.h host.h targ-env.h obj-format.h \
d1a9e594 273 targ-cpu.h struc-symbol.h \
fecd2382 274 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 275
fecd2382
RP
276strstr.o : strstr.c
277subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \
d1a9e594 278 targ-cpu.h struc-symbol.h \
fecd2382 279 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 280 subsegs.h
fecd2382 281symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
d1a9e594 282 targ-cpu.h struc-symbol.h \
fecd2382 283 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 284 subsegs.h
fecd2382
RP
285version.o : version.c
286write.o : write.c as.h host.h targ-env.h obj-format.h \
d1a9e594 287 targ-cpu.h struc-symbol.h \
fecd2382 288 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 289 subsegs.h output-file.h
fecd2382
RP
290xmalloc.o : xmalloc.c
291xrealloc.o : xrealloc.c
292atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
d1a9e594 293 targ-cpu.h struc-symbol.h \
fecd2382
RP
294 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
295 symbols.h tc.h obj.h
296obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \
d1a9e594 297 targ-cpu.h struc-symbol.h \
fecd2382 298 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
d1a9e594 299 symbols.h tc.h obj.h
fecd2382 300targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \
d1a9e594 301 targ-cpu.h struc-symbol.h \
fecd2382 302 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
da0b2bff 303 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
d1a9e594 304
fecd2382
RP
305# Remake the info files.
306
921faa52 307doc: $(srcdir)/as.info
fecd2382 308
921faa52
RP
309$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
310 (cd doc; make as.info; mv as.info $srcdir)
fecd2382 311
fecd2382 312clean:
79a54a5b 313 (cd doc ; $(MAKE) clean)
542e1629 314 -rm -f $(STAGESTUFF) core
fecd2382
RP
315
316# Like clean but also delete the links made to configure gas.
542e1629
RP
317distclean: clean
318 -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \
319 targ-cpu.c obj-format.h obj-format.c atof-targ.c \
320 gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs
321 gas.tps gas.vrs TAGS gas.info* gas.?? gas.??s gas.log \
322 gas.toc gas.*aux *.dvi
323
fecd2382
RP
324# Entry points `install', `includes' and `uninstall'.
325
326# Copy the files into directories where they will be run.
542e1629
RP
327install:
328 if [ "$(host_alias)" = "$(target_alias)" ] ; then \
329 $(INSTALL_PROGRAM) as.new $(bindir)/as ; \
330 else \
331 $(INSTALL_PROGRAM) as.new $(bindir)/as-$(target_alias) ; \
332 fi
fecd2382
RP
333
334# Create the installation directory.
335install-dir:
336 -mkdir $(libdir)
337 -mkdir $(libdir)/gcc
338 -mkdir $(libdir)/gcc/$(target)
339 -mkdir $(libdir)/gcc/$(target)/$(version)
340
fecd2382
RP
341# Cancel installation by deleting the installed files.
342uninstall:
343 -rm -rf $(libsubdir)
6a3958b2 344 -rm -rf $(bindir)/as
fecd2382
RP
345 -rm -rf $(mandir)/gas.$(manext)
346
542e1629 347
fecd2382
RP
348# These exist for maintenance purposes.
349
350tags TAGS: force
622e4c4c 351 etags $(REAL_SOURCES) $(REAL_HEADERS) $(srcdir)/README $(srcdir)/Makefile $(srcdir)/config/*.[hc]
fecd2382 352
542e1629 353bootstrap: as.new force
fecd2382 354 $(MAKE) stage1
542e1629 355 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
fecd2382 356 $(MAKE) stage2
542e1629 357 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
a01bf1fb 358 $(MAKE) comparison against=stage2
fecd2382
RP
359
360bootstrap2: force
542e1629 361 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
fecd2382 362 $(MAKE) stage2
542e1629 363 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
da0b2bff 364 $(MAKE) comparison against=stage2
fecd2382
RP
365
366bootstrap3: force
542e1629 367 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
a01bf1fb 368 $(MAKE) comparison against=stage2
fecd2382
RP
369
370# Copy the object files from a particular stage into a subdirectory.
371stage1: force
372 -mkdir stage1
373 -mv $(STAGESTUFF) stage1
81f73963 374 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
375
376stage2: force
377 -mkdir stage2
378 -mv $(STAGESTUFF) stage2
81f73963 379 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
380
381stage3: force
382 -mkdir stage3
6a3958b2 383 -mv $(STAGESTUFF) stage3
81f73963 384 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 385
a01bf1fb
RP
386against=stage2
387
388comparison: force
389 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
390
6a3958b2 391de-stage1: force
da0b2bff 392 - (cd stage1 ; rm as ; mv -f * ..)
6a3958b2
RP
393 - rmdir stage1
394
395de-stage2: force
da0b2bff 396 - (cd stage2 ; rm as ; mv -f * ..)
6a3958b2
RP
397 - rmdir stage2
398
399de-stage3: force
da0b2bff 400 - (cd stage3 ; rm as ; mv -f * ..)
6a3958b2 401 - rmdir stage3
fecd2382 402
fecd2382
RP
403#In GNU Make, ignore whether `stage*' exists.
404.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
fecd2382
RP
405
406force:
407
f1eb48b6 408Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 409 $(SHELL) ./config.status
61907f51 410
This page took 0.061644 seconds and 4 git commands to generate.