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