* Makefile.in (TOOL_PROGS): Include dlltool if needed.
[deliverable/binutils-gdb.git] / binutils / Makefile.in
1 # Makefile for GNU binary-file utilities
2 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
3
4 # This file is part of GNU binutils.
5
6 # This program 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 of the License, or
9 # (at your option) any later version.
10 #
11 # This program 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.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 program_transform_name =
25 exec_prefix = $(prefix)
26 bindir = $(exec_prefix)/bin
27 libdir = $(exec_prefix)/lib
28 tooldir = $(exec_prefix)/$(target_alias)
29
30 datadir = $(prefix)/lib
31 mandir = $(prefix)/man
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
41 infodir = $(prefix)/info
42 includedir = $(prefix)/include
43 docdir = $(datadir)/doc
44
45 SHELL = /bin/sh
46
47 INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
51 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
52
53 AR = ar
54 AR_FLAGS = qv
55 CFLAGS = -g
56 MAKEINFO = makeinfo
57 TEXI2DVI = texi2dvi
58 RANLIB = ranlib
59 BISONFLAGS = -d
60 TEXI2ROFF=texi2roff
61 MAKEOVERRIDES=
62 CC_FOR_BUILD = $(CC)
63 NM_FOR_TARGET = nm
64 NM = $(NM_FOR_TARGET)
65 SYMLINK = ln -s
66
67 BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
68 # Comment these out if using lex.
69 LEX_OPTIONS = -I -Cem
70 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
71
72 # Distribution version
73 VERSION=cygnus-2.5.3
74 # Distribution name
75 DIST_NAME=binutils-${VERSION}
76
77 version=`./../gcc/gcc -dumpversion`
78
79 # Where to find texinfo.tex to format docn with TeX
80 TEXIDIR = $(srcdir)/../texinfo
81
82 #CC=gcc -Wall
83 CC=cc
84 # these two are almost the same program
85 AR_PROG=ar
86 RANLIB_PROG=ranlib
87
88 # objcopy and strip should be the same program
89 OBJCOPY_PROG=objcopy
90 STRIP_PROG=strip.new
91
92 STRINGS_PROG=strings
93
94 # These should all be the same program too.
95 SIZE_PROG=size
96 NM_PROG=nm.new
97 OBJDUMP_PROG=objdump
98
99 # This is the demangler, as a standalone program.
100 # Note: This one is used as the installed name too, unlike the above.
101 DEMANGLER_PROG=c++filt
102
103 NLMCONV_PROG=nlmconv
104 DLLTOOL_PROG=dlltool
105
106 SRCONV_PROG=srconv sysdump coffdump
107
108
109
110 MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
111
112 PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) $(BUILD_NLMCONV) $(BUILD_SRCONV) $(SYSINFO_PROG) $(BUILD_DLLTOOL)
113 STAGESTUFF = $(PROGS) *.o
114 # Files that can be generated, but should be in the distribution.
115 # Don't build $(DEMANGLER_PROG).1, since its name may vary with the
116 # configuration.
117 DISTSTUFF=arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c
118
119 # Stuff that goes in tooldir/ if appropriate
120 TOOL_PROGS = nm.new strip.new ar ranlib $(DLLTOOL)
121
122 BASEDIR = $(srcdir)/..
123 BFDDIR = $(BASEDIR)/bfd
124 INCDIR = $(BASEDIR)/include
125 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
126
127 #### host and target dependant Makefile fragments come in here.
128 ###
129
130 ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
131
132 .c.o:
133 $(CC) -c $(ALL_CFLAGS) $<
134
135 #\f
136 ## Random definitions
137 # Hopefully all these may be flushed once we get configuration down pat.
138
139 # alloca only needed for systems which don't have it and when cc != gcc.
140 # ALLOCA = alloca.o
141
142 # nm tries to malloc enough space for the string table. The old GNU malloc
143 # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
144 # fail unnecessarily. I've also seen some Unix malloc's fail, even when
145 # there is enough memory. So use the new GNU malloc.
146 # MALLOC = gmalloc.o
147 # Use this if the system malloc is good enough.
148 MALLOC =
149
150 # Use the GNU getopt unless you have problems with it.
151 # The IRIS version could probably benefit from being assembled with
152 # libmalloc rather than the ordinary malloc.
153 LIBIBERTY = ../libiberty/libiberty.a
154
155 # Code shared by all the binutils.
156 BULIBS = bucomm.o version.o filemode.o
157
158 ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
159
160 BFD = ../bfd/libbfd.a
161 OPCODES = ../opcodes/libopcodes.a
162
163 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
164 echo $${rootme}/../expect/expect ; \
165 else echo expect ; fi`
166 RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
167 echo ${srcdir}/../dejagnu/runtest ; \
168 else echo runtest ; fi`
169 RUNTESTFLAGS =
170
171 FLAGS_TO_PASS = \
172 "CC=$(CC)" \
173 "CFLAGS=$(CFLAGS)" \
174 "RUNTEST=$(RUNTEST)" \
175 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
176 #\f
177 ## The rules
178
179 all: $(ADDL_LIBS) $(PROGS)
180
181 # These targets are for the dejagnu testsuites. The file site.exp
182 # contains global variables that all the testsuites will use.
183
184 site.exp: ./config.status Makefile
185 @echo "Making a new config file..."
186 @rm -f ./tmp?
187 @touch site.exp
188 @mv site.exp site.bak
189 @echo "## variables are automatically generated by make ##" > ./tmp0
190 @echo "# Do not edit here. If you wish to override these" >> ./tmp0
191 @echo "# values, add them to the last section" >> ./tmp0
192 @echo "# HOST AND TARGET INFO" >> ./tmp0
193 @echo "set host_os $(host_os)" >> ./tmp0
194 @echo "set host_alias $(host_alias)" >> ./tmp0
195 @echo "set host_cpu $(host_cpu)" >> ./tmp0
196 @echo "set host_vendor $(host_vendor)" >> ./tmp0
197 @echo "set target_os $(target_os)" >> ./tmp0
198 @echo "set target_alias $(target_alias)" >> ./tmp0
199 @echo "set target_cpu $(target_cpu)" >> ./tmp0
200 @echo "set target_vendor $(target_vendor)" >> ./tmp0
201 @echo "set host_triplet $(host_canonical)" >> ./tmp0
202 @echo "set target_triplet $(target_canonical)" >> ./tmp0
203 @echo "# DIRECTORY INFO" >> ./tmp0
204 @echo "set objdir `pwd`" >> ./tmp0
205 @echo "" >> ./tmp0
206 @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
207 @cat ./tmp0 > site.exp
208 @cat site.bak | sed \
209 -e '1,/^## Variables generated by.*##/ d' >> site.exp
210 -@rm -f ./tmp?
211
212 check: site.exp
213 rootme=`pwd`; export rootme ; \
214 srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
215 EXPECT=${EXPECT} ; export EXPECT ; \
216 if [ -f $$rootme/../expect/expect ] ; then \
217 TCL_LIBRARY=$${srcroot}/../tcl/library ; \
218 export TCL_LIBRARY ; else true; fi ; \
219 $(RUNTEST) --tool binutils --srcdir $(srcdir)/testsuite \
220 $(RUNTESTFLAGS)
221
222 installcheck:
223 /bin/sh $(srcdir)/sanity.sh $(bindir)
224
225 info: binutils.info
226
227 dvi: binutils.dvi
228
229 $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
230 $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS)
231
232 $(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
233 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(EXTRALIBS)
234
235 $(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
236 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS)
237
238 $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
239 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
240
241 $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
242 $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
243
244 $(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
245 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
246
247 underscore.c: Makefile
248 rm -f underscore.c
249 echo '/*WARNING: This file is automatically generated!*/' >underscore.t
250 echo "int prepends_underscore = $(UNDERSCORE);" >>underscore.t
251 mv -f underscore.t underscore.c
252
253 version.o: version.c Makefile
254 $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
255
256 cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
257 $(CC) -c -DMAIN -DVERSION='"$(VERSION)"' $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
258
259 $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o
260 $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o
261
262 arparse.c: arparse.y
263 $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y
264 mv -f y.tab.c arparse.c
265 mv -f y.tab.h arparse.h
266
267 # Separate from arparse.c so that a parallel make doesn't try to build
268 # both arparse.c and arparse.h simultaneously.
269 arparse.h: arparse.c
270
271 arlex.c: arlex.l
272 $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
273 mv lex.yy.c arlex.c
274
275 $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
276 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
277
278 $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
279 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
280
281 # This rule creates a single binary that switches between ar and ranlib
282 # by looking at argv[0]. Use this kludge to save some disk space.
283 # However, you have to install things by hand.
284 # (That is after 'make install', replace the installed ranlib by a link to ar.)
285
286 # Alternatively, you can install ranlib.sh as ranlib.
287
288 ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
289 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
290 -rm -f $(RANLIB_PROG)
291 -ln $(AR_PROG) $(RANLIB_PROG)
292
293 # objcopy and strip in one binary that uses argv[0] to decide its action.
294
295 objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
296 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
297 -rm -f $(STRIP_PROG)
298 -ln $(OBJCOPY_PROG) $(STRIP_PROG)
299
300 sysroff.c: sysinfo sysroff.info
301 ./sysinfo -c <$(srcdir)/sysroff.info >sysroff.c
302 ./sysinfo -i <$(srcdir)/sysroff.info >>sysroff.c
303 ./sysinfo -g <$(srcdir)/sysroff.info >>sysroff.c
304
305 sysroff.h: sysinfo sysroff.info
306 ./sysinfo -d <$(srcdir)/sysroff.info >sysroff.h
307
308 # Depend upon arparse.c to avoid building both arparse.c and sysinfo.c
309 # simultaneously.
310 sysinfo.c: sysinfo.y arparse.c
311 $(BISON) -tvd $(srcdir)/sysinfo.y
312 rm -f sysinfo.c
313 mv -f y.tab.c sysinfo.c
314 mv -f y.tab.h sysinfo.h
315
316 # Separate from sysinfo.c so that a parallel make doesn't try to build
317 # both sysinfo.c and sysinfo.h simultaneously.
318 sysinfo.h: sysinfo.c
319
320 syslex.c : syslex.l
321 $(LEX) $(LEX_OPTIONS) $(srcdir)/syslex.l
322 mv lex.yy.c syslex.c
323
324 sysinfo: sysinfo.o syslex.o
325 $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
326
327 syslex.o: syslex.c sysinfo.h
328 if [ -r syslex.c ]; then \
329 $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \
330 else \
331 $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/syslex.c ;\
332 fi
333
334 sysinfo.o: sysinfo.c
335 if [ -r sysinfo.c ]; then \
336 $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \
337 else \
338 $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
339 fi
340
341 srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
342 ../bfd/libcoff.h
343
344 srconv: srconv.o coffgrok.o $(ADDL_LIBS)
345 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
346
347 dlltool:dlltool.o defparse.o deflex.o
348 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dlltool.o defparse.o deflex.o $(ADDL_LIBS) $(EXTRALIBS)
349
350 defparse.c:defparse.y
351 $(BISON) $(BISONFLAGS) $(srcdir)/defparse.y
352 mv -f y.tab.c defparse.c
353 mv -f y.tab.h defparse.h
354
355 defparse.h: defparse.c
356
357 deflex.c:deflex.l
358 $(LEX) $(LEX_OPTIONS) $(srcdir)/deflex.l
359 mv lex.yy.c deflex.c
360
361 dlltool.o:dlltool.c
362 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(DLLTOOL_DEFS) $(CFLAGS) $(srcdir)/dlltool.c
363
364 coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
365 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
366
367 sysdump.o: sysdump.c sysroff.h sysroff.c
368
369 sysdump: sysdump.o $(ADDL_LIBS)
370 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
371
372 # Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c
373 # simultaneously.
374 nlmheader.c: nlmheader.y sysinfo.c
375 $(BISON) $(srcdir)/nlmheader.y
376 rm -f nlmheader.c
377 mv -f y.tab.c nlmheader.c
378
379 nlmconv.o: nlmconv.c
380 ldname=`t='$(program_transform_name)'; echo ld | sed -e "s/brokensed/brokensed/" $$t`; \
381 $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(NLMCONV_DEFS) $(CFLAGS) $(srcdir)/nlmconv.c
382
383 $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
384 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
385
386 # This list of dependencies was generated by doing a make with gcc -MM
387 # saving the output in a file and removing the gcc commands
388 # changing "../../devo/binutils/../bfd" to "$(BFDDIR)"
389 # removing "../../devo/binutils/"
390 # changing "../include" to "$(INCDIR)"
391
392 bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
393 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
394 $(INCDIR)/fopen-same.h bucomm.h
395 filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
396 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
397 $(INCDIR)/fopen-same.h
398 size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
399 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
400 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
401 objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
402 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
403 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
404 $(INCDIR)/dis-asm.h $(INCDIR)/aout/aout64.h \
405 $(INCDIR)/elf/internal.h $(INCDIR)/aout/stab.def
406 nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
407 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
408 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/getopt.h \
409 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
410 $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
411 ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
412 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
413 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/aout/ar.h \
414 $(BFDDIR)/libbfd.h arsup.h
415 arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
416 $(INCDIR)/obstack.h arsup.h
417 arlex.o: arlex.c ./arparse.h
418 not-ranlib.o: not-ranlib.c
419 arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
420 $(INCDIR)/obstack.h arsup.h bucomm.h
421 strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
422 $(INCDIR)/obstack.h bucomm.h
423 objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
424 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
425 $(INCDIR)/fopen-same.h bucomm.h
426 is-strip.o: is-strip.c
427 is-ranlib.o: is-ranlib.c
428 not-strip.o: not-strip.c
429 nlmheader.o: nlmheader.c ../bfd/bfd.h ../bfd/sysdep.h \
430 $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
431 $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h nlmconv.h
432 nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/libiberty.h ../bfd/sysdep.h \
433 $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
434 $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h \
435 $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h \
436 $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
437
438 stage1: force
439 - mkdir stage1
440 - mv -f $(STAGESTUFF) stage1
441
442 stage2: force
443 - mkdir stage2
444 - mv -f $(STAGESTUFF) stage2
445
446 stage3: force
447 - mkdir stage3
448 - mv -f $(STAGESTUFF) stage3
449
450 against=stage2
451
452 comparison: force
453 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
454
455 de-stage1: force
456 - (cd stage1 ; mv -f * ..)
457 - rmdir stage1
458
459 de-stage2: force
460 - (cd stage2 ; mv -f * ..)
461 - rmdir stage2
462
463 de-stage3: force
464 - (cd stage3 ; mv -f * ..)
465 - rmdir stage3
466
467 ###
468 # DOCUMENTATION TARGETS
469 config.texi: Makefile
470 rm -f config.texi
471 echo '@set VERSION $(VERSION)' > config.texi
472 # TeX output
473 binutils.dvi: $(srcdir)/binutils.texi config.texi
474 TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/binutils.texi
475
476 # info file for online browsing
477 binutils.info: $(srcdir)/binutils.texi config.texi
478 $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
479
480 $(DEMANGLER_PROG).1: cxxfilt.man Makefile
481 sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
482 > $(DEMANGLER_PROG).1
483
484 # different targets for -ms, -mm, -me
485 # Try to use a recent texi2roff. v2 was put on prep in jan91.
486 # If you want an index, see texi2roff doc for postprocessing
487 # and add -i to texi2roff invocations below.
488 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
489 # corresponding -e lines when later texi2roff's are current)
490 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
491 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
492 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
493 # + @alphaenumerate is ridiculously new, turned into @enumerate
494
495 # roff output (-ms)
496 binutils.ms: $(srcdir)/binutils.texi
497 sed -e '/\\input texinfo/d' \
498 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
499 -e '/^@ifinfo/,/^@end ifinfo/d' \
500 -e '/^@c/d' \
501 -e 's/{.*,,/{/' \
502 -e 's/@ / /g' \
503 -e 's/^@alphaenumerate/@enumerate/g' \
504 -e 's/^@end alphaenumerate/@end enumerate/g' \
505 $(srcdir)/binutils.texi | \
506 $(TEXI2ROFF) -ms | \
507 sed -e 's/---/\\(em/g' \
508 >binutils.ms
509
510 # roff output (-mm)
511 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
512 # try leaving them in
513 binutils.mm: $(srcdir)/binutils.texi
514 sed -e '/\\input texinfo/d' \
515 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
516 -e '/^@ifinfo/,/^@end ifinfo/d' \
517 -e '/^@c/d' \
518 -e 's/{.*,,/{/' \
519 -e '/@noindent/d' \
520 -e 's/@ / /g' \
521 -e 's/^@alphaenumerate/@enumerate/g' \
522 -e 's/^@end alphaenumerate/@end enumerate/g' \
523 $(srcdir)/binutils.texi | \
524 $(TEXI2ROFF) -mm | \
525 sed -e 's/---/\\(em/g' \
526 >binutils.mm
527
528 # roff output (-me)
529 binutils.me: $(srcdir)/binutils.texi
530 sed -e '/\\input texinfo/d' \
531 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
532 -e '/^@ifinfo/,/^@end ifinfo/d' \
533 -e '/^@c/d' \
534 -e 's/{.*,,/{/' \
535 -e 's/@ / /g' \
536 -e 's/^@alphaenumerate/@enumerate/g' \
537 -e 's/^@end alphaenumerate/@end enumerate/g' \
538 $(srcdir)/binutils.texi | \
539 $(TEXI2ROFF) -me | \
540 sed -e 's/---/\\(em/g' \
541 >binutils.me
542
543
544 ###
545
546 mostlyclean:
547 -rm -f *.o *~ \#* core binutils.?? binutils.??? y.output
548 -rm -rf tmpdir
549 clean: mostlyclean
550 -rm -f $(PROGS) underscore.c sysroff sysroff.c sysroff.h sysinfo
551 distclean:
552 -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
553 binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
554 -rm -f $(PROGS) underscore.c
555 realclean: clean distclean
556 -rm -f $(DISTSTUFF) *.info TAGS
557
558 etags tags: TAGS
559
560 TAGS: force
561 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
562
563 install: all $(DEMANGLER_PROG).1
564 for i in $(PROGS) ; do \
565 $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
566 done
567 for i in $(MANPAGES) ; do \
568 $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
569 done
570 $(INSTALL_XFORM1) $(DEMANGLER_PROG).1 $(man1dir)/$(DEMANGLER_PROG).1
571 -if [ -d $(tooldir) ]; then \
572 if [ -d $(tooldir)/bin ]; then true; else mkdir $(tooldir)/bin; fi; \
573 for i in $(TOOL_PROGS) ; do \
574 j=`echo $$i | sed -e 's/.new//'`; \
575 rm -f $(tooldir)/bin/$$j; \
576 k=`t='$(program_transform_name)'; echo $$j | sed -e s/x/x/ $$t`; \
577 ln $(bindir)/$$k $(tooldir)/bin/$$j >/dev/null 2>/dev/null \
578 || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$j; \
579 done; \
580 else true; fi
581
582 # This little path search is required because in the FSF net releases,
583 # the info files are included in the source tree, and that may not be
584 # the same as the build directory.
585 install-info: binutils.info
586 if [ -r binutils.info ]; then \
587 dir=. ; \
588 else \
589 dir=$(srcdir) ; \
590 fi ; \
591 for i in `cd $$dir; echo binutils.info*` ; do \
592 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
593 done
594
595 clean-info:
596 -rm -rf *.info*
597
598 # Making a dist:
599 # cvs rtag binutils-x-yy ld+utils
600 # cvs co -r binutils-x-yy ld+utils
601 # Sanitize
602 # cd {HERE}; make dist [-f Makefile.in]
603
604 dist: $(DIST_NAME).tar.z
605
606 diststuff: $(DISTSTUFF) info
607
608 $(DIST_NAME).tar.z:
609 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
610 make diststuff -f Makefile.in
611 cd ../ld; make diststuff -f Makefile.in
612 cd ../gprof; make diststuff -f Makefile.in
613 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
614 # Take out texinfo from configurable dirs
615 mv ../configure.in tmp; \
616 sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
617 cd ..; chmod og=u `find . -print`
618 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
619 rm -rf ../../$(DIST_NAME)
620
621 #-----------------------------------------------------------------------------
622 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
623 #
624 # 'VERSION' file must be present and contain a string of the form "x.y"
625 #-----------------------------------------------------------------------------
626
627 ver960.c: FORCE
628 rm -f ver960.c
629 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
630
631
632 # Dummy target to force execution of dependent targets.
633 #
634 force:
635
636 # Target to uncomment host-specific lines in this makefile. Such lines must
637 # have the following string beginning in column 1: #__<hostname>__#
638 # Original Makefile is backed up as 'Makefile.old'.
639 #
640 # Invoke with: make make HOST=xxx
641 #
642 make:
643 -@if test $(HOST)x = x ; then \
644 echo '\aSpecify "make make HOST=???"'; \
645 exit 1; \
646 fi ; \
647 grep -s "^#The next line was generated by 'make make'" Makefile; \
648 if test $$? = 0 ; then \
649 echo "\aMakefile has already been processed with 'make make'";\
650 exit 1; \
651 fi ; \
652 mv -f Makefile Makefile.old; \
653 echo "#The next line was generated by 'make make'" >Makefile ; \
654 echo "HOST=$(HOST)" >>Makefile ; \
655 echo >>Makefile ; \
656 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
657
658 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
659 $(SHELL) ./config.status
660
661 ### Local Variables: ***
662 ### mode:fundamental ***
663 ### page-delimiter: "^#\f" ***
664 ### End: ***
665 ### end of file
This page took 0.051736 seconds and 5 git commands to generate.