]> Git Repo - binutils.git/blob - gas/Makefile.in
Use new hex-value code in libiberty:
[binutils.git] / gas / Makefile.in
1 ## @configure_input@
2 # Makefile for GNU Assembler
3 #   Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc.
4
5 # This file is part of GNU GAS.
6
7 # GNU GAS is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # GNU GAS is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU GAS; see the file COPYING.  If not, write to
19 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 # The targets for external use include:
22 # all, doc, proto, install, uninstall, includes, TAGS,
23 # clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
24
25 # Variables that exist for you to override.
26 # See below for how to change them for certain systems.
27
28 VPATH = @srcdir@
29 srcdir = @srcdir@
30 srcroot = $(srcdir)/..
31
32 target_alias = @target_alias@
33 prefix = @prefix@
34
35 program_transform_name = @program_transform_name@
36 exec_prefix = @exec_prefix@
37 bindir = $(exec_prefix)/bin
38 libdir = $(exec_prefix)/lib
39 tooldir = $(exec_prefix)/$(target_alias)
40
41 datadir = $(prefix)/lib
42 mandir = $(prefix)/man
43 man1dir = $(mandir)/man1
44 man2dir = $(mandir)/man2
45 man3dir = $(mandir)/man3
46 man4dir = $(mandir)/man4
47 man5dir = $(mandir)/man5
48 man6dir = $(mandir)/man6
49 man7dir = $(mandir)/man7
50 man8dir = $(mandir)/man8
51 man9dir = $(mandir)/man9
52 infodir = $(prefix)/info
53 includedir = $(prefix)/include
54 docdir = $(datadir)/doc
55
56 VERSION=cygnus-2.5.3
57
58 SHELL = /bin/sh
59
60 INSTALL = $${srcroot}/install.sh -c
61 INSTALL_PROGRAM = $(INSTALL)
62 INSTALL_DATA = $(INSTALL)
63 INSTALL_XFORM = $(INSTALL) -t='-e $(program_transform_name)'
64 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
65
66 DISTSTUFF= make-gas.com
67
68 AR = ar
69 AR_FLAGS = qv
70 BISON = bison -y
71 MAKEINFO = makeinfo
72 TEXI2DVI = texi2dvi
73 RANLIB = ranlib
74 CC = @CC@
75 CFLAGS = -g
76
77 MAKEOVERRIDES=
78
79 FLAGS_TO_PASS = \
80         "prefix=$(prefix)" \
81         "exec_prefix=$(exec_prefix)" \
82         "tooldir=$(tooldir)" \
83         "AR=$(AR)" \
84         "AR_FLAGS=$(AR_FLAGS)" \
85         "CC=$(CC)" \
86         "CFLAGS=$(CFLAGS)" \
87         "RANLIB=$(RANLIB)" \
88         "LOADLIBES=$(LOADLIBES)" \
89         "LDFLAGS=$(LDFLAGS)" \
90         "BISON=$(BISON)" \
91         "LEX=$(LEX)" \
92         "MAKEINFO=$(MAKEINFO)" \
93         "INSTALL=$(INSTALL)" \
94         "INSTALL_DATA=$(INSTALL_DATA)" \
95         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
96
97 RUNTEST=runtest
98 CHECKFLAGS= \
99         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
100         "RUNTEST=$(RUNTEST)"
101
102 # Lists of files for various purposes.
103
104 REAL_SOURCES = \
105         $(srcdir)/app.c \
106         $(srcdir)/as.c \
107         $(srcdir)/atof-generic.c \
108         $(srcdir)/bignum-copy.c \
109         $(srcdir)/cond.c \
110         $(srcdir)/expr.c \
111         $(srcdir)/flonum-konst.c \
112         $(srcdir)/flonum-copy.c \
113         $(srcdir)/flonum-mult.c \
114         $(srcdir)/frags.c \
115         $(srcdir)/hash.c \
116         $(srcdir)/hex-value.c \
117         $(srcdir)/input-file.c \
118         $(srcdir)/input-scrub.c \
119         $(srcdir)/literal.c \
120         $(srcdir)/messages.c \
121         $(srcdir)/output-file.c \
122         $(srcdir)/read.c \
123         $(srcdir)/subsegs.c \
124         $(srcdir)/symbols.c \
125         $(srcdir)/write.c \
126         $(srcdir)/listing.c \
127         $(srcdir)/ecoff.c \
128         $(srcdir)/stabs.c
129
130 # in an expedient order
131 LINKED_SOURCES = \
132         targ-cpu.c \
133         obj-format.c \
134         atof-targ.c
135
136 SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
137
138 REAL_HEADERS = \
139         $(srcdir)/as.h \
140         $(srcdir)/bignum.h \
141         $(srcdir)/expr.h \
142         $(srcdir)/flonum.h \
143         $(srcdir)/frags.h \
144         $(srcdir)/hash.h \
145         $(srcdir)/input-file.h \
146         $(srcdir)/listing.h \
147         $(srcdir)/tc.h \
148         $(srcdir)/obj.h \
149         $(srcdir)/read.h \
150         $(srcdir)/struc-symbol.h \
151         $(srcdir)/subsegs.h \
152         $(srcdir)/symbols.h \
153         $(srcdir)/write.h \
154         $(srcdir)/ecoff.h
155
156 LINKED_HEADERS = \
157         targ-env.h \
158         targ-cpu.h \
159         obj-format.h \
160         atof-targ.h
161
162 HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
163
164 # @target_frag@
165
166 OBJS = \
167         targ-cpu.o \
168         obj-format.o \
169         atof-targ.o \
170         app.o \
171         as.o \
172         atof-generic.o \
173         bignum-copy.o \
174         cond.o \
175         expr.o \
176         flonum-konst.o \
177         flonum-copy.o \
178         flonum-mult.o \
179         frags.o \
180         hash.o \
181         hex-value.o \
182         input-file.o \
183         input-scrub.o \
184         literal.o \
185         messages.o \
186         output-file.o \
187         read.o \
188         subsegs.o \
189         symbols.o \
190         write.o \
191         listing.o \
192         ecoff.o \
193         stabs.o \
194         $(TE_OBJS)
195
196 # These are objects we know we'll be pulling in from other directories.
197 # For VMS, we have to build them explicitly.
198 VMS_OTHER_OBJS = \
199         ../libiberty/xmalloc.o \
200         ../libiberty/xexit.o \
201         ../libiberty/obstack.o \
202         ../libiberty/strdup.o \
203         ../libiberty/strncasecmp.o \
204         ../libiberty/concat.o \
205         ../libiberty/getopt.o \
206         ../libiberty/getopt1.o \
207         ../libiberty/getruntime.o
208
209 all: .gdbinit as.new gasp.new
210         @srcroot=`cd $(srcroot); pwd`; export srcroot; \
211         (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
212
213 dvi info install-info clean-info:
214         @srcroot=`cd $(srcroot); pwd`; export srcroot; \
215         (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
216
217 make-gas.com: stamp-mk.com
218 stamp-mk.com: vmsconf.sh Makefile
219         sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com
220         $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
221         touch stamp-mk.com
222
223 # Now figure out from those variables how to compile and link.
224
225 # This is the variable actually used when we compile.
226 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
227
228 # How to link with both our special library facilities
229 # and the system's installed libraries.
230
231 LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
232
233 # Specify the directories to be searched for header files.
234 # Both . and srcdir are used, in that order,
235 # so that tm.h and config.h will be found in the compilation
236 # subdirectory rather than in the source directory.
237 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/..
238
239 # Always use -I$(srcdir)/config when compiling.
240 .c.o:
241         $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
242
243 # This tells GNU make version 3 not to export all the variables
244 # defined in this file into the environment.
245 .NOEXPORT:
246
247 # Files to be copied away after each stage in building.
248 STAGESTUFF = *.o as.new gasp.new
249
250 $(OBJS): @ALL_OBJ_DEPS@
251
252 as.new: $(OBJS) $(LIBS)
253         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
254
255 $(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \
256         struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \
257         listing.h bignum.h
258
259 gasp.new: gasp.o
260         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new gasp.o $(LIBS) $(LOADLIBES)
261
262 installcheck:
263         @echo No installcheck target is available yet for the GNU assembler.
264
265 check:
266         @(here=`pwd` ; export here ; \
267           cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
268
269 config.status: configure
270         if [ -r config.status ]; then \
271           sh ./config.status --recheck ; \
272         else \
273           echo You must configure gas.  Look at the INSTALL file for details. ; \
274           exit 1 ; \
275         fi
276
277 config.h: config-stamp ; @true
278 config-stamp: Makefile conf
279         -rm -f config.new config-stamp
280         echo '/* config.h.  Generated automatically by make.  */' > config.new
281         echo '#ifndef GAS_VERSION'                      >> config.new
282         echo '#define GAS_VERSION "$(VERSION)"'         >> config.new
283         echo ''                                         >> config.new
284         cat conf                                        >> config.new
285         echo '#endif /* GAS_VERSION */'                 >> config.new
286         $(srcdir)/../move-if-change config.new config.h
287         touch config-stamp
288
289 # Compiling object files from source files.
290
291 gasp.o : gasp.c config.h
292 app.o : app.c write.h
293 as.o : as.c output-file.h write.h subsegs.h
294 atof-generic.o : atof-generic.c
295 bignum-copy.o : bignum-copy.c
296 cond.o : cond.c
297 debug.o : debug.c subsegs.h
298 expr.o : expr.c
299 flonum-konst.o : flonum-konst.c
300 flonum-copy.o : flonum-copy.c
301 flonum-mult.o : flonum-mult.c
302 frags.o : frags.c subsegs.h
303 hash.o : hash.c
304 hex-value.o : hex-value.c
305 input-file.o : input-file.c input-file.h
306 input-scrub.o : input-scrub.c input-file.h
307 listing.o : listing.c input-file.h subsegs.h
308 literal.o : literal.c subsegs.h
309 messages.o : messages.c
310 output-file.o : output-file.c output-file.h
311 read.o : read.c
312 subsegs.o : subsegs.c subsegs.h
313 symbols.o : symbols.c subsegs.h
314 write.o : write.c subsegs.h output-file.h
315 ecoff.o : ecoff.c ecoff.h \
316         $(srcdir)/../include/coff/internal.h $(srcdir)/../include/coff/sym.h \
317         $(srcdir)/../include/coff/ecoff.h \
318         $(srcdir)/../include/coff/symconst.h \
319         $(srcdir)/../include/aout/stab_gnu.h
320 stabs.o : stabs.c subsegs.h $(srcdir)/../include/aout/stab_gnu.h
321 atof-targ.o : atof-targ.c
322 obj-format.o : obj-format.c
323 targ-cpu.o : targ-cpu.c $(TARG_CPU_DEPENDENTS)
324
325 # Remake the info files.
326
327 doc: $(srcdir)/as.info
328
329 $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
330         @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) 
331
332 diststuff: $(DISTSTUFF)
333
334 clean-here:
335         -rm -f $(STAGESTUFF) core stamp-mk.com
336
337 clean mostlyclean: clean-here
338         @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
339         @if [ -d testsuite ] ; then \
340           cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
341         else true; fi
342
343 # Like clean but also delete the links made to configure gas.
344 distclean: clean-here
345         @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
346         @if [ -d testsuite ] ; then \
347           cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
348         else true; fi
349         -rm -f config.status Makefile targ-env.h targ-cpu.h \
350                 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
351                 config-stamp config.h conf config.log config.cache .gdbinit
352 realclean: clean distclean
353         -rm -rf $(DISTSTUFF)
354
355 # Entry points `install', `includes' and `uninstall'.
356
357 # Copy the files into directories where they will be run.
358 install:
359         srcroot=`cd $(srcroot); pwd`; export srcroot; \
360         $(INSTALL_XFORM) as.new $(bindir)/as; \
361         $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
362         n=`echo as | sed '$(program_transform_name)'`; \
363         if [ -d $(tooldir) ]; then \
364           if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
365           rm -f $(tooldir)/bin/as; \
366           ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
367            || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
368         else true; fi
369         srcroot=`cd $(srcroot); pwd`; export srcroot; \
370         $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \
371         n=`echo gasp | sed '$(program_transform_name)' `; \
372         if [ -d $(tooldir) ]; then \
373           if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
374           rm -f $(tooldir)/bin/gasp; \
375           ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \
376            || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \
377         else true; fi
378
379 # Cancel installation by deleting the installed files.
380 uninstall:
381         -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
382         rm -f $(bindir)/$$n; \
383         rm -f $(mandir)/$$n.1
384         -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
385         rm -f $(bindir)/$$n; \
386
387 # These exist for maintenance purposes.
388
389 tags TAGS: force
390         etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
391
392 bootstrap: as.new force
393         $(MAKE) stage1
394         rm -f stage && ln -s stage1 stage
395         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
396         $(MAKE) stage2
397         rm -f stage && ln -s stage2 stage
398         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
399         $(MAKE) comparison against=stage2
400
401 bootstrap2: force
402         rm -f stage && ln -s stage1 stage
403         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
404         $(MAKE) stage2
405         rm -f stage && ln -s stage2 stage
406         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
407         $(MAKE) comparison against=stage2
408
409 bootstrap3: force
410         rm -f stage && ln -s stage2 stage
411         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
412         $(MAKE) comparison against=stage2
413
414 # Copy the object files from a particular stage into a subdirectory.
415 stage1: force
416         -mkdir stage1
417         -mv $(STAGESTUFF) stage1
418         if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
419
420 stage2: force
421         -mkdir stage2
422         -mv $(STAGESTUFF) stage2
423         if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
424
425 stage3: force
426         -mkdir stage3
427         -mv $(STAGESTUFF) stage3
428         if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
429
430 against=stage2
431
432 # This rule is derived from corresponding code in the Makefile.in for gcc.
433 # The "tail +16c" is to bypass headers which may include timestamps or
434 # temporary assembly file names.
435 comparison: force
436         x=0 ; \
437         for file in $(STAGESTUFF) ; do \
438           tail +16c ./$$file > tmp-foo1; \
439           if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
440             if cmp tmp-foo1 tmp-foo2 ; then \
441               true ; \
442             else \
443               echo $$file differs ; \
444               x=1 ; \
445             fi ; \
446           else true; fi ; \
447         done ; \
448         exit $$x
449         -rm -f tmp-foo*
450
451 de-stage1: force
452         - (cd stage1 ; rm -f as ; mv -f * ..)
453         - rmdir stage1
454
455 de-stage2: force
456         - (cd stage2 ; rm -f as ; mv -f * ..)
457         - rmdir stage2
458
459 de-stage3: force
460         - (cd stage3 ; rm -f as ; mv -f * ..)
461         - rmdir stage3
462
463 #In GNU Make, ignore whether `stage*' exists.
464 .PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
465 .PHONY: TAGS bootstrap
466
467 force:
468
469 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
470                 $(srcdir)/configure.in config.status
471         $(SHELL) ./config.status
472 .gdbinit: $(srcdir)/gdbinit.in config.status
473         $(SHELL) ./config.status
This page took 0.050682 seconds and 4 git commands to generate.