Home | History | Annotate | Line # | Download | only in mbr
Makefile.mbr revision 1.2
      1  1.2  dbj #	$NetBSD: Makefile.mbr,v 1.2 2003/05/05 02:47:42 dbj Exp $
      2  1.1  dsl 
      3  1.1  dsl S=	${.CURDIR}/../../../../../
      4  1.1  dsl 
      5  1.1  dsl NOMAN=	# defined
      6  1.1  dsl STRIPFLAG=
      7  1.1  dsl 
      8  1.1  dsl .include <bsd.own.mk>
      9  1.1  dsl 
     10  1.1  dsl SRCS?= mbr.S
     11  1.1  dsl 
     12  1.1  dsl BINDIR=	/usr/mdec
     13  1.1  dsl BINMODE=444
     14  1.1  dsl 
     15  1.1  dsl .PATH:	${.CURDIR}/..
     16  1.1  dsl 
     17  1.1  dsl LDFLAGS+= -e start
     18  1.1  dsl CPPFLAGS+= -I ${.CURDIR}/../../lib
     19  1.1  dsl 
     20  1.1  dsl .if ${MACHINE} == "amd64"
     21  1.1  dsl LDFLAGS+=  -m elf_i386
     22  1.1  dsl AFLAGS+=   -m32
     23  1.1  dsl .endif
     24  1.1  dsl 
     25  1.1  dsl CLEANFILES+= ${PROG}.tmp
     26  1.1  dsl 
     27  1.1  dsl ${PROG}: ${OBJS}
     28  1.1  dsl 	${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
     29  1.2  dbj 	@ set -- $$( ${NM} -t x ${PROG}.tmp | grep '\<mbr_space\>' ); \
     30  1.2  dbj 		echo "#### There are $$((0x$$1)) free bytes in ${PROG}"
     31  1.1  dsl 	${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
     32  1.1  dsl 	rm -f ${PROG}.tmp
     33  1.1  dsl 
     34  1.1  dsl .include <bsd.prog.mk>
     35