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