Home | History | Annotate | Line # | Download | only in mbr
Makefile.mbr revision 1.8.4.1
      1  1.8.4.1  gdamore #	$NetBSD: Makefile.mbr,v 1.8.4.1 2006/07/13 17:48:55 gdamore Exp $
      2      1.1      dsl 
      3  1.8.4.1  gdamore S=		${.CURDIR}/../../../../../
      4      1.1      dsl 
      5      1.4   simonb NOMAN=		# defined
      6      1.4   simonb 
      7      1.4   simonb LIBCRT0=	# nothing
      8      1.4   simonb LIBCRTBEGIN=	# nothing
      9      1.4   simonb LIBCRTEND=	# nothing
     10      1.4   simonb LIBC=		# nothing
     11      1.1      dsl 
     12      1.1      dsl .include <bsd.own.mk>
     13      1.1      dsl 
     14      1.5      uwe STRIPFLAG=	# override
     15      1.5      uwe 
     16  1.8.4.1  gdamore SRCS?=		mbr.S
     17      1.1      dsl 
     18  1.8.4.1  gdamore BINDIR=		/usr/mdec
     19  1.8.4.1  gdamore BINMODE=	444
     20      1.1      dsl 
     21  1.8.4.1  gdamore .PATH:		${.CURDIR}/..
     22      1.1      dsl 
     23  1.8.4.1  gdamore LDFLAGS+=	-nostdlib -Wl,-e,start
     24  1.8.4.1  gdamore CPPFLAGS+=	-I. -I${.CURDIR}/../../lib -I${S}
     25      1.1      dsl 
     26      1.1      dsl .if ${MACHINE} == "amd64"
     27  1.8.4.1  gdamore LDFLAGS+=	-Wl,-m,elf_i386
     28  1.8.4.1  gdamore AFLAGS+=	-m32
     29      1.1      dsl .endif
     30      1.4   simonb 
     31  1.8.4.1  gdamore BUILDSYMLINKS+=	$S/arch/i386/include	machine \
     32  1.8.4.1  gdamore 		$S/arch/x86/include	x86
     33      1.4   simonb 
     34  1.8.4.1  gdamore DPSRCS+=	machine x86
     35      1.1      dsl 
     36  1.8.4.1  gdamore CLEANFILES+=	${PROG}.tmp
     37      1.1      dsl 
     38      1.1      dsl ${PROG}: ${OBJS}
     39  1.8.4.1  gdamore 	${_MKTARGET_LINK}
     40  1.8.4.1  gdamore 	${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,0x600 ${OBJS}
     41  1.8.4.1  gdamore 	@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' \
     42  1.8.4.1  gdamore 		    | sed 's/^0*//'  ); \
     43      1.3  hubertf 		echo "#### There are $$1 free bytes in ${PROG}"
     44      1.1      dsl 	${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
     45      1.1      dsl 	rm -f ${PROG}.tmp
     46      1.1      dsl 
     47      1.1      dsl .include <bsd.prog.mk>
     48