| 1 | # Makefile for GNU binary-file utilities |
| 2 | # Copyright (C) 1989-1992 Free Software Foundation, Inc. |
| 3 | |
| 4 | # This file is part of GNU binutils. |
| 5 | |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 2 of the License, or |
| 9 | # (at your option) any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with this program; if not, write to the Free Software |
| 18 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 19 | |
| 20 | srcdir = . |
| 21 | |
| 22 | prefix = /usr/local |
| 23 | |
| 24 | program_transform_name = |
| 25 | exec_prefix = $(prefix) |
| 26 | bindir = $(exec_prefix)/bin |
| 27 | libdir = $(exec_prefix)/lib |
| 28 | tooldir = $(exec_prefix)/$(target_alias) |
| 29 | |
| 30 | datadir = $(prefix)/lib |
| 31 | mandir = $(prefix)/man |
| 32 | man1dir = $(mandir)/man1 |
| 33 | man2dir = $(mandir)/man2 |
| 34 | man3dir = $(mandir)/man3 |
| 35 | man4dir = $(mandir)/man4 |
| 36 | man5dir = $(mandir)/man5 |
| 37 | man6dir = $(mandir)/man6 |
| 38 | man7dir = $(mandir)/man7 |
| 39 | man8dir = $(mandir)/man8 |
| 40 | man9dir = $(mandir)/man9 |
| 41 | infodir = $(prefix)/info |
| 42 | includedir = $(prefix)/include |
| 43 | docdir = $(datadir)/doc |
| 44 | |
| 45 | SHELL = /bin/sh |
| 46 | |
| 47 | INSTALL = install -c |
| 48 | INSTALL_PROGRAM = $(INSTALL) |
| 49 | INSTALL_DATA = $(INSTALL) |
| 50 | |
| 51 | AR = ar |
| 52 | AR_FLAGS = qv |
| 53 | CFLAGS = -g |
| 54 | MAKEINFO = makeinfo |
| 55 | TEXI2DVI = texi2dvi |
| 56 | RANLIB = ranlib |
| 57 | BISONFLAGS = -d |
| 58 | TEXI2ROFF=texi2roff |
| 59 | |
| 60 | NM_FOR_TARGET = nm |
| 61 | NM = $(NM_FOR_TARGET) |
| 62 | SYMLINK = ln -s |
| 63 | |
| 64 | BISON = `if [ -f ../byacc/byacc ] ; then echo ../byacc/byacc ; else echo byacc ; fi` |
| 65 | # Comment these out if using lex. |
| 66 | LEX_OPTIONS = -I -Cem |
| 67 | LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi` |
| 68 | |
| 69 | # Distribution version |
| 70 | VERSION=2.2 |
| 71 | # Distribution name |
| 72 | DIST_NAME=binutils-${VERSION} |
| 73 | |
| 74 | version=`./../gcc/gcc -dumpversion` |
| 75 | |
| 76 | # Where to find texinfo.tex to format docn with TeX |
| 77 | TEXIDIR = $(srcdir)/../texinfo/fsf |
| 78 | |
| 79 | MANPAGES= ar nm objdump ranlib size strip |
| 80 | |
| 81 | #CC=gcc -Wall |
| 82 | # these two are almost the same program |
| 83 | AR_PROG=ar |
| 84 | RANLIB_PROG=ranlib |
| 85 | |
| 86 | # objcopy and strip should be the same program |
| 87 | OBJCOPY_PROG=objcopy |
| 88 | STRIP_PROG=strip |
| 89 | |
| 90 | # These should all be the same program too. |
| 91 | SIZE_PROG=size |
| 92 | NM_PROG=nm |
| 93 | OBJDUMP_PROG=objdump |
| 94 | |
| 95 | # This is the demangler, as a standalone program. |
| 96 | DEMANGLER_PROG=c++filt |
| 97 | |
| 98 | PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) |
| 99 | STAGESTUFF = $(PROGS) *.o |
| 100 | # Files that can be generated, but should be in the distribution. |
| 101 | DISTSTUFF=arparse.c arlex.c |
| 102 | |
| 103 | BASEDIR = $(srcdir)/.. |
| 104 | LIBDIR = ./../bfd |
| 105 | OPCODEDIR = ./../opcodes |
| 106 | |
| 107 | #### host and target dependant Makefile fragments come in here. |
| 108 | ### |
| 109 | |
| 110 | INCLUDES = -I. -I$(srcdir) -I$(BASEDIR)/include -I$(BASEDIR)/bfd |
| 111 | |
| 112 | .c.o: |
| 113 | $(CC) -c $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $< |
| 114 | |
| 115 | #\f |
| 116 | ## Random definitions |
| 117 | # Hopefully all these may be flushed once we get configuration down pat. |
| 118 | |
| 119 | # alloca only needed for systems which don't have it and when cc != gcc. |
| 120 | # ALLOCA = alloca.o |
| 121 | |
| 122 | # nm tries to malloc enough space for the string table. The old GNU malloc |
| 123 | # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might |
| 124 | # fail unnecessarily. I've also seen some Unix malloc's fail, even when |
| 125 | # there is enough memory. So use the new GNU malloc. |
| 126 | # MALLOC = gmalloc.o |
| 127 | |
| 128 | # Use the GNU getopt unless you have problems with it. |
| 129 | # The IRIS version could probably benefit from being assembled with |
| 130 | # libmalloc rather than the ordinary malloc. |
| 131 | LIBIBERTY_SRC_DIR = $(srcdir)/../libiberty |
| 132 | LIBIBERTY_BIN_DIR = ./../libiberty |
| 133 | LIBIBERTY = $(LIBIBERTY_BIN_DIR)/libiberty.a |
| 134 | |
| 135 | # Code shared by all the binutils. |
| 136 | BULIBS = bucomm.o version.o filemode.o |
| 137 | |
| 138 | ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY) |
| 139 | |
| 140 | BFD = $(LIBDIR)/libbfd.a |
| 141 | OPCODES = $(OPCODEDIR)/libopcodes.a |
| 142 | |
| 143 | RUNTEST = runtest |
| 144 | RUNTESTFLAGS = |
| 145 | FLAGS_TO_PASS = \ |
| 146 | "RUNTEST=$(RUNTEST)" \ |
| 147 | "RUNTESTFLAGS=$(RUNTESTFLAGS) \ |
| 148 | SIZE=`if [ -f $$rootme/$(SIZE_PROG) ] ; then echo $$rootme/$(SIZE_PROG) ; else echo $(SIZE_PROG); fi` \ |
| 149 | OBJCOPY=`if [ -f $$rootme/$(OBJCOPY_PROG) ] ; then echo $$rootme/$(OBJCOPY_PROG) ; else echo $(OBJCOPY_PROG); fi` \ |
| 150 | NM=`if [ -f $$rootme/$(NM_PROG) ] ; then echo $$rootme/$(NM_PROG) ; else echo $(NM_PROG); fi` \ |
| 151 | AR=`if [ -f $$rootme/$(AR_PROG) ] ; then echo $$rootme/$(AR_PROG) ; else echo $(AR_PROG); fi` \ |
| 152 | OBJDUMP=`if [ -f $$rootme/$(OBJDUMP_PROG) ] ; then echo $$rootme/$(OBJDUMP_PROG) ; else echo $(OBJDUMP_PROG); fi` \ |
| 153 | STRIP=`if [ -f $$rootme/$(STRIP_PROG) ] ; then echo $$rootme/$(STRIP_PROG) ; else echo $(STRIP_PROG); fi` \ |
| 154 | RANLIB=`if [ -f $$rootme/$(RANLIB_PROG) ] ; then echo $$rootme/$(RANLIB_PROG) ; else echo $(RANLIB_PROG); fi` \ |
| 155 | DEMANGLE=`if [ -f $$rootme/$(DEMANGLER_PROG) ] ; then echo $$rootme/$(DEMANGLER_PROG) ; else echo $(DEMANGLER_PROG); fi`" |
| 156 | |
| 157 | #\f |
| 158 | ## The rules |
| 159 | |
| 160 | all: $(ADDL_LIBS) $(PROGS) |
| 161 | |
| 162 | testsuite: |
| 163 | if [ -d testsuite ]; then \ |
| 164 | (rootme=`pwd`/ ; export rootme ; \ |
| 165 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ |
| 166 | cd testsuite; $(MAKE) FLAGS_TO_PASS=$(FLAGS_TO_PASS)); \ |
| 167 | else true ; fi |
| 168 | |
| 169 | check: force |
| 170 | rootme=`pwd`; export rootme; cd testsuite ; \ |
| 171 | $(MAKE) check $(FLAGS_TO_PASS) |
| 172 | # /bin/sh $(srcdir)/sanity.sh . |
| 173 | |
| 174 | installcheck: |
| 175 | /bin/sh $(srcdir)/sanity.sh $(bindir) |
| 176 | |
| 177 | info: binutils.info |
| 178 | |
| 179 | dvi: binutils.dvi |
| 180 | |
| 181 | #$(BFD):$(LIBDIR)/../common/*.c |
| 182 | # (cd $(LIBDIR); make) |
| 183 | |
| 184 | $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD) |
| 185 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(LOADLIBES) |
| 186 | |
| 187 | $(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD) |
| 188 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(LOADLIBES) |
| 189 | |
| 190 | $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD) |
| 191 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(LOADLIBES) |
| 192 | |
| 193 | $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD) |
| 194 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(LOADLIBES) |
| 195 | |
| 196 | $(OBJDUMP_PROG): $(ADDL_LIBS) size.o objdump.o $(BFD) $(OPCODES) |
| 197 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(LOADLIBES) |
| 198 | |
| 199 | underscore.c: |
| 200 | echo "int xxy_us_dummy;" >dummy.c |
| 201 | $(CC) -c dummy.c |
| 202 | echo '/*WARNING: This file is automatically generated!*/' >underscore.c |
| 203 | if [ "`$(NM) dummy.o | grep _xxy_us_dummy`" != "" ]; then \ |
| 204 | echo "int prepends_underscore = 1;" >>underscore.c; \ |
| 205 | else \ |
| 206 | echo "int prepends_underscore = 0;" >>underscore.c; \ |
| 207 | fi |
| 208 | -rm -f dummy.c dummy.o |
| 209 | |
| 210 | cplus-dem.o: $(LIBIBERTY_SRC_DIR)/cplus-dem.c |
| 211 | $(CC) -c -DMAIN $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(LIBIBERTY_SRC_DIR)/cplus-dem.c |
| 212 | |
| 213 | $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o |
| 214 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(LOADLIBES) underscore.o |
| 215 | |
| 216 | arparse.c:arparse.y |
| 217 | $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y |
| 218 | -mv y.tab.c arparse.c |
| 219 | -mv y.tab.h arparse.h |
| 220 | |
| 221 | |
| 222 | arlex.c: arlex.l |
| 223 | $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l |
| 224 | mv lex.yy.c arlex.c |
| 225 | |
| 226 | $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o |
| 227 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(LOADLIBES) |
| 228 | |
| 229 | $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD) |
| 230 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(LOADLIBES) |
| 231 | |
| 232 | # This rule creates a single binary that switches between ar and ranlib |
| 233 | # by looking at argv[0]. Use this kludge to save some disk space. |
| 234 | # However, you have to install things by hand. |
| 235 | # (That is after 'make install', replace the installed ranlib by a link to ar.) |
| 236 | |
| 237 | # Alternatively, you can install ranlib.sh as ranlib. |
| 238 | |
| 239 | ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD) |
| 240 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(LOADLIBES) |
| 241 | -rm -f $(RANLIB_PROG) |
| 242 | -ln $(AR_PROG) $(RANLIB_PROG) |
| 243 | |
| 244 | # objcopy and strip in one binary that uses argv[0] to decide its action. |
| 245 | |
| 246 | objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD) |
| 247 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(LOADLIBES) |
| 248 | -rm -f $(STRIP_PROG) |
| 249 | -ln $(OBJCOPY_PROG) $(STRIP_PROG) |
| 250 | |
| 251 | stage1: force |
| 252 | - mkdir stage1 |
| 253 | - mv -f $(STAGESTUFF) stage1 |
| 254 | |
| 255 | stage2: force |
| 256 | - mkdir stage2 |
| 257 | - mv -f $(STAGESTUFF) stage2 |
| 258 | |
| 259 | stage3: force |
| 260 | - mkdir stage3 |
| 261 | - mv -f $(STAGESTUFF) stage3 |
| 262 | |
| 263 | against=stage2 |
| 264 | |
| 265 | comparison: force |
| 266 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done |
| 267 | |
| 268 | de-stage1: force |
| 269 | - (cd stage1 ; mv -f * ..) |
| 270 | - rmdir stage1 |
| 271 | |
| 272 | de-stage2: force |
| 273 | - (cd stage2 ; mv -f * ..) |
| 274 | - rmdir stage2 |
| 275 | |
| 276 | de-stage3: force |
| 277 | - (cd stage3 ; mv -f * ..) |
| 278 | - rmdir stage3 |
| 279 | |
| 280 | ###################################################################### |
| 281 | # DOCUMENTATION TARGETS |
| 282 | # TeX output |
| 283 | binutils.dvi: $(srcdir)/binutils.texi |
| 284 | $(TEXI2DVI) $(srcdir)/binutils.texi |
| 285 | |
| 286 | # info file for online browsing |
| 287 | binutils.info: $(srcdir)/binutils.texi |
| 288 | $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi |
| 289 | |
| 290 | # different targets for -ms, -mm, -me |
| 291 | # Try to use a recent texi2roff. v2 was put on prep in jan91. |
| 292 | # If you want an index, see texi2roff doc for postprocessing |
| 293 | # and add -i to texi2roff invocations below. |
| 294 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete |
| 295 | # correspondint -e lines when later texi2roff's are current) |
| 296 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. |
| 297 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them |
| 298 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank |
| 299 | # + @alphaenumerate is ridiculously new, turned into @enumerate |
| 300 | |
| 301 | # roff output (-ms) |
| 302 | binutils.ms: $(srcdir)/binutils.texi |
| 303 | sed -e '/\\input texinfo/d' \ |
| 304 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ |
| 305 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
| 306 | -e '/^@c/d' \ |
| 307 | -e 's/{.*,,/{/' \ |
| 308 | -e 's/@ / /g' \ |
| 309 | -e 's/^@alphaenumerate/@enumerate/g' \ |
| 310 | -e 's/^@end alphaenumerate/@end enumerate/g' \ |
| 311 | $(srcdir)/binutils.texi | \ |
| 312 | $(TEXI2ROFF) -ms | \ |
| 313 | sed -e 's/---/\\(em/g' \ |
| 314 | >binutils.ms |
| 315 | |
| 316 | # roff output (-mm) |
| 317 | # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, |
| 318 | # try leaving them in |
| 319 | binutils.mm: $(srcdir)/binutils.texi |
| 320 | sed -e '/\\input texinfo/d' \ |
| 321 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ |
| 322 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
| 323 | -e '/^@c/d' \ |
| 324 | -e 's/{.*,,/{/' \ |
| 325 | -e '/@noindent/d' \ |
| 326 | -e 's/@ / /g' \ |
| 327 | -e 's/^@alphaenumerate/@enumerate/g' \ |
| 328 | -e 's/^@end alphaenumerate/@end enumerate/g' \ |
| 329 | $(srcdir)/binutils.texi | \ |
| 330 | $(TEXI2ROFF) -mm | \ |
| 331 | sed -e 's/---/\\(em/g' \ |
| 332 | >binutils.mm |
| 333 | |
| 334 | # roff output (-me) |
| 335 | binutils.me: $(srcdir)/binutils.texi |
| 336 | sed -e '/\\input texinfo/d' \ |
| 337 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ |
| 338 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
| 339 | -e '/^@c/d' \ |
| 340 | -e 's/{.*,,/{/' \ |
| 341 | -e 's/@ / /g' \ |
| 342 | -e 's/^@alphaenumerate/@enumerate/g' \ |
| 343 | -e 's/^@end alphaenumerate/@end enumerate/g' \ |
| 344 | $(srcdir)/binutils.texi | \ |
| 345 | $(TEXI2ROFF) -me | \ |
| 346 | sed -e 's/---/\\(em/g' \ |
| 347 | >binutils.me |
| 348 | |
| 349 | |
| 350 | ###################################################################### |
| 351 | |
| 352 | mostlyclean: |
| 353 | -rm -f *.o *~ \#* core binutils.?? binutils.??? |
| 354 | clean: mostlyclean |
| 355 | -rm -f $(PROGS) underscore.c |
| 356 | distclean: clean |
| 357 | -rm -f Makefile config.status sysdep.h |
| 358 | realclean: distclean |
| 359 | -rm -f $(DISTSTUFF) TAGS |
| 360 | |
| 361 | etags tags: TAGS |
| 362 | |
| 363 | TAGS: force |
| 364 | etags $(INCDIR)/*.h $(BFDSRC)/*.[hc] *.[hc] |
| 365 | |
| 366 | install: all |
| 367 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ |
| 368 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi |
| 369 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi |
| 370 | -for i in $(PROGS) ; do \ |
| 371 | $(INSTALL_PROGRAM) $$i $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` ; \ |
| 372 | done |
| 373 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ |
| 374 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi |
| 375 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi |
| 376 | -for i in $(MANPAGES) ; do \ |
| 377 | $(INSTALL_DATA) $(srcdir)/$$i.1 $(man1dir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t`.1 ; \ |
| 378 | done |
| 379 | -if [ -d $(tooldir) ]; then \ |
| 380 | if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ |
| 381 | for i in nm strip ; do \ |
| 382 | rm -f $(tooldir)/bin/$$i; \ |
| 383 | ln $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` $(tooldir)/bin/$$i \ |
| 384 | || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$i; \ |
| 385 | done; \ |
| 386 | else true; fi |
| 387 | |
| 388 | install-info: info |
| 389 | -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \ |
| 390 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi |
| 391 | -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi |
| 392 | for i in *.info* ; do \ |
| 393 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ |
| 394 | done |
| 395 | |
| 396 | clean-info: |
| 397 | -rm -rf *.info* |
| 398 | |
| 399 | # Making a dist: |
| 400 | # cvs rtag binutils-x-yy ld+utils |
| 401 | # cvs co -r binutils-x-yy ld+utils |
| 402 | # Sanitize |
| 403 | # cd {HERE}; make dist [-f Makefile.in] |
| 404 | |
| 405 | dist: $(DIST_NAME).tar.z |
| 406 | |
| 407 | diststuff: $(DISTSTUFF) |
| 408 | |
| 409 | $(DIST_NAME).tar.z: |
| 410 | cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME) |
| 411 | make diststuff -f Makefile.in |
| 412 | cd ../ld; make diststuff -f Makefile.in |
| 413 | cd ../gprof; make diststuff -f Makefile.in |
| 414 | cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex . |
| 415 | # Take out texinfo from configurable dirs |
| 416 | mv ../configure.in tmp; \ |
| 417 | sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp |
| 418 | cd ..; chmod og=u `find . -print` |
| 419 | cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z |
| 420 | rm -rf ../../$(DIST_NAME) |
| 421 | |
| 422 | # These get around a bug in Sun Make in SunOS 4.1.1 |
| 423 | alloca.o:alloca.c |
| 424 | ar.o: ar.c |
| 425 | arsup.o: arsup.c |
| 426 | bucomm.o: bucomm.c |
| 427 | objcopy.o: objcopy.c |
| 428 | filemode.o:filemode.c |
| 429 | getopt.o:getopt.c |
| 430 | getopt1.o:getopt1.c |
| 431 | gmalloc.o:gmalloc.c |
| 432 | is-ranlib.o:is-ranlib.c |
| 433 | is-strip.o:is-strip.c |
| 434 | maybe-ranlib.o:maybe-ranlib.c |
| 435 | maybe-strip.o:maybe-strip.c |
| 436 | nm.o: nm.c |
| 437 | not-ranlib.o:not-ranlib.c |
| 438 | not-strip.o:not-strip.c |
| 439 | objdump.o: objdump.c |
| 440 | size.o: size.c |
| 441 | strip.o:strip.c |
| 442 | version.o: $(srcdir)/version.c |
| 443 | $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' -c $(srcdir)/version.c |
| 444 | |
| 445 | #----------------------------------------------------------------------------- |
| 446 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT |
| 447 | # |
| 448 | # 'VERSION' file must be present and contain a string of the form "x.y" |
| 449 | #----------------------------------------------------------------------------- |
| 450 | |
| 451 | ver960.c: FORCE |
| 452 | rm -f ver960.c |
| 453 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c |
| 454 | |
| 455 | |
| 456 | # Dummy target to force execution of dependent targets. |
| 457 | # |
| 458 | force: |
| 459 | |
| 460 | # Target to uncomment host-specific lines in this makefile. Such lines must |
| 461 | # have the following string beginning in column 1: #__<hostname>__# |
| 462 | # Original Makefile is backed up as 'Makefile.old'. |
| 463 | # |
| 464 | # Invoke with: make make HOST=xxx |
| 465 | # |
| 466 | make: |
| 467 | -@if test $(HOST)x = x ; then \ |
| 468 | echo '\aSpecify "make make HOST=???"'; \ |
| 469 | exit 1; \ |
| 470 | fi ; \ |
| 471 | grep -s "^#The next line was generated by 'make make'" Makefile; \ |
| 472 | if test $$? = 0 ; then \ |
| 473 | echo "\aMakefile has already been processed with 'make make'";\ |
| 474 | exit 1; \ |
| 475 | fi ; \ |
| 476 | mv -f Makefile Makefile.old; \ |
| 477 | echo "#The next line was generated by 'make make'" >Makefile ; \ |
| 478 | echo "HOST=$(HOST)" >>Makefile ; \ |
| 479 | echo >>Makefile ; \ |
| 480 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile |
| 481 | |
| 482 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
| 483 | $(SHELL) ./config.status |
| 484 | |
| 485 | ### Local Variables: *** |
| 486 | ### mode:fundamental *** |
| 487 | ### page-delimiter: "^#\f" *** |
| 488 | ### End: *** |
| 489 | ### end of file |