--- binutils/Makefile 2018/04/24 16:07:01 1.1.1.2 +++ binutils/Makefile 2018/04/24 16:07:03 1.1.1.3 @@ -1,5 +1,23 @@ # Makefile for GNU binary-file utilities # select a set of CFLAGS and PROGS, below, depending on the system type +# Copyright (C) 1989, Free Software Foundation, Inc. +# +# This file is part of GNU CC. +# +# GNU CC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 1, or (at your option) +# any later version. +# +# GNU CC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU CC; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + GNUCC = gcc -O @@ -13,9 +31,22 @@ PROGS = gprof ld size nm strip ar ranlib # also, you will want to make the target libc.a (but it takes a long time) # Note that you should leave a copy of `ar' in this directory # after you install it, since `ranlib' will try to run it from here. -#CFLAGS = -g -DUSG -DCOFF_ENCAPSULATE -DPORTAR -DNON_NATIVE -Dnounderscore -#PROGS = ld size nm strip ar robotussin objdump ranlib +#CFLAGS = -g -DUSG -DCOFF_ENCAPSULATE -DPORTAR -DNON_NATIVE +#PROGS = ld size nm strip ar robotussin objdump ranlib gprof +#it's better to move a copy of alloca into your libc than to risk getting some +#incompatiable functions from -lPW (like index()), but if you +#want to be lazy, uncomment this line #LIBS = -lPW +# For HP-UX systems +# Don't add robotussin; use hpxt instead. +# Note that you should leave a copy of `ar' in this directory +# after you install it, since `ranlib' will try to run it from here. +#CFLAGS = -g -Ihp-include -DUSG -DNON_NATIVE +#PROGS = ld size nm strip ar ranlib +#LIBS = alloca.o + +# Use the GNU getopt unless you have problems with it. +GNU_GETOPT = getopt.o all: $(PROGS) @@ -27,18 +58,18 @@ ld: ld.o size: size.o $(CC) -o size size.o -nm: nm.o - $(CC) -o nm nm.o +nm: nm.o $(GNU_GETOPT) + $(CC) -o nm nm.o $(LIBS) $(GNU_GETOPT) -strip: strip.o - $(CC) -o strip strip.o +strip: strip.o $(GNU_GETOPT) + $(CC) -o strip strip.o $(GNU_GETOPT) ar: ar.o $(CC) -o ar ar.o -gprof: gprof.o - $(GNUCC) -o gprof gprof.o -gprof.o: gprof.c gmon.h +gprof: gprof.o $(GNU_GETOPT) + $(GNUCC) -o gprof gprof.o $(GNU_GETOPT) +gprof.o: gprof.c gmon.h $(GNUCC) -c $(CFLAGS) gprof.c ranlib: ranlib.o @@ -50,9 +81,12 @@ ranlib.o: ranlib.c robotussin: robotussin.o $(CC) -o robotussin robotussin.o -libc.a: robotussin libconvert - libconvert - rm -rf tmp +libc.a: robotussin libconvert ar + libconvert /lib/libc.a libc.a + +# usg-gnulib is the file gcc makes using the usg compiler +gnulib: robotussin libconvert usg-gnulib ar + libconvert usg-gnulib gnulib clean: -rm -f *.o core @@ -61,8 +95,10 @@ clean: dist: -rm -rf binutils mkdir binutils - -ln * binutils - (cd binutils; rm -f GNUmakefile *~ "#*" log* binutils.tar*; make clean) - tar cof binutils.tar binutils + -cd binutils; ln -s ../* . + cd binutils; \ + rm -f GNUmakefile *~ "#*" log* binutils binutils.tar* =*; \ + make clean + tar cohf binutils.tar binutils compress < binutils.tar > binutils.tar.Z rm -rf binutils