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