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