* .gdbinit (pe, ps): Define new commands.
[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
b11fb939
KR
319 echo '#ifndef GAS_VERSION' > config.new
320 echo '#define GAS_VERSION "$(VERSION)"' >> config.new
321 echo '' >> config.new
322 cat conf >> config.new
323 echo '#endif /* GAS_VERSION */' >> config.new
fc00f451
KR
324 $(srcdir)/../move-if-change config.new config.h
325 touch config-stamp
326
fecd2382
RP
327# Compiling object files from source files.
328
a5a4b5ac 329gasp.o : gasp.c
b11fb939 330app.o : app.c as.h targ-env.h obj-format.h \
d1a9e594 331 targ-cpu.h struc-symbol.h \
fecd2382 332 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 333as.o : as.c as.h targ-env.h obj-format.h output-file.h \
d1a9e594 334 targ-cpu.h struc-symbol.h \
7f2cb270 335 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \
fc00f451 336 tc.h obj.h config.h
b11fb939 337atof-generic.o : atof-generic.c as.h targ-env.h obj-format.h \
d1a9e594 338 targ-cpu.h struc-symbol.h \
fecd2382 339 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 340bignum-copy.o : bignum-copy.c as.h \
fecd2382 341 targ-env.h obj-format.h \
d1a9e594 342 targ-cpu.h struc-symbol.h \
fecd2382 343 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 344cond.o : cond.c as.h targ-env.h obj-format.h \
d1a9e594 345 targ-cpu.h struc-symbol.h \
da7aaffb
SEF
346 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
347
b11fb939 348debug.o : debug.c as.h targ-env.h obj-format.h \
d1a9e594 349 targ-cpu.h struc-symbol.h \
fecd2382
RP
350 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
351 subsegs.h
b11fb939 352expr.o : expr.c as.h targ-env.h obj-format.h \
d1a9e594 353 targ-cpu.h struc-symbol.h \
da7aaffb
SEF
354 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
355
5d53038b 356flonum-konst.o : flonum-konst.c flonum.h bignum.h
b11fb939 357flonum-copy.o : flonum-copy.c as.h targ-env.h obj-format.h \
d1a9e594 358 targ-cpu.h struc-symbol.h \
fecd2382
RP
359 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
360flonum-mult.o : flonum-mult.c flonum.h bignum.h
b11fb939 361frags.o : frags.c as.h targ-env.h obj-format.h \
d1a9e594 362 targ-cpu.h struc-symbol.h \
fecd2382 363 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 364 subsegs.h
b11fb939 365hash.o : hash.c as.h targ-env.h obj-format.h \
d1a9e594 366 targ-cpu.h struc-symbol.h \
fecd2382
RP
367 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
368hex-value.o : hex-value.c
b11fb939 369input-file.o : input-file.c as.h \
fecd2382 370 targ-env.h obj-format.h targ-cpu.h \
d1a9e594 371 struc-symbol.h write.h flonum.h bignum.h expr.h \
fecd2382
RP
372 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
373input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
b11fb939 374 as.h targ-env.h obj-format.h \
d1a9e594 375 targ-cpu.h struc-symbol.h \
fecd2382
RP
376 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
377 input-file.h
b11fb939 378listing.o : listing.c as.h targ-env.h flonum.h bignum.h \
3340f7e5 379 listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
420065a5 380 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h subsegs.h
b11fb939 381literal.o : literal.c subsegs.h as.h targ-env.h obj-format.h \
c20c7506
JL
382 targ-cpu.h struc-symbol.h \
383 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 384messages.o : messages.c as.h targ-env.h obj-format.h \
d1a9e594 385 targ-cpu.h struc-symbol.h \
fecd2382 386 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 387output-file.o : output-file.c as.h targ-env.h obj-format.h \
d1a9e594 388 targ-cpu.h struc-symbol.h \
fecd2382
RP
389 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
390 output-file.h
b11fb939 391read.o : read.c as.h targ-env.h obj-format.h \
d1a9e594 392 targ-cpu.h struc-symbol.h \
da7aaffb 393 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
b11fb939 394subsegs.o : subsegs.c as.h targ-env.h obj-format.h \
d1a9e594 395 targ-cpu.h struc-symbol.h \
fecd2382 396 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 397 subsegs.h
b11fb939 398symbols.o : symbols.c as.h targ-env.h obj-format.h \
d1a9e594 399 targ-cpu.h struc-symbol.h \
fecd2382 400 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 401 subsegs.h
b11fb939 402write.o : write.c as.h targ-env.h obj-format.h \
d1a9e594 403 targ-cpu.h struc-symbol.h \
fecd2382 404 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 405 subsegs.h output-file.h
b11fb939 406ecoff.o : ecoff.c as.h targ-env.h obj-format.h \
9cc8106c
ILT
407 targ-cpu.h struc-symbol.h \
408 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
409 ecoff.h $(srcdir)/../include/coff/internal.h \
410 $(srcdir)/../include/coff/sym.h $(srcdir)/../include/coff/ecoff.h \
411 $(srcdir)/../include/coff/symconst.h $(srcdir)/../include/aout/stab_gnu.h
b11fb939 412stabs.o : stabs.c as.h targ-env.h obj-format.h \
c751ad19
ILT
413 targ-cpu.h struc-symbol.h \
414 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
415 subsegs.h $(srcdir)/../include/aout/stab_gnu.h
fecd2382 416xmalloc.o : xmalloc.c
b11fb939 417atof-targ.o : atof-targ.c as.h targ-env.h obj-format.h \
d1a9e594 418 targ-cpu.h struc-symbol.h \
fecd2382
RP
419 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
420 symbols.h tc.h obj.h
b11fb939 421obj-format.o : obj-format.c as.h targ-env.h obj-format.h \
d1a9e594 422 targ-cpu.h struc-symbol.h \
fecd2382 423 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
7f2cb270 424 subsegs.h symbols.h tc.h obj.h
69498fa2 425targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \
d1a9e594 426 targ-cpu.h struc-symbol.h \
fecd2382 427 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
da0b2bff 428 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
d1a9e594 429
fecd2382
RP
430# Remake the info files.
431
921faa52 432doc: $(srcdir)/as.info
fecd2382 433
921faa52 434$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
c97b9003 435 @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
fecd2382 436
7420b02b 437clean-here:
542e1629 438 -rm -f $(STAGESTUFF) core
fecd2382 439
daa7e184
ILT
440clean mostlyclean: clean-here
441 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 442 @if [ -d testsuite ] ; then \
daa7e184 443 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
7420b02b
JL
444 else true; fi
445
fecd2382 446# Like clean but also delete the links made to configure gas.
daa7e184
ILT
447distclean realclean: clean-here
448 @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
7420b02b 449 @if [ -d testsuite ] ; then \
daa7e184 450 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \
7420b02b 451 else true; fi
b11fb939 452 -rm -f config.status Makefile targ-env.h targ-cpu.h \
7420b02b 453 targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
65ad84c1 454 config-stamp config.h conf config.log config.cache
542e1629 455
fecd2382
RP
456# Entry points `install', `includes' and `uninstall'.
457
458# Copy the files into directories where they will be run.
542e1629 459install:
7420b02b 460 srcroot=`cd $(srcroot); pwd`; export srcroot; \
c97b9003 461 $(INSTALL_XFORM) as.new $(bindir)/as; \
7420b02b 462 $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
fa156ffe 463 n=`t='$(program_transform_name)'; echo as | sed $$t`; \
efbfb612
ILT
464 if [ -d $(tooldir) ]; then \
465 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
466 rm -f $(tooldir)/bin/as; \
ac7f7dfe 467 ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
efbfb612
ILT
468 || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
469 else true; fi
a5a4b5ac
SC
470 srcroot=`cd $(srcroot); pwd`; export srcroot; \
471 $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \
fa156ffe 472 n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac
SC
473 if [ -d $(tooldir) ]; then \
474 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
475 rm -f $(tooldir)/bin/gasp; \
ac7f7dfe
ILT
476 ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \
477 || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \
a5a4b5ac 478 else true; fi
fecd2382 479
fecd2382
RP
480# Cancel installation by deleting the installed files.
481uninstall:
fa156ffe 482 -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
7e10f53c
ILT
483 rm -f $(bindir)/$$n; \
484 rm -f $(mandir)/$$n.1
fa156ffe 485 -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
a5a4b5ac 486 rm -f $(bindir)/$$n; \
542e1629 487
fecd2382
RP
488# These exist for maintenance purposes.
489
490tags TAGS: force
787c6bfe 491 etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
ac7f7dfe 492
542e1629 493bootstrap: as.new force
fecd2382 494 $(MAKE) stage1
ac7f7dfe 495 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 496 $(MAKE) stage2
ac7f7dfe 497 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 498 $(MAKE) comparison against=stage2
fecd2382
RP
499
500bootstrap2: force
ac7f7dfe 501 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
fecd2382 502 $(MAKE) stage2
ac7f7dfe 503 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
da0b2bff 504 $(MAKE) comparison against=stage2
fecd2382
RP
505
506bootstrap3: force
ac7f7dfe 507 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
a01bf1fb 508 $(MAKE) comparison against=stage2
fecd2382
RP
509
510# Copy the object files from a particular stage into a subdirectory.
511stage1: force
512 -mkdir stage1
513 -mv $(STAGESTUFF) stage1
81f73963 514 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
fecd2382
RP
515
516stage2: force
517 -mkdir stage2
518 -mv $(STAGESTUFF) stage2
81f73963 519 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
fecd2382
RP
520
521stage3: force
522 -mkdir stage3
6a3958b2 523 -mv $(STAGESTUFF) stage3
81f73963 524 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
fecd2382 525
a01bf1fb
RP
526against=stage2
527
528comparison: force
529 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
530
6a3958b2 531de-stage1: force
b3cd8555 532 - (cd stage1 ; rm -f as ; mv -f * ..)
6a3958b2
RP
533 - rmdir stage1
534
535de-stage2: force
b3cd8555 536 - (cd stage2 ; rm -f as ; mv -f * ..)
6a3958b2
RP
537 - rmdir stage2
538
539de-stage3: force
b3cd8555 540 - (cd stage3 ; rm -f as ; mv -f * ..)
6a3958b2 541 - rmdir stage3
fecd2382 542
fecd2382 543#In GNU Make, ignore whether `stage*' exists.
daa7e184
ILT
544.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
545.PHONY: TAGS bootstrap
fecd2382
RP
546
547force:
548
fc00f451 549Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
1be01033 550 $(srcdir)/configure.in config.status
a26878d1 551 $(SHELL) ./config.status
This page took 0.150673 seconds and 4 git commands to generate.