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