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 $
4 # Makefile for GNU Assembler
5 # Copyright (C) 1987-1992 Free Software Foundation, Inc.
7 #This file is part of GNU GAS.
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)
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.
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.
23 # The targets for external use include:
24 # all, doc, proto, install, uninstall, includes, TAGS,
25 # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
27 # Variables that exist for you to override.
28 # See below for how to change them for certain systems.
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
54 INSTALL_PROGRAM = $(INSTALL)
55 INSTALL_DATA = $(INSTALL)
64 # Lists of files for various purposes.
69 $(srcdir)/atof-generic.c \
70 $(srcdir)/bignum-copy.c \
73 $(srcdir)/flo-const.c \
74 $(srcdir)/flo-copy.c \
75 $(srcdir)/flonum-mult.c \
78 $(srcdir)/hex-value.c \
79 $(srcdir)/input-file.c \
80 $(srcdir)/input-scrub.c \
81 $(srcdir)/messages.c \
83 $(srcdir)/output-file.c \
85 $(srcdir)/strerror.c \
95 # in an expedient order
101 SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
110 $(srcdir)/input-file.h \
111 $(srcdir)/listing.h \
114 $(srcdir)/obstack.h \
116 $(srcdir)/struc-symbol.h \
117 $(srcdir)/subsegs.h \
118 $(srcdir)/symbols.h \
130 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
164 #### host, target, and site specific Makefile frags come in here.
167 (cd doc ; $(MAKE) all)
170 (cd doc ; $(MAKE) info)
173 (cd doc ; $(MAKE) install-info)
176 (cd doc ; $(MAKE) clean-info)
178 # Now figure out from those variables how to compile and link.
180 # This is the variable actually used when we compile.
181 ALL_CFLAGS = $(MINUS_G) $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES) -DPIC -DOLD_GAS
183 # How to link with both our special library facilities
184 # and the system's installed libraries.
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
195 # Always use -I$(srcdir)/config when compiling.
197 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
199 # This tells GNU make version 3 not to export all the variables
200 # defined in this file into the environment.
203 # Files to be copied away after each stage in building.
204 STAGESTUFF = *.o as.new
206 as.new: $(OBJS) $(LIBDEPS)
208 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS)
211 @echo You must configure gas. Look at the INSTALL file for details.
214 # Compiling object files from source files.
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
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 \
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
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 \
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 \
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 \
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
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 \
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 \
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 \
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 \
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)
307 # Remake the info files.
309 doc: $(srcdir)/as.info
311 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
312 (cd doc; make as.info; mv -f as.info $srcdir)
315 (cd doc ; $(MAKE) clean)
316 -rm -f $(STAGESTUFF) core
318 # Like clean but also delete the links made to configure gas.
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
326 # Entry points `install', `includes' and `uninstall'.
328 # Copy the files into directories where they will be run.
330 if [ "$(host_alias)" = "$(target_alias)" ] ; then \
331 $(INSTALL_PROGRAM) as.new $(bindir)/as ; \
333 $(INSTALL_PROGRAM) as.new $(bindir)/as-$(target_alias) ; \
336 # Create the installation directory.
340 -mkdir $(libdir)/gcc/$(target)
341 -mkdir $(libdir)/gcc/$(target)/$(version)
343 # Cancel installation by deleting the installed files.
347 -rm -rf $(mandir)/gas.$(manext)
350 # These exist for maintenance purposes.
353 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
355 bootstrap: as.new force
357 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
359 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
360 $(MAKE) comparison against=stage2
363 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
365 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
366 $(MAKE) comparison against=stage2
369 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
370 $(MAKE) comparison against=stage2
372 # Copy the object files from a particular stage into a subdirectory.
375 -mv -f $(STAGESTUFF) stage1
376 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
380 -mv -f $(STAGESTUFF) stage2
381 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
385 -mv -f $(STAGESTUFF) stage3
386 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
391 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
394 - (cd stage1 ; rm -f as ; mv -f * ..)
398 - (cd stage2 ; rm -f as ; mv -f * ..)
402 - (cd stage3 ; rm -f as ; mv -f * ..)
405 #In GNU Make, ignore whether `stage*' exists.
406 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
410 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
411 $(SHELL) ./config.status