* ldlang.c (load_symbols): Check for archive before object. Use
[deliverable/binutils-gdb.git] / gas / Makefile.in
CommitLineData
fecd2382 1# Makefile for GNU Assembler
7420b02b 2# Copyright (C) 1987-1992, 1993 Free Software Foundation, Inc.
fecd2382 3
7420b02b 4# This file is part of GNU GAS.
fecd2382 5
7420b02b
JL
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.
fecd2382 10
7420b02b
JL
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.
fecd2382 15
7420b02b
JL
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.
fecd2382 19
fecd2382
RP
20# The targets for external use include:
21# all, doc, proto, install, uninstall, includes, TAGS,
daa7e184 22# clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
fecd2382
RP
23
24# Variables that exist for you to override.
25# See below for how to change them for certain systems.
26
b11fb939
KR
27VPATH = @srcdir@
28srcdir = @srcdir@
7420b02b 29srcroot = $(srcdir)/..
1058238c 30
fa156ffe 31target_alias = @target_alias@
1bc37618 32prefix = @prefix@
1058238c 33
fa156ffe 34program_transform_name = @program_transform_name@
1bc37618 35exec_prefix = @exec_prefix@
787c6bfe
RP
36bindir = $(exec_prefix)/bin
37libdir = $(exec_prefix)/lib
efbfb612 38tooldir = $(libdir)/$(target_alias)
787c6bfe 39
1058238c 40datadir = $(prefix)/lib
787c6bfe 41mandir = $(prefix)/man
1058238c
RP
42man1dir = $(mandir)/man1
43man2dir = $(mandir)/man2
44man3dir = $(mandir)/man3
45man4dir = $(mandir)/man4
46man5dir = $(mandir)/man5
47man6dir = $(mandir)/man6
48man7dir = $(mandir)/man7
49man8dir = $(mandir)/man8
50man9dir = $(mandir)/man9
787c6bfe 51infodir = $(prefix)/info
1058238c
RP
52includedir = $(prefix)/include
53docdir = $(datadir)/doc
54
c06e55d9 55VERSION=cygnus-2.3.1
c97b9003 56
fecd2382 57SHELL = /bin/sh
1058238c 58
7420b02b 59INSTALL = $${srcroot}/install.sh -c
fecd2382 60INSTALL_PROGRAM = $(INSTALL)
1058238c 61INSTALL_DATA = $(INSTALL)
5ebaf24b 62INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
c97b9003 63INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
fecd2382 64
1058238c
RP
65AR = ar
66AR_FLAGS = qv
67BISON = bison
68MAKEINFO = makeinfo
c97b9003 69TEXI2DVI = texi2dvi
fecd2382 70RANLIB = ranlib
b11fb939 71CC = @CC@
4b857710
ILT
72CFLAGS = -g
73
7420b02b
JL
74MAKEOVERRIDES=
75
c97b9003
DZ
76AS_FOR_TARGET = $${here}/as.new
77
78CC_FOR_TARGET = ` \
79 if [ -f $${here}/../gcc/Makefile ] ; then \
80 echo $${here}/../gcc/xgcc -B$${here}/../gcc/; \
81 else \
82 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
83 echo $(CC); \
84 else \
fa156ffe 85 t='$(program_transform_name)'; echo gcc | sed $$t; \
c97b9003
DZ
86 fi; \
87 fi`
88
89NM_FOR_TARGET = ` \
90 if [ -f $${here}/../binutils/Makefile ] ; then \
91 echo $${here}/../binutils/nm ; \
92 else \
93 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
94 echo $(NM); \
95 else \
fa156ffe 96 t='$(program_transform_name)'; echo nm | sed $$t ; \
c97b9003
DZ
97 fi; \
98 fi`
99
100OBJDUMP=objdump
101OBJDUMP_FOR_TARGET = ` \
102 if [ -f $${here}/../binutils/Makefile ] ; then \
103 echo $${here}/../binutils/objdump ; \
104 else \
105 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
106 echo $(OBJDUMP); \
107 else \
fa156ffe 108 t='$(program_transform_name)'; echo objdump | sed $$t ; \
c97b9003
DZ
109 fi; \
110 fi`
111
4b857710
ILT
112FLAGS_TO_PASS = \
113 "prefix=$(prefix)" \
114 "exec_prefix=$(exec_prefix)" \
115 "tooldir=$(tooldir)" \
116 "AR=$(AR)" \
117 "AR_FLAGS=$(AR_FLAGS)" \
118 "CC=$(CC)" \
119 "CFLAGS=$(CFLAGS)" \
120 "RANLIB=$(RANLIB)" \
121 "LOADLIBES=$(LOADLIBES)" \
122 "LDFLAGS=$(LDFLAGS)" \
123 "BISON=$(BISON)" \
124 "LEX=$(LEX)" \
125 "MAKEINFO=$(MAKEINFO)" \
126 "INSTALL=$(INSTALL)" \
127 "INSTALL_DATA=$(INSTALL_DATA)" \
128 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
fecd2382 129
5a051773 130RUNTEST=runtest
c97b9003
DZ
131CHECKFLAGS= \
132 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
133 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
134 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
7420b02b 135 "OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
03372cf4 136 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
5a051773 137 "RUNTEST=$(RUNTEST)"
c97b9003 138
fecd2382
RP
139# Lists of files for various purposes.
140
141REAL_SOURCES = \
142 $(srcdir)/app.c \
143 $(srcdir)/as.c \
144 $(srcdir)/atof-generic.c \
145 $(srcdir)/bignum-copy.c \
146 $(srcdir)/cond.c \
147 $(srcdir)/expr.c \
5d53038b 148 $(srcdir)/flonum-konst.c \
fecd2382
RP
149 $(srcdir)/flonum-copy.c \
150 $(srcdir)/flonum-mult.c \
151 $(srcdir)/frags.c \
152 $(srcdir)/hash.c \
153 $(srcdir)/hex-value.c \
154 $(srcdir)/input-file.c \
155 $(srcdir)/input-scrub.c \
dffc8b9e 156 $(srcdir)/literal.c \
fecd2382
RP
157 $(srcdir)/messages.c \
158 $(srcdir)/output-file.c \
159 $(srcdir)/read.c \
fecd2382
RP
160 $(srcdir)/subsegs.c \
161 $(srcdir)/symbols.c \
fecd2382 162 $(srcdir)/write.c \
3340f7e5 163 $(srcdir)/listing.c \
9cc8106c 164 $(srcdir)/ecoff.c \
c751ad19 165 $(srcdir)/stabs.c \
7f2cb270 166 $(srcdir)/xmalloc.c
fecd2382
RP
167
168# in an expedient order
169LINKED_SOURCES = \
170 targ-cpu.c \
171 obj-format.c \
172 atof-targ.c
173
174SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
175
176REAL_HEADERS = \
177 $(srcdir)/as.h \
178 $(srcdir)/bignum.h \
179 $(srcdir)/expr.h \
180 $(srcdir)/flonum.h \
181 $(srcdir)/frags.h \
182 $(srcdir)/hash.h \
183 $(srcdir)/input-file.h \
542e1629 184 $(srcdir)/listing.h \
fecd2382
RP
185 $(srcdir)/tc.h \
186 $(srcdir)/obj.h \
187 $(srcdir)/read.h \
fecd2382
RP
188 $(srcdir)/struc-symbol.h \
189 $(srcdir)/subsegs.h \
190 $(srcdir)/symbols.h \
9cc8106c
ILT
191 $(srcdir)/write.h \
192 $(srcdir)/ecoff.h
fecd2382
RP
193
194LINKED_HEADERS = \
fecd2382
RP
195 targ-env.h \
196 targ-cpu.h \
197 obj-format.h \
198 atof-targ.h
199
200HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
201
b11fb939 202# @target_frag@
b3cd8555 203
fecd2382
RP
204OBJS = \
205 targ-cpu.o \
206 obj-format.o \
207 atof-targ.o \
208 app.o \
209 as.o \
210 atof-generic.o \
211 bignum-copy.o \
212 cond.o \
213 expr.o \
5d53038b 214 flonum-konst.o \
fecd2382
RP
215 flonum-copy.o \
216 flonum-mult.o \
217 frags.o \
218 hash.o \
219 hex-value.o \
220 input-file.o \
221 input-scrub.o \
dffc8b9e 222 literal.o \
fecd2382
RP
223 messages.o \
224 output-file.o \
225 read.o \
fecd2382
RP
226 subsegs.o \
227 symbols.o \
fecd2382 228 write.o \
3340f7e5 229 listing.o \
9cc8106c 230 ecoff.o \
c751ad19 231 stabs.o \
b3cd8555
ILT
232 xmalloc.o \
233 $(TE_OBJS)
f6b67e4c 234
c92d9ee9
KR
235# These are objects we know we'll be pulling in from other directories.
236# For VMS, we have to build them explicitly.
237VMS_OTHER_OBJS = \
238 ../libiberty/obstack.o \
239 ../libiberty/strdup.o \
240 ../libiberty/strncasecmp.o \
241 ../libiberty/getruntime.o
242
a5a4b5ac 243all: as.new gasp.new
7420b02b
JL
244 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
245 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
79a54a5b 246
7420b02b
JL
247dvi info install-info clean-info:
248 @srcroot=`cd $(srcroot); pwd`; export srcroot; \
249 (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
fecd2382 250
c20c7506
JL
251make-gas.com: stamp-mk.com
252stamp-mk.com: vmsconf.sh Makefile
c92d9ee9 253 sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com
c20c7506
JL
254 $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
255 touch stamp-mk.com
256
fecd2382
RP
257# Now figure out from those variables how to compile and link.
258
259# This is the variable actually used when we compile.
420065a5 260ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382 261
fecd2382
RP
262# How to link with both our special library facilities
263# and the system's installed libraries.
f6b67e4c 264
b11fb939 265LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
fecd2382
RP
266
267# Specify the directories to be searched for header files.
268# Both . and srcdir are used, in that order,
269# so that tm.h and config.h will be found in the compilation
270# subdirectory rather than in the source directory.
c7072f56 271INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/..
1058238c 272SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
fecd2382
RP
273
274# Always use -I$(srcdir)/config when compiling.
275.c.o:
276 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
277
278# This tells GNU make version 3 not to export all the variables
279# defined in this file into the environment.
280.NOEXPORT:
542e1629 281
fecd2382 282# Files to be copied away after each stage in building.
c20c7506 283STAGESTUFF = *.o as.new gasp.new
fecd2382 284
b11fb939 285$(OBJS): @ALL_OBJ_DEPS@
c92d9ee9 286
7f2cb270 287as.new: $(OBJS) $(LIBS)
da0b2bff 288 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 289
b11fb939
KR
290$(OBJS): config.h
291
a5a4b5ac
SC
292gasp.new: gasp.o
293 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new gasp.o $(LIBS) $(LOADLIBES)
294
c97b9003
DZ
295installcheck:
296 @echo No installcheck target is available yet for the GNU assembler.
297
0b3d0999 298check:
c97b9003
DZ
299 @(here=`pwd` ; export here ; \
300 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
787c6bfe 301
b11fb939
KR
302config.status: configure
303 if [ -r config.status ]; then \
1be01033 304 sh ./config.status --recheck ; \
b11fb939
KR
305 else \
306 echo You must configure gas. Look at the INSTALL file for details. ; \
307 exit 1 ; \
308 fi
309
310configure: configure.in aclocal.m4 acconfig.h
311 (cd ${srcdir} && \
312 autoheader configure.in > conf-in.h && \
313 ../move-if-change conf-in.h conf.in)
314 (cd ${srcdir} && autoconf )
fecd2382 315
fc00f451 316config.h: config-stamp ; @true
b11fb939 317config-stamp: Makefile conf
fc00f451 318 -rm -f config.new config-stamp
1e84ff7e
KR
319 echo '/* config.h. Generated automatically by make. */' > config.new
320 echo '#ifndef GAS_VERSION' >> config.new
b11fb939
KR
321 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
322 echo '' >> config.new
323 cat conf >> config.new
324 echo '#endif /* GAS_VERSION */' >> config.new
fc00f451
KR
325 $(srcdir)/../move-if-change config.new config.h
326 touch config-stamp
327
fecd2382
RP
328# Compiling object files from source files.
329
a5a4b5ac 330gasp.o : gasp.c
b11fb939 331app.o : app.c as.h targ-env.h obj-format.h \
d1a9e594 332 targ-cpu.h struc-symbol.h \
fecd2382 333 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 334as.o : as.c as.h targ-env.h obj-format.h output-file.h \
d1a9e594 335 targ-cpu.h struc-symbol.h \
7f2cb270 336 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \
fc00f451 337 tc.h obj.h config.h
b11fb939 338atof-generic.o : atof-generic.c as.h targ-env.h obj-format.h \
d1a9e594 339 targ-cpu.h struc-symbol.h \
fecd2382 340 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 341bignum-copy.o : bignum-copy.c as.h \
fecd2382 342 targ-env.h obj-format.h \
d1a9e594 343 targ-cpu.h struc-symbol.h \
fecd2382 344 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 345cond.o : cond.c as.h targ-env.h obj-format.h \
d1a9e594 346 targ-cpu.h struc-symbol.h \
da7aaffb
SEF
347 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
348
b11fb939 349debug.o : debug.c as.h targ-env.h obj-format.h \
d1a9e594 350 targ-cpu.h struc-symbol.h \
fecd2382
RP
351 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
352 subsegs.h
b11fb939 353expr.o : expr.c as.h targ-env.h obj-format.h \
d1a9e594 354 targ-cpu.h struc-symbol.h \
da7aaffb
SEF
355 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
356
5d53038b 357flonum-konst.o : flonum-konst.c flonum.h bignum.h
b11fb939 358flonum-copy.o : flonum-copy.c as.h targ-env.h obj-format.h \
d1a9e594 359 targ-cpu.h struc-symbol.h \
fecd2382
RP
360 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
361flonum-mult.o : flonum-mult.c flonum.h bignum.h
b11fb939 362frags.o : frags.c as.h targ-env.h obj-format.h \
d1a9e594 363 targ-cpu.h struc-symbol.h \
fecd2382 364 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 365 subsegs.h
b11fb939 366hash.o : hash.c as.h targ-env.h obj-format.h \
d1a9e594 367 targ-cpu.h struc-symbol.h \
fecd2382
RP
368 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
369hex-value.o : hex-value.c
b11fb939 370input-file.o : input-file.c as.h \
fecd2382 371 targ-env.h obj-format.h targ-cpu.h \
d1a9e594 372 struc-symbol.h write.h flonum.h bignum.h expr.h \
fecd2382
RP
373 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
374input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
b11fb939 375 as.h targ-env.h obj-format.h \
d1a9e594 376 targ-cpu.h struc-symbol.h \
fecd2382
RP
377 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
378 input-file.h
b11fb939 379listing.o : listing.c as.h targ-env.h flonum.h bignum.h \
3340f7e5 380 listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
420065a5 381 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h subsegs.h
b11fb939 382literal.o : literal.c subsegs.h as.h targ-env.h obj-format.h \
c20c7506
JL
383 targ-cpu.h struc-symbol.h \
384 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 385messages.o : messages.c as.h targ-env.h obj-format.h \
d1a9e594 386 targ-cpu.h struc-symbol.h \
fecd2382 387 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 388output-file.o : output-file.c as.h targ-env.h obj-format.h \
d1a9e594 389 targ-cpu.h struc-symbol.h \
fecd2382
RP
390 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
391 output-file.h
b11fb939 392read.o : read.c as.h targ-env.h obj-format.h \
d1a9e594 393 targ-cpu.h struc-symbol.h \
da7aaffb 394 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 395subsegs.o : subsegs.c as.h targ-env.h obj-format.h \
d1a9e594 396 targ-cpu.h struc-symbol.h \
fecd2382 397 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 398 subsegs.h
b11fb939 399symbols.o : symbols.c as.h targ-env.h obj-format.h \
d1a9e594 400 targ-cpu.h struc-symbol.h \
fecd2382 401 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 402 subsegs.h
b11fb939 403write.o : write.c as.h targ-env.h obj-format.h \
d1a9e594 404 targ-cpu.h struc-symbol.h \
fecd2382 405 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 406 subsegs.h output-file.h
b11fb939 407ecoff.o : ecoff.c as.h targ-env.h obj-format.h \
9cc8106c
ILT
408 targ-cpu.h struc-symbol.h \
409 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
410 ecoff.h $(srcdir)/../include/coff/internal.h \
411 $(srcdir)/../include/coff/sym.h $(srcdir)/../include/coff/ecoff.h \
412 $(srcdir)/../include/coff/symconst.h $(srcdir)/../include/aout/stab_gnu.h
b11fb939 413stabs.o : stabs.c as.h targ-env.h obj-format.h \
c751ad19
ILT
414 targ-cpu.h struc-symbol.h \
415 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
416 subsegs.h $(srcdir)/../include/aout/stab_gnu.h
fecd2382 417xmalloc.o : xmalloc.c
b11fb939 418atof-targ.o : atof-targ.c as.h targ-env.h obj-format.h \
d1a9e594 419 targ-cpu.h struc-symbol.h \
fecd2382
RP
420 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
421 symbols.h tc.h obj.h
b11fb939 422obj-format.o : obj-format.c as.h targ-env.h obj-format.h \
d1a9e594 423 targ-cpu.h struc-symbol.h \
fecd2382 424 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
7f2cb270 425 subsegs.h symbols.h tc.h obj.h
69498fa2 426targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \
d1a9e594 427 targ-cpu.h struc-symbol.h \
fecd2382 428 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
da0b2bff 429 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
d1a9e594 430
fecd2382
RP
431# Remake the info files.
432
921faa52 433doc: $(srcdir)/as.info
fecd2382 434
921faa52 435$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
c97b9003 436 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
fecd2382 437
7420b02b 438clean-here:
542e1629 439 -rm -f $(STAGESTUFF) core
fecd2382 440
daa7e184
ILT
441clean mostlyclean: clean-here
442 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 443 @if [ -d testsuite ] ; then \
daa7e184 444 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
7420b02b
JL
445 else true; fi
446
fecd2382 447# Like clean but also delete the links made to configure gas.
daa7e184
ILT
448distclean realclean: clean-here
449 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 450 @if [ -d testsuite ] ; then \
daa7e184 451 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
7420b02b 452 else true; fi
b11fb939 453 -rm -f config.status Makefile targ-env.h targ-cpu.h \
7420b02b 454 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
65ad84c1 455 config-stamp config.h conf config.log config.cache
542e1629 456
fecd2382
RP
457# Entry points `install', `includes' and `uninstall'.
458
459# Copy the files into directories where they will be run.
542e1629 460install:
7420b02b 461 srcroot=`cd $(srcroot); pwd`; export srcroot; \
c97b9003 462 $(INSTALL_XFORM) as.new $(bindir)/as; \
7420b02b 463 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
fa156ffe 464 n=`t='$(program_transform_name)'; echo as | sed $$t`; \
efbfb612
ILT
465 if [ -d $(tooldir) ]; then \
466 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
467 rm -f $(tooldir)/bin/as; \
ac7f7dfe 468 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
efbfb612
ILT
469 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
470 else true; fi
a5a4b5ac
SC
471 srcroot=`cd $(srcroot); pwd`; export srcroot; \
472 $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \
fa156ffe 473 n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac
SC
474 if [ -d $(tooldir) ]; then \
475 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
476 rm -f $(tooldir)/bin/gasp; \
ac7f7dfe
ILT
477 ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \
478 || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \
a5a4b5ac 479 else true; fi
fecd2382 480
fecd2382
RP
481# Cancel installation by deleting the installed files.
482uninstall:
fa156ffe 483 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
7e10f53c
ILT
484 rm -f $(bindir)/$$n; \
485 rm -f $(mandir)/$$n.1
fa156ffe 486 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac 487 rm -f $(bindir)/$$n; \
542e1629 488
fecd2382
RP
489# These exist for maintenance purposes.
490
491tags TAGS: force
787c6bfe 492 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
ac7f7dfe 493
542e1629 494bootstrap: as.new force
fecd2382 495 $(MAKE) stage1
ac7f7dfe 496 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 497 $(MAKE) stage2
ac7f7dfe 498 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 499 $(MAKE) comparison against=stage2
fecd2382
RP
500
501bootstrap2: force
ac7f7dfe 502 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 503 $(MAKE) stage2
ac7f7dfe 504 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
da0b2bff 505 $(MAKE) comparison against=stage2
fecd2382
RP
506
507bootstrap3: force
ac7f7dfe 508 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 509 $(MAKE) comparison against=stage2
fecd2382
RP
510
511# Copy the object files from a particular stage into a subdirectory.
512stage1: force
513 -mkdir stage1
514 -mv $(STAGESTUFF) stage1
81f73963 515 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
516
517stage2: force
518 -mkdir stage2
519 -mv $(STAGESTUFF) stage2
81f73963 520 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
521
522stage3: force
523 -mkdir stage3
6a3958b2 524 -mv $(STAGESTUFF) stage3
81f73963 525 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 526
a01bf1fb
RP
527against=stage2
528
529comparison: force
530 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
531
6a3958b2 532de-stage1: force
b3cd8555 533 - (cd stage1 ; rm -f as ; mv -f * ..)
6a3958b2
RP
534 - rmdir stage1
535
536de-stage2: force
b3cd8555 537 - (cd stage2 ; rm -f as ; mv -f * ..)
6a3958b2
RP
538 - rmdir stage2
539
540de-stage3: force
b3cd8555 541 - (cd stage3 ; rm -f as ; mv -f * ..)
6a3958b2 542 - rmdir stage3
fecd2382 543
fecd2382 544#In GNU Make, ignore whether `stage*' exists.
daa7e184
ILT
545.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
546.PHONY: TAGS bootstrap
fecd2382
RP
547
548force:
549
fc00f451 550Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
1be01033 551 $(srcdir)/configure.in config.status
a26878d1 552 $(SHELL) ./config.status
This page took 0.14872 seconds and 4 git commands to generate.