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 | ||
b21e6e53 | 56 | VERSION=cygnus-2.4.90 |
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 \ | |
b21e6e53 KR |
243 | ../libiberty/concat.o \ |
244 | ../libiberty/getopt.o \ | |
245 | ../libiberty/getopt1.o \ | |
c92d9ee9 KR |
246 | ../libiberty/getruntime.o |
247 | ||
1df6e266 | 248 | all: .gdbinit as.new gasp.new |
7420b02b JL |
249 | @srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
250 | (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) | |
79a54a5b | 251 | |
7420b02b JL |
252 | dvi info install-info clean-info: |
253 | @srcroot=`cd $(srcroot); pwd`; export srcroot; \ | |
254 | (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@) | |
fecd2382 | 255 | |
c20c7506 JL |
256 | make-gas.com: stamp-mk.com |
257 | stamp-mk.com: vmsconf.sh Makefile | |
c92d9ee9 | 258 | sh $(srcdir)/vmsconf.sh $(OBJS) $(VMS_OTHER_OBJS) > new-make.com |
c20c7506 JL |
259 | $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com |
260 | touch stamp-mk.com | |
261 | ||
fecd2382 RP |
262 | # Now figure out from those variables how to compile and link. |
263 | ||
264 | # This is the variable actually used when we compile. | |
420065a5 | 265 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) |
fecd2382 | 266 | |
fecd2382 RP |
267 | # How to link with both our special library facilities |
268 | # and the system's installed libraries. | |
f6b67e4c | 269 | |
b11fb939 | 270 | LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a |
fecd2382 RP |
271 | |
272 | # Specify the directories to be searched for header files. | |
273 | # Both . and srcdir are used, in that order, | |
274 | # so that tm.h and config.h will be found in the compilation | |
275 | # subdirectory rather than in the source directory. | |
c7072f56 | 276 | INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(srcdir)/../include -I$(srcdir)/.. |
1058238c | 277 | SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config |
fecd2382 RP |
278 | |
279 | # Always use -I$(srcdir)/config when compiling. | |
280 | .c.o: | |
281 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $< | |
282 | ||
283 | # This tells GNU make version 3 not to export all the variables | |
284 | # defined in this file into the environment. | |
285 | .NOEXPORT: | |
542e1629 | 286 | |
fecd2382 | 287 | # Files to be copied away after each stage in building. |
c20c7506 | 288 | STAGESTUFF = *.o as.new gasp.new |
fecd2382 | 289 | |
b11fb939 | 290 | $(OBJS): @ALL_OBJ_DEPS@ |
c92d9ee9 | 291 | |
7f2cb270 | 292 | as.new: $(OBJS) $(LIBS) |
da0b2bff | 293 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) |
fecd2382 | 294 | |
b11fb939 KR |
295 | $(OBJS): config.h |
296 | ||
a5a4b5ac SC |
297 | gasp.new: gasp.o |
298 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new gasp.o $(LIBS) $(LOADLIBES) | |
299 | ||
c97b9003 DZ |
300 | installcheck: |
301 | @echo No installcheck target is available yet for the GNU assembler. | |
302 | ||
0b3d0999 | 303 | check: |
c97b9003 DZ |
304 | @(here=`pwd` ; export here ; \ |
305 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check) | |
787c6bfe | 306 | |
b11fb939 KR |
307 | config.status: configure |
308 | if [ -r config.status ]; then \ | |
1be01033 | 309 | sh ./config.status --recheck ; \ |
b11fb939 KR |
310 | else \ |
311 | echo You must configure gas. Look at the INSTALL file for details. ; \ | |
312 | exit 1 ; \ | |
313 | fi | |
314 | ||
fc00f451 | 315 | config.h: config-stamp ; @true |
b11fb939 | 316 | config-stamp: Makefile conf |
fc00f451 | 317 | -rm -f config.new config-stamp |
1e84ff7e KR |
318 | echo '/* config.h. Generated automatically by make. */' > config.new |
319 | echo '#ifndef GAS_VERSION' >> config.new | |
b11fb939 KR |
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 | ||
620a590e | 329 | gasp.o : gasp.c config.h |
b11fb939 | 330 | app.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 | 333 | as.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 | 337 | atof-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 | 340 | bignum-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 | 344 | cond.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 | 348 | debug.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 | 352 | expr.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 | 356 | flonum-konst.o : flonum-konst.c flonum.h bignum.h |
b11fb939 | 357 | flonum-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 |
360 | flonum-mult.o : flonum-mult.c flonum.h bignum.h | |
b11fb939 | 361 | frags.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 | 365 | hash.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 |
368 | hex-value.o : hex-value.c | |
b11fb939 | 369 | input-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 |
373 | input-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 | 378 | listing.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 | 381 | literal.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 | 384 | messages.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 | 387 | output-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 | 391 | read.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 | 394 | subsegs.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 | 398 | symbols.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 | 402 | write.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 | 406 | ecoff.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 | 412 | stabs.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 | 416 | xmalloc.o : xmalloc.c |
b11fb939 | 417 | atof-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 | 421 | obj-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 | 425 | targ-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 | 432 | doc: $(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 | |
367d6244 KR |
437 | diststuff: make-gas.com |
438 | ||
7420b02b | 439 | clean-here: |
542e1629 | 440 | -rm -f $(STAGESTUFF) core |
fecd2382 | 441 | |
daa7e184 | 442 | clean mostlyclean: clean-here |
367d6244 | 443 | -rm -f make-gas.com |
daa7e184 | 444 | @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@ |
7420b02b | 445 | @if [ -d testsuite ] ; then \ |
daa7e184 | 446 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \ |
7420b02b JL |
447 | else true; fi |
448 | ||
fecd2382 | 449 | # Like clean but also delete the links made to configure gas. |
367d6244 | 450 | distclean: clean-here |
daa7e184 | 451 | @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@ |
7420b02b | 452 | @if [ -d testsuite ] ; then \ |
daa7e184 | 453 | cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $@ ; \ |
7420b02b | 454 | else true; fi |
b11fb939 | 455 | -rm -f config.status Makefile targ-env.h targ-cpu.h \ |
7420b02b | 456 | targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \ |
65ad84c1 | 457 | config-stamp config.h conf config.log config.cache |
367d6244 | 458 | realclean: clean distclean |
542e1629 | 459 | |
fecd2382 RP |
460 | # Entry points `install', `includes' and `uninstall'. |
461 | ||
462 | # Copy the files into directories where they will be run. | |
542e1629 | 463 | install: |
7420b02b | 464 | srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
c97b9003 | 465 | $(INSTALL_XFORM) as.new $(bindir)/as; \ |
7420b02b | 466 | $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \ |
28d3e4a3 | 467 | n=`echo as | sed '$(program_transform_name)'`; \ |
efbfb612 ILT |
468 | if [ -d $(tooldir) ]; then \ |
469 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
470 | rm -f $(tooldir)/bin/as; \ | |
ac7f7dfe | 471 | ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \ |
efbfb612 ILT |
472 | || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \ |
473 | else true; fi | |
a5a4b5ac SC |
474 | srcroot=`cd $(srcroot); pwd`; export srcroot; \ |
475 | $(INSTALL_XFORM) gasp.new $(bindir)/gasp; \ | |
28d3e4a3 | 476 | n=`echo gasp | sed '$(program_transform_name)' `; \ |
a5a4b5ac SC |
477 | if [ -d $(tooldir) ]; then \ |
478 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ | |
479 | rm -f $(tooldir)/bin/gasp; \ | |
ac7f7dfe ILT |
480 | ln $(bindir)/$$n $(tooldir)/bin/gasp >/dev/null 2>/dev/null \ |
481 | || $(INSTALL_PROGRAM) gasp.new $(tooldir)/bin/gasp; \ | |
a5a4b5ac | 482 | else true; fi |
fecd2382 | 483 | |
fecd2382 RP |
484 | # Cancel installation by deleting the installed files. |
485 | uninstall: | |
fa156ffe | 486 | -n=`t='$(program_transform_name)'; echo as | sed $$t`; \ |
7e10f53c ILT |
487 | rm -f $(bindir)/$$n; \ |
488 | rm -f $(mandir)/$$n.1 | |
fa156ffe | 489 | -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \ |
a5a4b5ac | 490 | rm -f $(bindir)/$$n; \ |
542e1629 | 491 | |
fecd2382 RP |
492 | # These exist for maintenance purposes. |
493 | ||
494 | tags TAGS: force | |
787c6bfe | 495 | etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in |
ac7f7dfe | 496 | |
542e1629 | 497 | bootstrap: as.new force |
fecd2382 | 498 | $(MAKE) stage1 |
ac7f7dfe | 499 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new |
fecd2382 | 500 | $(MAKE) stage2 |
ac7f7dfe | 501 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new |
a01bf1fb | 502 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
503 | |
504 | bootstrap2: force | |
ac7f7dfe | 505 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new |
fecd2382 | 506 | $(MAKE) stage2 |
ac7f7dfe | 507 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new |
da0b2bff | 508 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
509 | |
510 | bootstrap3: force | |
ac7f7dfe | 511 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new |
a01bf1fb | 512 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
513 | |
514 | # Copy the object files from a particular stage into a subdirectory. | |
515 | stage1: force | |
516 | -mkdir stage1 | |
517 | -mv $(STAGESTUFF) stage1 | |
81f73963 | 518 | if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi |
fecd2382 RP |
519 | |
520 | stage2: force | |
521 | -mkdir stage2 | |
522 | -mv $(STAGESTUFF) stage2 | |
81f73963 | 523 | if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi |
fecd2382 RP |
524 | |
525 | stage3: force | |
526 | -mkdir stage3 | |
6a3958b2 | 527 | -mv $(STAGESTUFF) stage3 |
81f73963 | 528 | if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi |
fecd2382 | 529 | |
a01bf1fb RP |
530 | against=stage2 |
531 | ||
532 | comparison: force | |
533 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
534 | ||
6a3958b2 | 535 | de-stage1: force |
b3cd8555 | 536 | - (cd stage1 ; rm -f as ; mv -f * ..) |
6a3958b2 RP |
537 | - rmdir stage1 |
538 | ||
539 | de-stage2: force | |
b3cd8555 | 540 | - (cd stage2 ; rm -f as ; mv -f * ..) |
6a3958b2 RP |
541 | - rmdir stage2 |
542 | ||
543 | de-stage3: force | |
b3cd8555 | 544 | - (cd stage3 ; rm -f as ; mv -f * ..) |
6a3958b2 | 545 | - rmdir stage3 |
fecd2382 | 546 | |
fecd2382 | 547 | #In GNU Make, ignore whether `stage*' exists. |
daa7e184 ILT |
548 | .PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean |
549 | .PHONY: TAGS bootstrap | |
fecd2382 RP |
550 | |
551 | force: | |
552 | ||
fc00f451 | 553 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \ |
1be01033 | 554 | $(srcdir)/configure.in config.status |
a26878d1 | 555 | $(SHELL) ./config.status |
1df6e266 KR |
556 | .gdbinit: $(srcdir)/gdbinit.in config.status |
557 | $(SHELL) ./config.status |