NetBSD/sbin/fdisk/mbr/Makefile

45 lines
791 B
Makefile
Raw Normal View History

2003-04-26 23:14:17 +04:00
# $NetBSD: Makefile,v 1.16 2003/04/26 19:18:23 fvdl Exp $
MAN= mbr.8
2000-03-06 04:23:11 +03:00
MLINKS= mbr.8 bootselect.8
BINDIR= /usr/mdec
BINMODE=444
STRIPFLAG=
1999-03-24 19:02:41 +03:00
.include <bsd.own.mk>
.if ${OBJECT_FMT} == "ELF"
LDFLAGS+= -e start
.else
LDFLAGS+= -e _start -N
.endif
2003-04-26 23:14:17 +04:00
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
PROG= mbr
SRCS= mbr.S
2003-04-26 23:14:17 +04:00
.if ${MACHINE} == "amd64"
2002-11-24 02:45:51 +03:00
LDFLAGS+= -m elf_i386
AFLAGS+= -m32
.endif
2002-06-17 19:25:45 +04:00
${PROG}: ${OBJS}
${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
${STRIP} ${PROG}.tmp
${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp
.elif ${MACHINE} == "macppc"
PROG= mbr
SRCS= mbr_macppc.S
${PROG}: ${OBJS}
1999-03-24 19:02:41 +03:00
${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
${STRIP} ${PROG}.tmp
2001-09-22 06:01:13 +04:00
${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp
.endif
.include <bsd.prog.mk>