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