* Makefile.in (TOOL_PROGS): Include dlltool if needed.
[deliverable/binutils-gdb.git] / binutils / Makefile.in
CommitLineData
d8474a9b 1# Makefile for GNU binary-file utilities
37853673 2# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
d8474a9b
PB
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
125a4b58 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
99a42820 19
a10d26a1 20srcdir = .
84396dcf 21
d8e89b6b
RP
22prefix = /usr/local
23
3790af1d 24program_transform_name =
d8e89b6b
RP
25exec_prefix = $(prefix)
26bindir = $(exec_prefix)/bin
27libdir = $(exec_prefix)/lib
f6dddd4e 28tooldir = $(exec_prefix)/$(target_alias)
d8e89b6b
RP
29
30datadir = $(prefix)/lib
31mandir = $(prefix)/man
32man1dir = $(mandir)/man1
33man2dir = $(mandir)/man2
34man3dir = $(mandir)/man3
35man4dir = $(mandir)/man4
36man5dir = $(mandir)/man5
37man6dir = $(mandir)/man6
38man7dir = $(mandir)/man7
39man8dir = $(mandir)/man8
40man9dir = $(mandir)/man9
41infodir = $(prefix)/info
42includedir = $(prefix)/include
43docdir = $(datadir)/doc
84396dcf
RP
44
45SHELL = /bin/sh
d8e89b6b 46
5ebaf24b 47INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
d8e89b6b 48INSTALL_PROGRAM = $(INSTALL)
c06e55d9 49INSTALL_DATA = $(INSTALL)
29078b29 50INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
238aa238 51INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
d8e89b6b
RP
52
53AR = ar
54AR_FLAGS = qv
55CFLAGS = -g
d8e89b6b 56MAKEINFO = makeinfo
c921e2aa 57TEXI2DVI = texi2dvi
d8e89b6b 58RANLIB = ranlib
9752f9fd 59BISONFLAGS = -d
c83497f5 60TEXI2ROFF=texi2roff
29078b29 61MAKEOVERRIDES=
7bf6856e 62CC_FOR_BUILD = $(CC)
f50af42b
KR
63NM_FOR_TARGET = nm
64NM = $(NM_FOR_TARGET)
8d5d0e11
PB
65SYMLINK = ln -s
66
e52e2acd 67BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
45212e5e
PB
68# Comment these out if using lex.
69LEX_OPTIONS = -I -Cem
e2fe2df4 70LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
45212e5e 71
8539db10 72# Distribution version
125a4b58 73VERSION=cygnus-2.5.3
8539db10 74# Distribution name
d8e89b6b 75DIST_NAME=binutils-${VERSION}
8539db10 76
d8e89b6b 77version=`./../gcc/gcc -dumpversion`
b5132a6b 78
6b583720 79# Where to find texinfo.tex to format docn with TeX
94333f27 80TEXIDIR = $(srcdir)/../texinfo
b7a11ec2 81
a10d26a1 82#CC=gcc -Wall
c06e55d9 83CC=cc
06a97fbd 84# these two are almost the same program
a10d26a1
RP
85AR_PROG=ar
86RANLIB_PROG=ranlib
99a42820 87
df14d957
ILT
88# objcopy and strip should be the same program
89OBJCOPY_PROG=objcopy
06459c06 90STRIP_PROG=strip.new
99a42820 91
4f15fb27
DM
92STRINGS_PROG=strings
93
99a42820 94# These should all be the same program too.
a10d26a1 95SIZE_PROG=size
06459c06 96NM_PROG=nm.new
a10d26a1 97OBJDUMP_PROG=objdump
99a42820 98
c921e2aa 99# This is the demangler, as a standalone program.
c06e55d9 100# Note: This one is used as the installed name too, unlike the above.
df14d957 101DEMANGLER_PROG=c++filt
c921e2aa 102
29078b29 103NLMCONV_PROG=nlmconv
125a4b58 104DLLTOOL_PROG=dlltool
29078b29 105
c06e55d9
KR
106SRCONV_PROG=srconv sysdump coffdump
107
125a4b58
SC
108
109
1cf8bd3f 110MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
e52e2acd 111
125a4b58 112PROGS = $(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)
a01bf1fb 113STAGESTUFF = $(PROGS) *.o
8d5d0e11 114# Files that can be generated, but should be in the distribution.
125a4b58
SC
115# Don't build $(DEMANGLER_PROG).1, since its name may vary with the
116# configuration.
117DISTSTUFF=arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c
99a42820 118
b5775df3 119# Stuff that goes in tooldir/ if appropriate
125a4b58 120TOOL_PROGS = nm.new strip.new ar ranlib $(DLLTOOL)
b5775df3 121
40773f7f 122BASEDIR = $(srcdir)/..
bba04d93
DM
123BFDDIR = $(BASEDIR)/bfd
124INCDIR = $(BASEDIR)/include
125INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
a10d26a1 126
a10d26a1
RP
127#### host and target dependant Makefile fragments come in here.
128###
129
37853673
SS
130ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
131
d8e89b6b 132.c.o:
37853673 133 $(CC) -c $(ALL_CFLAGS) $<
99a42820 134
99a42820
RP
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
37853673
SS
147# Use this if the system malloc is good enough.
148MALLOC =
99a42820
RP
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.
bba04d93 153LIBIBERTY = ../libiberty/libiberty.a
99a42820
RP
154
155# Code shared by all the binutils.
a10d26a1 156BULIBS = bucomm.o version.o filemode.o
99a42820 157
5a070355 158ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
99a42820 159
bba04d93
DM
160BFD = ../bfd/libbfd.a
161OPCODES = ../opcodes/libopcodes.a
f6dddd4e 162
125a4b58
SC
163EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
164 echo $${rootme}/../expect/expect ; \
165 else echo expect ; fi`
166RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
167 echo ${srcdir}/../dejagnu/runtest ; \
168 else echo runtest ; fi`
169RUNTESTFLAGS =
170
f6dddd4e 171FLAGS_TO_PASS = \
4447efa2
ILT
172 "CC=$(CC)" \
173 "CFLAGS=$(CFLAGS)" \
df14d957 174 "RUNTEST=$(RUNTEST)" \
e52e2acd 175 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
99a42820
RP
176#\f
177## The rules
178
f6dddd4e 179all: $(ADDL_LIBS) $(PROGS)
4f8b1219 180
5903dfae
ILT
181# These targets are for the dejagnu testsuites. The file site.exp
182# contains global variables that all the testsuites will use.
183
184site.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
212check: site.exp
125a4b58 213 rootme=`pwd`; export rootme ; \
5903dfae
ILT
214 srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
215 EXPECT=${EXPECT} ; export EXPECT ; \
125a4b58 216 if [ -f $$rootme/../expect/expect ] ; then \
5903dfae 217 TCL_LIBRARY=$${srcroot}/../tcl/library ; \
9b14c27a 218 export TCL_LIBRARY ; else true; fi ; \
5903dfae
ILT
219 $(RUNTEST) --tool binutils --srcdir $(srcdir)/testsuite \
220 $(RUNTESTFLAGS)
d8e89b6b 221
f7ed13c7 222installcheck:
7d6cc102
RP
223 /bin/sh $(srcdir)/sanity.sh $(bindir)
224
d8e89b6b 225info: binutils.info
a10d26a1 226
c921e2aa
FF
227dvi: binutils.dvi
228
a10d26a1 229$(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
94333f27 230 $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 231
df14d957 232$(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
94333f27 233 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(EXTRALIBS)
d8e89b6b 234
4f15fb27 235$(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
94333f27 236 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS)
4f15fb27 237
df14d957 238$(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
94333f27 239 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 240
6f88f031
ILT
241$(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
242 $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 243
29078b29 244$(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
94333f27 245 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
bba04d93 246
6f88f031 247underscore.c: Makefile
f993f087 248 rm -f underscore.c
6f88f031
ILT
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
f50af42b 252
3bbea7af 253version.o: version.c Makefile
bba04d93
DM
254 $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
255
6f88f031 256cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
125a4b58 257 $(CC) -c -DMAIN -DVERSION='"$(VERSION)"' $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
f50af42b 258
125a4b58
SC
259$(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o
260 $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o
c921e2aa 261
3bbea7af 262arparse.c: arparse.y
9752f9fd 263 $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y
3bbea7af
ILT
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.
269arparse.h: arparse.c
d8e89b6b 270
9752f9fd
ME
271arlex.c: arlex.l
272 $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
273 mv lex.yy.c arlex.c
d8e89b6b
RP
274
275$(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
94333f27 276 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
d8e89b6b
RP
277
278$(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
94333f27 279 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
06a97fbd
PB
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
288ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
94333f27 289 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
a10d26a1
RP
290 -rm -f $(RANLIB_PROG)
291 -ln $(AR_PROG) $(RANLIB_PROG)
99a42820 292
df14d957 293# objcopy and strip in one binary that uses argv[0] to decide its action.
d8e89b6b 294
df14d957 295objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
94333f27 296 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
a10d26a1 297 -rm -f $(STRIP_PROG)
df14d957 298 -ln $(OBJCOPY_PROG) $(STRIP_PROG)
99a42820 299
e52e2acd
SC
300sysroff.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
f0eebb5f
JW
304
305sysroff.h: sysinfo sysroff.info
06459c06 306 ./sysinfo -d <$(srcdir)/sysroff.info >sysroff.h
e52e2acd 307
3bbea7af
ILT
308# Depend upon arparse.c to avoid building both arparse.c and sysinfo.c
309# simultaneously.
310sysinfo.c: sysinfo.y arparse.c
e52e2acd
SC
311 $(BISON) -tvd $(srcdir)/sysinfo.y
312 rm -f sysinfo.c
3bbea7af
ILT
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.
318sysinfo.h: sysinfo.c
e52e2acd
SC
319
320syslex.c : syslex.l
321 $(LEX) $(LEX_OPTIONS) $(srcdir)/syslex.l
322 mv lex.yy.c syslex.c
323
3bbea7af 324sysinfo: sysinfo.o syslex.o
7bf6856e
SC
325 $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
326
c06e55d9 327syslex.o: syslex.c sysinfo.h
3bbea7af
ILT
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
7bf6856e
SC
333
334sysinfo.o: sysinfo.c
3bbea7af
ILT
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
e52e2acd 340
f0eebb5f
JW
341srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
342 ../bfd/libcoff.h
343
344srconv: srconv.o coffgrok.o $(ADDL_LIBS)
e52e2acd
SC
345 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
346
125a4b58
SC
347dlltool:dlltool.o defparse.o deflex.o
348 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dlltool.o defparse.o deflex.o $(ADDL_LIBS) $(EXTRALIBS)
349
350defparse.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
355defparse.h: defparse.c
356
357deflex.c:deflex.l
358 $(LEX) $(LEX_OPTIONS) $(srcdir)/deflex.l
359 mv lex.yy.c deflex.c
360
361dlltool.o:dlltool.c
362 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(DLLTOOL_DEFS) $(CFLAGS) $(srcdir)/dlltool.c
363
e52e2acd
SC
364coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
365 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
366
5903dfae 367sysdump.o: sysdump.c sysroff.h sysroff.c
f0eebb5f
JW
368
369sysdump: sysdump.o $(ADDL_LIBS)
e52e2acd
SC
370 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
371
3bbea7af
ILT
372# Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c
373# simultaneously.
374nlmheader.c: nlmheader.y sysinfo.c
bba04d93 375 $(BISON) $(srcdir)/nlmheader.y
29078b29 376 rm -f nlmheader.c
3bbea7af 377 mv -f y.tab.c nlmheader.c
29078b29 378
37853673 379nlmconv.o: nlmconv.c
4e85e79f 380 ldname=`t='$(program_transform_name)'; echo ld | sed -e "s/brokensed/brokensed/" $$t`; \
9d11577a 381 $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(NLMCONV_DEFS) $(CFLAGS) $(srcdir)/nlmconv.c
37853673 382
29078b29 383$(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
94333f27 384 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
bba04d93
DM
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
392bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
393 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
37853673 394 $(INCDIR)/fopen-same.h bucomm.h
bba04d93
DM
395filemode.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
398size.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
401objdump.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
406nm.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 \
d6a4c375 410 $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
bba04d93
DM
411ar.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
415arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
416 $(INCDIR)/obstack.h arsup.h
417arlex.o: arlex.c ./arparse.h
418not-ranlib.o: not-ranlib.c
419arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
420 $(INCDIR)/obstack.h arsup.h bucomm.h
421strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
422 $(INCDIR)/obstack.h bucomm.h
423objcopy.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
426is-strip.o: is-strip.c
427is-ranlib.o: is-ranlib.c
428not-strip.o: not-strip.c
c59fa195
ILT
429nlmheader.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
432nlmconv.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
29078b29 437
6a3958b2
RP
438stage1: force
439 - mkdir stage1
a01bf1fb 440 - mv -f $(STAGESTUFF) stage1
6a3958b2
RP
441
442stage2: force
443 - mkdir stage2
a01bf1fb 444 - mv -f $(STAGESTUFF) stage2
6a3958b2
RP
445
446stage3: force
447 - mkdir stage3
a01bf1fb
RP
448 - mv -f $(STAGESTUFF) stage3
449
450against=stage2
451
452comparison: force
453 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
6a3958b2
RP
454
455de-stage1: force
456 - (cd stage1 ; mv -f * ..)
457 - rmdir stage1
458
459de-stage2: force
460 - (cd stage2 ; mv -f * ..)
461 - rmdir stage2
462
463de-stage3: force
464 - (cd stage3 ; mv -f * ..)
465 - rmdir stage3
466
125a4b58 467###
6b583720 468# DOCUMENTATION TARGETS
125a4b58
SC
469config.texi: Makefile
470 rm -f config.texi
471 echo '@set VERSION $(VERSION)' > config.texi
6b583720 472# TeX output
125a4b58 473binutils.dvi: $(srcdir)/binutils.texi config.texi
94333f27 474 TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/binutils.texi
b7a11ec2 475
6b583720 476# info file for online browsing
125a4b58 477binutils.info: $(srcdir)/binutils.texi config.texi
6141fd50 478 $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
b7a11ec2 479
c06e55d9
KR
480$(DEMANGLER_PROG).1: cxxfilt.man Makefile
481 sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
482 > $(DEMANGLER_PROG).1
483
0c10ff03 484# different targets for -ms, -mm, -me
c83497f5
RP
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
94333f27 489# corresponding -e lines when later texi2roff's are current)
c83497f5
RP
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
0c10ff03 495# roff output (-ms)
2226a090 496binutils.ms: $(srcdir)/binutils.texi
6b583720
RP
497 sed -e '/\\input texinfo/d' \
498 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
499 -e '/^@ifinfo/,/^@end ifinfo/d' \
500 -e '/^@c/d' \
2226a090 501 -e 's/{.*,,/{/' \
c83497f5
RP
502 -e 's/@ / /g' \
503 -e 's/^@alphaenumerate/@enumerate/g' \
504 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 505 $(srcdir)/binutils.texi | \
d8e89b6b 506 $(TEXI2ROFF) -ms | \
c83497f5
RP
507 sed -e 's/---/\\(em/g' \
508 >binutils.ms
6b583720 509
0c10ff03 510# roff output (-mm)
c83497f5
RP
511# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
512# try leaving them in
2226a090 513binutils.mm: $(srcdir)/binutils.texi
0c10ff03
RP
514 sed -e '/\\input texinfo/d' \
515 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
516 -e '/^@ifinfo/,/^@end ifinfo/d' \
517 -e '/^@c/d' \
2226a090
RP
518 -e 's/{.*,,/{/' \
519 -e '/@noindent/d' \
c83497f5
RP
520 -e 's/@ / /g' \
521 -e 's/^@alphaenumerate/@enumerate/g' \
522 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 523 $(srcdir)/binutils.texi | \
d8e89b6b 524 $(TEXI2ROFF) -mm | \
2226a090
RP
525 sed -e 's/---/\\(em/g' \
526 >binutils.mm
0c10ff03
RP
527
528# roff output (-me)
2226a090 529binutils.me: $(srcdir)/binutils.texi
0c10ff03
RP
530 sed -e '/\\input texinfo/d' \
531 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
532 -e '/^@ifinfo/,/^@end ifinfo/d' \
533 -e '/^@c/d' \
2226a090 534 -e 's/{.*,,/{/' \
c83497f5
RP
535 -e 's/@ / /g' \
536 -e 's/^@alphaenumerate/@enumerate/g' \
537 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 538 $(srcdir)/binutils.texi | \
d8e89b6b 539 $(TEXI2ROFF) -me | \
c83497f5
RP
540 sed -e 's/---/\\(em/g' \
541 >binutils.me
0c10ff03
RP
542
543
125a4b58 544###
6b583720 545
8d5d0e11 546mostlyclean:
125a4b58 547 -rm -f *.o *~ \#* core binutils.?? binutils.??? y.output
69b60892 548 -rm -rf tmpdir
8d5d0e11 549clean: mostlyclean
125a4b58 550 -rm -f $(PROGS) underscore.c sysroff sysroff.c sysroff.h sysinfo
94333f27 551distclean:
c06e55d9 552 -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
94333f27 553 binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
7bf6856e 554 -rm -f $(PROGS) underscore.c
94333f27 555realclean: clean distclean
125a4b58 556 -rm -f $(DISTSTUFF) *.info TAGS
99a42820
RP
557
558etags tags: TAGS
559
6a3958b2 560TAGS: force
bba04d93 561 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
99a42820 562
c06e55d9 563install: all $(DEMANGLER_PROG).1
238aa238 564 for i in $(PROGS) ; do \
06459c06 565 $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
99a42820 566 done
238aa238
DZ
567 for i in $(MANPAGES) ; do \
568 $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
de53632c 569 done
1cf8bd3f 570 $(INSTALL_XFORM1) $(DEMANGLER_PROG).1 $(man1dir)/$(DEMANGLER_PROG).1
3f97524f 571 -if [ -d $(tooldir) ]; then \
c063fc45 572 if [ -d $(tooldir)/bin ]; then true; else mkdir $(tooldir)/bin; fi; \
b5775df3 573 for i in $(TOOL_PROGS) ; do \
c063fc45
KR
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
c83497f5 581
c59fa195
ILT
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.
94333f27 585install-info: binutils.info
c59fa195
ILT
586 if [ -r binutils.info ]; then \
587 dir=. ; \
588 else \
589 dir=$(srcdir) ; \
590 fi ; \
c06e55d9 591 for i in `cd $$dir; echo binutils.info*` ; do \
6f383ce5 592 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
84396dcf 593 done
99a42820 594
d8e89b6b
RP
595clean-info:
596 -rm -rf *.info*
597
e2fe2df4 598# Making a dist:
ee948e4e
PB
599# cvs rtag binutils-x-yy ld+utils
600# cvs co -r binutils-x-yy ld+utils
e2fe2df4
PB
601# Sanitize
602# cd {HERE}; make dist [-f Makefile.in]
603
f50af42b 604dist: $(DIST_NAME).tar.z
8539db10 605
125a4b58 606diststuff: $(DISTSTUFF) info
8d5d0e11 607
f50af42b 608$(DIST_NAME).tar.z:
b27d2046 609 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
8d5d0e11
PB
610 make diststuff -f Makefile.in
611 cd ../ld; make diststuff -f Makefile.in
3f97524f 612 cd ../gprof; make diststuff -f Makefile.in
7f7b0a77 613 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
2e8adbd7
PB
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`
f50af42b 618 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
b27d2046 619 rm -rf ../../$(DIST_NAME)
8539db10 620
99a42820
RP
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
627ver960.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#
6a3958b2 634force:
99a42820
RP
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#
642make:
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
f1eb48b6 658Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 659 $(SHELL) ./config.status
99a42820
RP
660
661### Local Variables: ***
662### mode:fundamental ***
663### page-delimiter: "^#\f" ***
664### End: ***
665### end of file
This page took 0.306706 seconds and 4 git commands to generate.