* Makefile.in: Use CFLAGS as well as LDFLAGS when linking.
[deliverable/binutils-gdb.git] / binutils / Makefile.in
CommitLineData
d8474a9b 1# Makefile for GNU binary-file utilities
4f15fb27 2# Copyright (C) 1992, 1993 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
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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
RP
48INSTALL_PROGRAM = $(INSTALL)
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=
b5132a6b 62
f50af42b
KR
63NM_FOR_TARGET = nm
64NM = $(NM_FOR_TARGET)
8d5d0e11
PB
65SYMLINK = ln -s
66
9752f9fd 67BISON = `if [ -f ../byacc/byacc ] ; then echo ../byacc/byacc ; else echo byacc ; 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
94333f27 73VERSION=cygnus-2.3.1
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
4f15fb27 82MANPAGES= ar nm objdump ranlib size strings strip c++filt objcopy
84396dcf 83
a10d26a1 84#CC=gcc -Wall
06a97fbd 85# these two are almost the same program
a10d26a1
RP
86AR_PROG=ar
87RANLIB_PROG=ranlib
99a42820 88
df14d957
ILT
89# objcopy and strip should be the same program
90OBJCOPY_PROG=objcopy
a10d26a1 91STRIP_PROG=strip
99a42820 92
4f15fb27
DM
93STRINGS_PROG=strings
94
99a42820 95# These should all be the same program too.
a10d26a1
RP
96SIZE_PROG=size
97NM_PROG=nm
98OBJDUMP_PROG=objdump
99a42820 99
c921e2aa 100# This is the demangler, as a standalone program.
df14d957 101DEMANGLER_PROG=c++filt
c921e2aa 102
29078b29
ILT
103NLMCONV_PROG=nlmconv
104
a6762b10 105PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) $(BUILD_NLMCONV)
a01bf1fb 106STAGESTUFF = $(PROGS) *.o
8d5d0e11 107# Files that can be generated, but should be in the distribution.
94333f27 108DISTSTUFF=arparse.c arlex.c nlmheader.c info
99a42820 109
40773f7f 110BASEDIR = $(srcdir)/..
bba04d93
DM
111BFDDIR = $(BASEDIR)/bfd
112INCDIR = $(BASEDIR)/include
113INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
a10d26a1 114
a10d26a1
RP
115#### host and target dependant Makefile fragments come in here.
116###
117
d8e89b6b 118.c.o:
bba04d93 119 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $<
99a42820 120
99a42820
RP
121#\f
122## Random definitions
123# Hopefully all these may be flushed once we get configuration down pat.
124
125# alloca only needed for systems which don't have it and when cc != gcc.
126# ALLOCA = alloca.o
127
128# nm tries to malloc enough space for the string table. The old GNU malloc
129# rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
130# fail unnecessarily. I've also seen some Unix malloc's fail, even when
131# there is enough memory. So use the new GNU malloc.
132# MALLOC = gmalloc.o
133
134# Use the GNU getopt unless you have problems with it.
135# The IRIS version could probably benefit from being assembled with
136# libmalloc rather than the ordinary malloc.
bba04d93 137LIBIBERTY = ../libiberty/libiberty.a
99a42820
RP
138
139# Code shared by all the binutils.
a10d26a1 140BULIBS = bucomm.o version.o filemode.o
99a42820 141
5a070355 142ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
99a42820 143
bba04d93
DM
144BFD = ../bfd/libbfd.a
145OPCODES = ../opcodes/libopcodes.a
f6dddd4e 146
df14d957 147RUNTEST = runtest
94333f27 148RUNTEST_FLAGS =
f6dddd4e 149FLAGS_TO_PASS = \
4447efa2
ILT
150 "CC=$(CC)" \
151 "CFLAGS=$(CFLAGS)" \
df14d957 152 "RUNTEST=$(RUNTEST)" \
94333f27 153 "RUNTEST_FLAGS=$(RUNTEST_FLAGS) \
f6dddd4e 154 SIZE=`if [ -f $$rootme/$(SIZE_PROG) ] ; then echo $$rootme/$(SIZE_PROG) ; else echo $(SIZE_PROG); fi` \
df14d957 155 OBJCOPY=`if [ -f $$rootme/$(OBJCOPY_PROG) ] ; then echo $$rootme/$(OBJCOPY_PROG) ; else echo $(OBJCOPY_PROG); fi` \
f6dddd4e
PB
156 NM=`if [ -f $$rootme/$(NM_PROG) ] ; then echo $$rootme/$(NM_PROG) ; else echo $(NM_PROG); fi` \
157 AR=`if [ -f $$rootme/$(AR_PROG) ] ; then echo $$rootme/$(AR_PROG) ; else echo $(AR_PROG); fi` \
158 OBJDUMP=`if [ -f $$rootme/$(OBJDUMP_PROG) ] ; then echo $$rootme/$(OBJDUMP_PROG) ; else echo $(OBJDUMP_PROG); fi` \
4f15fb27 159 STRINGS=`if [ -f $$rootme/$(STRINGS_PROG) ] ; then echo $$rootme/$(STRINGS_PROG) ; else echo $(STRINGS_PROG); fi` \
f6dddd4e
PB
160 STRIP=`if [ -f $$rootme/$(STRIP_PROG) ] ; then echo $$rootme/$(STRIP_PROG) ; else echo $(STRIP_PROG); fi` \
161 RANLIB=`if [ -f $$rootme/$(RANLIB_PROG) ] ; then echo $$rootme/$(RANLIB_PROG) ; else echo $(RANLIB_PROG); fi` \
162 DEMANGLE=`if [ -f $$rootme/$(DEMANGLER_PROG) ] ; then echo $$rootme/$(DEMANGLER_PROG) ; else echo $(DEMANGLER_PROG); fi`"
163
99a42820
RP
164#\f
165## The rules
166
f6dddd4e 167all: $(ADDL_LIBS) $(PROGS)
4f8b1219
MW
168
169testsuite:
238aa238
DZ
170 if [ -f testsuite/Makefile.in ]; then \
171 (rootme=`pwd`/ ; export rootme ; \
172 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
173 cd testsuite; $(MAKE) FLAGS_TO_PASS=$(FLAGS_TO_PASS)); \
3048fb38 174 else true ; fi
c83497f5 175
f6dddd4e
PB
176check: force
177 rootme=`pwd`; export rootme; cd testsuite ; \
178 $(MAKE) check $(FLAGS_TO_PASS)
179# /bin/sh $(srcdir)/sanity.sh .
d8e89b6b 180
f7ed13c7 181installcheck:
7d6cc102
RP
182 /bin/sh $(srcdir)/sanity.sh $(bindir)
183
d8e89b6b 184info: binutils.info
a10d26a1 185
c921e2aa
FF
186dvi: binutils.dvi
187
a10d26a1 188$(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
94333f27 189 $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 190
df14d957 191$(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
94333f27 192 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(EXTRALIBS)
d8e89b6b 193
4f15fb27 194$(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
94333f27 195 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS)
4f15fb27 196
df14d957 197$(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
94333f27 198 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 199
d6a4c375 200$(NM_PROG): $(ADDL_LIBS) nm.o demangle.o $(BFD)
94333f27 201 $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o demangle.o $(ADDL_LIBS) $(EXTRALIBS)
99a42820 202
29078b29 203$(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
94333f27 204 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
bba04d93 205
f993f087 206objdump.o: objdump.c config.status
bba04d93 207 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(ARCHDEFS) $(CFLAGS) $(srcdir)/objdump.c
99a42820 208
f50af42b
KR
209underscore.c:
210 echo "int xxy_us_dummy;" >dummy.c
211 $(CC) -c dummy.c
f993f087 212 rm -f underscore.c
f50af42b 213 echo '/*WARNING: This file is automatically generated!*/' >underscore.c
d34c55c6 214 if [ "`$(NM) dummy.o | grep _xxy_us_dummy ; true`" != "" ]; then \
f50af42b
KR
215 echo "int prepends_underscore = 1;" >>underscore.c; \
216 else \
217 echo "int prepends_underscore = 0;" >>underscore.c; \
218 fi
219 -rm -f dummy.c dummy.o
220
bba04d93
DM
221version.o: version.c
222 $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
223
d6a4c375
DM
224demangle.o: $(BASEDIR)/libiberty/cplus-dem.c
225 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
226 mv cplus-dem.o demangle.o
227
228# For parallel compiling, depend on demangle.o so that one gets done first.
229cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h demangle.o
bba04d93 230 $(CC) -c -DMAIN $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
f50af42b 231
29078b29 232$(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o version.o
94333f27 233 $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o version.o
c921e2aa 234
bba04d93 235arparse.c: arparse.y
9752f9fd
ME
236 $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y
237 -mv y.tab.c arparse.c
238 -mv y.tab.h arparse.h
d8e89b6b 239
9752f9fd
ME
240arlex.c: arlex.l
241 $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
242 mv lex.yy.c arlex.c
d8e89b6b
RP
243
244$(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
94333f27 245 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
d8e89b6b
RP
246
247$(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
94333f27 248 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
06a97fbd
PB
249
250# This rule creates a single binary that switches between ar and ranlib
251# by looking at argv[0]. Use this kludge to save some disk space.
252# However, you have to install things by hand.
253# (That is after 'make install', replace the installed ranlib by a link to ar.)
254
255# Alternatively, you can install ranlib.sh as ranlib.
256
257ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
94333f27 258 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
a10d26a1
RP
259 -rm -f $(RANLIB_PROG)
260 -ln $(AR_PROG) $(RANLIB_PROG)
99a42820 261
df14d957 262# objcopy and strip in one binary that uses argv[0] to decide its action.
d8e89b6b 263
df14d957 264objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
94333f27 265 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
a10d26a1 266 -rm -f $(STRIP_PROG)
df14d957 267 -ln $(OBJCOPY_PROG) $(STRIP_PROG)
99a42820 268
29078b29 269nlmheader.c: nlmheader.y
bba04d93 270 $(BISON) $(srcdir)/nlmheader.y
29078b29 271 rm -f nlmheader.c
bba04d93 272 -mv y.tab.c nlmheader.c
29078b29
ILT
273
274$(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
94333f27 275 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
bba04d93
DM
276
277# This list of dependencies was generated by doing a make with gcc -MM
278# saving the output in a file and removing the gcc commands
279# changing "../../devo/binutils/../bfd" to "$(BFDDIR)"
280# removing "../../devo/binutils/"
281# changing "../include" to "$(INCDIR)"
282
283bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
284 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
285 $(INCDIR)/fopen-same.h
286filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
287 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
288 $(INCDIR)/fopen-same.h
289size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
290 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
291 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
292objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
293 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
294 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
295 $(INCDIR)/dis-asm.h $(INCDIR)/aout/aout64.h \
296 $(INCDIR)/elf/internal.h $(INCDIR)/aout/stab.def
297nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
298 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
299 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/getopt.h \
300 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
d6a4c375 301 $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
bba04d93
DM
302ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
303 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
304 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/aout/ar.h \
305 $(BFDDIR)/libbfd.h arsup.h
306arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
307 $(INCDIR)/obstack.h arsup.h
308arlex.o: arlex.c ./arparse.h
309not-ranlib.o: not-ranlib.c
310arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
311 $(INCDIR)/obstack.h arsup.h bucomm.h
312strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
313 $(INCDIR)/obstack.h bucomm.h
314objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
315 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
316 $(INCDIR)/fopen-same.h bucomm.h
317is-strip.o: is-strip.c
318is-ranlib.o: is-ranlib.c
319not-strip.o: not-strip.c
320nlmheader.o: nlmheader.c nlmconv.h $(INCDIR)/nlm/common.h \
321 $(INCDIR)/nlm/internal.h
322nlmconv.o: nlmconv.c nlmconv.h $(INCDIR)/nlm/common.h \
f993f087 323 $(INCDIR)/nlm/internal.h $(BFDDIR)/libnlm.h bucomm.h
29078b29 324
6a3958b2
RP
325stage1: force
326 - mkdir stage1
a01bf1fb 327 - mv -f $(STAGESTUFF) stage1
6a3958b2
RP
328
329stage2: force
330 - mkdir stage2
a01bf1fb 331 - mv -f $(STAGESTUFF) stage2
6a3958b2
RP
332
333stage3: force
334 - mkdir stage3
a01bf1fb
RP
335 - mv -f $(STAGESTUFF) stage3
336
337against=stage2
338
339comparison: force
340 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
6a3958b2
RP
341
342de-stage1: force
343 - (cd stage1 ; mv -f * ..)
344 - rmdir stage1
345
346de-stage2: force
347 - (cd stage2 ; mv -f * ..)
348 - rmdir stage2
349
350de-stage3: force
351 - (cd stage3 ; mv -f * ..)
352 - rmdir stage3
353
6b583720
RP
354######################################################################
355# DOCUMENTATION TARGETS
356# TeX output
2226a090 357binutils.dvi: $(srcdir)/binutils.texi
94333f27 358 TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/binutils.texi
b7a11ec2 359
6b583720 360# info file for online browsing
2226a090 361binutils.info: $(srcdir)/binutils.texi
6141fd50 362 $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
b7a11ec2 363
0c10ff03 364# different targets for -ms, -mm, -me
c83497f5
RP
365# Try to use a recent texi2roff. v2 was put on prep in jan91.
366# If you want an index, see texi2roff doc for postprocessing
367# and add -i to texi2roff invocations below.
368# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
94333f27 369# corresponding -e lines when later texi2roff's are current)
c83497f5
RP
370# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
371# + @c's deleted explicitly because texi2roff sees texinfo commands in them
372# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
373# + @alphaenumerate is ridiculously new, turned into @enumerate
374
0c10ff03 375# roff output (-ms)
2226a090 376binutils.ms: $(srcdir)/binutils.texi
6b583720
RP
377 sed -e '/\\input texinfo/d' \
378 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
379 -e '/^@ifinfo/,/^@end ifinfo/d' \
380 -e '/^@c/d' \
2226a090 381 -e 's/{.*,,/{/' \
c83497f5
RP
382 -e 's/@ / /g' \
383 -e 's/^@alphaenumerate/@enumerate/g' \
384 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 385 $(srcdir)/binutils.texi | \
d8e89b6b 386 $(TEXI2ROFF) -ms | \
c83497f5
RP
387 sed -e 's/---/\\(em/g' \
388 >binutils.ms
6b583720 389
0c10ff03 390# roff output (-mm)
c83497f5
RP
391# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
392# try leaving them in
2226a090 393binutils.mm: $(srcdir)/binutils.texi
0c10ff03
RP
394 sed -e '/\\input texinfo/d' \
395 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
396 -e '/^@ifinfo/,/^@end ifinfo/d' \
397 -e '/^@c/d' \
2226a090
RP
398 -e 's/{.*,,/{/' \
399 -e '/@noindent/d' \
c83497f5
RP
400 -e 's/@ / /g' \
401 -e 's/^@alphaenumerate/@enumerate/g' \
402 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 403 $(srcdir)/binutils.texi | \
d8e89b6b 404 $(TEXI2ROFF) -mm | \
2226a090
RP
405 sed -e 's/---/\\(em/g' \
406 >binutils.mm
0c10ff03
RP
407
408# roff output (-me)
2226a090 409binutils.me: $(srcdir)/binutils.texi
0c10ff03
RP
410 sed -e '/\\input texinfo/d' \
411 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
c83497f5
RP
412 -e '/^@ifinfo/,/^@end ifinfo/d' \
413 -e '/^@c/d' \
2226a090 414 -e 's/{.*,,/{/' \
c83497f5
RP
415 -e 's/@ / /g' \
416 -e 's/^@alphaenumerate/@enumerate/g' \
417 -e 's/^@end alphaenumerate/@end enumerate/g' \
2226a090 418 $(srcdir)/binutils.texi | \
d8e89b6b 419 $(TEXI2ROFF) -me | \
c83497f5
RP
420 sed -e 's/---/\\(em/g' \
421 >binutils.me
0c10ff03
RP
422
423
6b583720
RP
424######################################################################
425
8d5d0e11 426mostlyclean:
3f97524f 427 -rm -f *.o *~ \#* core binutils.?? binutils.???
8d5d0e11 428clean: mostlyclean
94333f27
ILT
429 @if [ -d testsuite ] ; then \
430 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean ; \
431 else true; fi
f50af42b 432 -rm -f $(PROGS) underscore.c
94333f27
ILT
433distclean:
434 @if [ -d testsuite ] ; then \
435 cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) distclean ; \
436 else true; fi
437 -rm -f Makefile config.status sysdep.h *.o *~ \#* core \
438 binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
439realclean: clean distclean
8d5d0e11 440 -rm -f $(DISTSTUFF) TAGS
99a42820
RP
441
442etags tags: TAGS
443
6a3958b2 444TAGS: force
bba04d93 445 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
99a42820 446
c83497f5 447install: all
238aa238
DZ
448 for i in $(PROGS) ; do \
449 $(INSTALL_XFORM) $$i $(bindir)/$$i ; \
99a42820 450 done
238aa238
DZ
451 for i in $(MANPAGES) ; do \
452 $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
de53632c 453 done
3f97524f
DZ
454 -if [ -d $(tooldir) ]; then \
455 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
94333f27 456 for i in nm strip ar ranlib; do \
3f97524f
DZ
457 rm -f $(tooldir)/bin/$$i; \
458 ln $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` $(tooldir)/bin/$$i \
459 || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$i; \
460 done; \
461 else true; fi
c83497f5 462
94333f27
ILT
463# Use binutils.info as the target so that VPATH will DTRT.
464# (Use "$<*" in case the output is multiple files, though.)
465install-info: binutils.info
466 for i in $<* ; do \
d8e89b6b 467 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
84396dcf 468 done
99a42820 469
d8e89b6b
RP
470clean-info:
471 -rm -rf *.info*
472
e2fe2df4 473# Making a dist:
ee948e4e
PB
474# cvs rtag binutils-x-yy ld+utils
475# cvs co -r binutils-x-yy ld+utils
e2fe2df4
PB
476# Sanitize
477# cd {HERE}; make dist [-f Makefile.in]
478
f50af42b 479dist: $(DIST_NAME).tar.z
8539db10 480
8d5d0e11
PB
481diststuff: $(DISTSTUFF)
482
f50af42b 483$(DIST_NAME).tar.z:
b27d2046 484 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
8d5d0e11
PB
485 make diststuff -f Makefile.in
486 cd ../ld; make diststuff -f Makefile.in
3f97524f 487 cd ../gprof; make diststuff -f Makefile.in
7f7b0a77 488 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
2e8adbd7
PB
489 # Take out texinfo from configurable dirs
490 mv ../configure.in tmp; \
491 sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
492 cd ..; chmod og=u `find . -print`
f50af42b 493 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
b27d2046 494 rm -rf ../../$(DIST_NAME)
8539db10 495
99a42820
RP
496#-----------------------------------------------------------------------------
497# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
498#
499# 'VERSION' file must be present and contain a string of the form "x.y"
500#-----------------------------------------------------------------------------
501
502ver960.c: FORCE
503 rm -f ver960.c
504 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
505
506
507# Dummy target to force execution of dependent targets.
508#
6a3958b2 509force:
99a42820
RP
510
511# Target to uncomment host-specific lines in this makefile. Such lines must
512# have the following string beginning in column 1: #__<hostname>__#
513# Original Makefile is backed up as 'Makefile.old'.
514#
515# Invoke with: make make HOST=xxx
516#
517make:
518 -@if test $(HOST)x = x ; then \
519 echo '\aSpecify "make make HOST=???"'; \
520 exit 1; \
521 fi ; \
522 grep -s "^#The next line was generated by 'make make'" Makefile; \
523 if test $$? = 0 ; then \
524 echo "\aMakefile has already been processed with 'make make'";\
525 exit 1; \
526 fi ; \
527 mv -f Makefile Makefile.old; \
528 echo "#The next line was generated by 'make make'" >Makefile ; \
529 echo "HOST=$(HOST)" >>Makefile ; \
530 echo >>Makefile ; \
531 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
532
f1eb48b6 533Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 534 $(SHELL) ./config.status
99a42820
RP
535
536### Local Variables: ***
537### mode:fundamental ***
538### page-delimiter: "^#\f" ***
539### End: ***
540### end of file
This page took 0.113282 seconds and 4 git commands to generate.