1 # $FreeBSD: src/gnu/usr.bin/as/Makefile.in,v 1.6 1999/08/27 23:34:10 peter Exp $
3 # Makefile for GNU Assembler
4 # Copyright (C) 1987-1992 Free Software Foundation, Inc.
6 #This file is part of GNU GAS.
8 #GNU GAS is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU GAS is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU GAS; see the file COPYING. If not, write to
20 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 # The targets for external use include:
23 # all, doc, proto, install, uninstall, includes, TAGS,
24 # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
26 # Variables that exist for you to override.
27 # See below for how to change them for certain systems.
33 bindir = $(prefix)/bin
34 datadir = $(prefix)/lib
35 libdir = $(prefix)/lib
36 mandir = $(datadir)/man
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
39 man3dir = $(mandir)/man3
40 man4dir = $(mandir)/man4
41 man5dir = $(mandir)/man5
42 man6dir = $(mandir)/man6
43 man7dir = $(mandir)/man7
44 man8dir = $(mandir)/man8
45 man9dir = $(mandir)/man9
46 infodir = $(datadir)/info
47 includedir = $(prefix)/include
48 docdir = $(datadir)/doc
53 INSTALL_PROGRAM = $(INSTALL)
54 INSTALL_DATA = $(INSTALL)
63 # Lists of files for various purposes.
68 $(srcdir)/atof-generic.c \
69 $(srcdir)/bignum-copy.c \
72 $(srcdir)/flo-const.c \
73 $(srcdir)/flo-copy.c \
74 $(srcdir)/flonum-mult.c \
77 $(srcdir)/hex-value.c \
78 $(srcdir)/input-file.c \
79 $(srcdir)/input-scrub.c \
80 $(srcdir)/messages.c \
82 $(srcdir)/output-file.c \
84 $(srcdir)/strerror.c \
94 # in an expedient order
100 SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
109 $(srcdir)/input-file.h \
110 $(srcdir)/listing.h \
113 $(srcdir)/obstack.h \
115 $(srcdir)/struc-symbol.h \
116 $(srcdir)/subsegs.h \
117 $(srcdir)/symbols.h \
129 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
163 #### host, target, and site specific Makefile frags come in here.
166 (cd doc ; $(MAKE) all)
169 (cd doc ; $(MAKE) info)
172 (cd doc ; $(MAKE) install-info)
175 (cd doc ; $(MAKE) clean-info)
177 # Now figure out from those variables how to compile and link.
179 # This is the variable actually used when we compile.
180 ALL_CFLAGS = $(MINUS_G) $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES) -DPIC -DOLD_GAS
182 # How to link with both our special library facilities
183 # and the system's installed libraries.
187 # Specify the directories to be searched for header files.
188 # Both . and srcdir are used, in that order,
189 # so that tm.h and config.h will be found in the compilation
190 # subdirectory rather than in the source directory.
191 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config # -I$(srcdir)/../include
192 SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
194 # Always use -I$(srcdir)/config when compiling.
196 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
198 # This tells GNU make version 3 not to export all the variables
199 # defined in this file into the environment.
202 # Files to be copied away after each stage in building.
203 STAGESTUFF = *.o as.new
205 as.new: $(OBJS) $(LIBDEPS)
207 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS)
210 @echo You must configure gas. Look at the INSTALL file for details.
213 # Compiling object files from source files.
215 app.o : app.c as.h host.h targ-env.h obj-format.h \
216 targ-cpu.h struc-symbol.h \
217 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
218 as.o : as.c as.h host.h targ-env.h obj-format.h \
219 targ-cpu.h struc-symbol.h \
220 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
221 atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \
222 targ-cpu.h struc-symbol.h \
223 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
224 bignum-copy.o : bignum-copy.c as.h host.h \
225 targ-env.h obj-format.h \
226 targ-cpu.h struc-symbol.h \
227 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
228 cond.o : cond.c as.h host.h targ-env.h obj-format.h \
229 targ-cpu.h struc-symbol.h \
230 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
232 debug.o : debug.c as.h host.h targ-env.h obj-format.h \
233 targ-cpu.h struc-symbol.h \
234 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
236 expr.o : expr.c as.h host.h targ-env.h obj-format.h \
237 targ-cpu.h struc-symbol.h \
238 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
240 flo-const.o : flo-const.c flonum.h bignum.h
241 flo-copy.o : flo-copy.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 flonum-mult.o : flonum-mult.c flonum.h bignum.h
245 frags.o : frags.c as.h host.h targ-env.h obj-format.h \
246 targ-cpu.h struc-symbol.h \
247 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
249 hash.o : hash.c as.h host.h targ-env.h obj-format.h \
250 targ-cpu.h struc-symbol.h \
251 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
252 hex-value.o : hex-value.c
253 input-file.o : input-file.c as.h host.h \
254 targ-env.h obj-format.h targ-cpu.h \
255 struc-symbol.h write.h flonum.h bignum.h expr.h \
256 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
257 input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
258 as.h host.h targ-env.h obj-format.h \
259 targ-cpu.h struc-symbol.h \
260 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
262 listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \
263 listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
264 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
265 messages.o : messages.c as.h host.h targ-env.h obj-format.h \
266 targ-cpu.h struc-symbol.h \
267 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
268 obstack.o : obstack.c
269 output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \
270 targ-cpu.h struc-symbol.h \
271 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
273 read.o : read.c as.h host.h targ-env.h obj-format.h \
274 targ-cpu.h struc-symbol.h \
275 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
278 subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \
279 targ-cpu.h struc-symbol.h \
280 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
282 symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
283 targ-cpu.h struc-symbol.h \
284 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
286 version.o : version.c
287 write.o : write.c as.h host.h targ-env.h obj-format.h \
288 targ-cpu.h struc-symbol.h \
289 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
290 subsegs.h output-file.h
291 xmalloc.o : xmalloc.c
292 xrealloc.o : xrealloc.c
293 atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
294 targ-cpu.h struc-symbol.h \
295 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
297 obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \
298 targ-cpu.h struc-symbol.h \
299 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
301 targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \
302 targ-cpu.h struc-symbol.h \
303 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
304 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
306 # Remake the info files.
308 doc: $(srcdir)/as.info
310 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
311 (cd doc; make as.info; mv -f as.info $srcdir)
314 (cd doc ; $(MAKE) clean)
315 -rm -f $(STAGESTUFF) core
317 # Like clean but also delete the links made to configure gas.
319 -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \
320 targ-cpu.c obj-format.h obj-format.c atof-targ.c \
321 gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs \
322 gas.tps gas.vrs TAGS gas.info* gas.?? gas.??s gas.log \
323 gas.toc gas.*aux *.dvi
325 # Entry points `install', `includes' and `uninstall'.
327 # Copy the files into directories where they will be run.
329 if [ "$(host_alias)" = "$(target_alias)" ] ; then \
330 $(INSTALL_PROGRAM) as.new $(bindir)/as ; \
332 $(INSTALL_PROGRAM) as.new $(bindir)/as-$(target_alias) ; \
335 # Create the installation directory.
339 -mkdir $(libdir)/gcc/$(target)
340 -mkdir $(libdir)/gcc/$(target)/$(version)
342 # Cancel installation by deleting the installed files.
346 -rm -rf $(mandir)/gas.$(manext)
349 # These exist for maintenance purposes.
352 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
354 bootstrap: as.new force
356 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
358 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
359 $(MAKE) comparison against=stage2
362 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
364 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
365 $(MAKE) comparison against=stage2
368 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
369 $(MAKE) comparison against=stage2
371 # Copy the object files from a particular stage into a subdirectory.
374 -mv -f $(STAGESTUFF) stage1
375 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
379 -mv -f $(STAGESTUFF) stage2
380 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
384 -mv -f $(STAGESTUFF) stage3
385 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
390 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
393 - (cd stage1 ; rm -f as ; mv -f * ..)
397 - (cd stage2 ; rm -f as ; mv -f * ..)
401 - (cd stage3 ; rm -f as ; mv -f * ..)
404 #In GNU Make, ignore whether `stage*' exists.
405 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
409 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
410 $(SHELL) ./config.status