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