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