Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fdisk/mbr Make it work for both elf and a.out
details: https://anonhg.NetBSD.org/src/rev/9eab680acdf2
branches: trunk
changeset: 467424:9eab680acdf2
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 24 16:02:41 1999 +0000
description:
Make it work for both elf and a.out
diffstat:
sbin/fdisk/mbr/Makefile | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 6103d19242e2 -r 9eab680acdf2 sbin/fdisk/mbr/Makefile
--- a/sbin/fdisk/mbr/Makefile Wed Mar 24 15:54:45 1999 +0000
+++ b/sbin/fdisk/mbr/Makefile Wed Mar 24 16:02:41 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 1999/02/13 02:54:33 lukem Exp $
+# $NetBSD: Makefile,v 1.3 1999/03/24 16:02:41 christos Exp $
BINDIR= /usr/mdec
BINMODE=444
@@ -9,10 +9,18 @@
SRCS= mbr.S
MKMAN= no
+.include <bsd.own.mk>
+
+.if ${OBJECT_FMT} == "ELF"
+LDFLAGS+= -e start
+.else
+LDFLAGS+= -e _start -N
+.endif
+
${PROG}: ${OBJS}
- ${LD} -o ${PROG}.tmp -e _start -N -Ttext 0x600 ${OBJS}
+ ${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
${STRIPPROG} ${PROG}.tmp
- dd if=${PROG}.tmp of=${PROG} bs=32 skip=1
+ objcopy -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp
.include <bsd.prog.mk>
Home |
Main Index |
Thread Index |
Old Index