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