From: mickey Date: Mon, 21 Apr 1997 20:31:00 +0000 (+0000) Subject: don't use cc for ld, bad things happens w/ DESTDIR defined; by dm@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=238d82bdf1b6b26d993cf865c6b3658c04d03c87;p=openbsd don't use cc for ld, bad things happens w/ DESTDIR defined; by dm@ --- diff --git a/sys/arch/i386/stand/biosboot/Makefile b/sys/arch/i386/stand/biosboot/Makefile index b4bbf334f48..5892f9824bf 100644 --- a/sys/arch/i386/stand/biosboot/Makefile +++ b/sys/arch/i386/stand/biosboot/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.4 1997/04/14 11:06:46 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 1997/04/21 20:31:00 mickey Exp $ PROG= biosboot SRCS= biosboot.S # AFLAGS+=-Wa,-a CPPFLAGS+=-DSTART=$(START) -DBOOTMAGIC=$(BOOTMAGIC) -DBOOTREL=$(BOOTREL) -LDFLAGS=-Wl,-T0,-N,-x -nostdlib +LD=ld +LDFLAGS=-nostdlib -Ttext 0 -N -x -Bstatic STRIP= MAN= biosboot.8 @@ -15,5 +16,9 @@ machine-links: @ln -fs ${.CURDIR}/../.. i386 @ln -fs ${.CURDIR}/../../include machine +${PROG}: $(OBJS) $(DPADD) + $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD) + @size $(PROG) + .include diff --git a/sys/arch/i386/stand/mbr/Makefile b/sys/arch/i386/stand/mbr/Makefile index 78bbb4ece09..ae3e65fc3a3 100644 --- a/sys/arch/i386/stand/mbr/Makefile +++ b/sys/arch/i386/stand/mbr/Makefile @@ -1,17 +1,27 @@ -# $OpenBSD: Makefile,v 1.2 1997/04/07 09:00:10 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 1997/04/21 20:31:00 mickey Exp $ # PROG= mbr SRCS= mbr.S AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a -LDFLAGS=-s -Wl,-T0,-N,-x -nostdlib +LD=ld +LDFLAGS=-nostdlib -Ttext 0 -x -N -s -Bstatic MAN+= mbr.8 STRIP= # Uncomment this to make mbr talk to a serial port. #CPPFLAGS+=-DSERIAL=0 -all: +all: machine-links + +machine-links: + @rm -f machine i386 + @ln -fs ${.CURDIR}/../.. i386 + @ln -fs ${.CURDIR}/../../include machine + +${PROG}: $(OBJS) $(DPADD) + $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD) + @size $(PROG) @if [ -x ${.OBJDIR}/${PROG} ]; then \ dd if=${.OBJDIR}/${PROG} of=${.OBJDIR}/.tmp ibs=32 skip=1; \ mv -f ${.OBJDIR}/.tmp ${.OBJDIR}/${PROG}; \