Home | History | Annotate | Line # | Download | only in mbr
Makefile.mbr revision 1.4.2.3
      1  1.4.2.3    skrll #	$NetBSD: Makefile.mbr,v 1.4.2.3 2004/09/21 13:17:18 skrll Exp $
      2      1.1      dsl 
      3      1.1      dsl 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.4.2.1    skrll STRIPFLAG=	# override
     15  1.4.2.1    skrll 
     16      1.1      dsl SRCS?= mbr.S
     17      1.1      dsl 
     18      1.1      dsl BINDIR=	/usr/mdec
     19      1.1      dsl BINMODE=444
     20      1.1      dsl 
     21      1.1      dsl .PATH:	${.CURDIR}/..
     22      1.1      dsl 
     23      1.1      dsl LDFLAGS+= -e start
     24      1.4   simonb CPPFLAGS+= -I. -I${.CURDIR}/../../lib -I${S}
     25      1.1      dsl 
     26      1.1      dsl .if ${MACHINE} == "amd64"
     27      1.1      dsl LDFLAGS+=  -m elf_i386
     28      1.1      dsl AFLAGS+=   -m32
     29      1.1      dsl .endif
     30      1.4   simonb 
     31      1.4   simonb .if !make(obj) && !make(clean) && !make(cleandir)
     32      1.4   simonb .BEGIN: machine x86
     33      1.4   simonb .NOPATH: machine x86
     34      1.4   simonb .endif
     35      1.4   simonb 
     36      1.4   simonb realdepend realall: machine x86
     37      1.4   simonb CLEANFILES+= machine x86
     38      1.4   simonb 
     39      1.4   simonb machine::
     40      1.4   simonb 	-rm -f $@
     41      1.4   simonb 	ln -s $S/arch/i386/include $@
     42      1.4   simonb 
     43      1.4   simonb x86::
     44      1.4   simonb 	-rm -f $@
     45      1.4   simonb 	ln -s $S/arch/x86/include $@
     46      1.4   simonb 
     47      1.4   simonb ${OBJS}: machine x86
     48      1.1      dsl 
     49      1.1      dsl CLEANFILES+= ${PROG}.tmp
     50      1.1      dsl 
     51      1.1      dsl ${PROG}: ${OBJS}
     52      1.1      dsl 	${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
     53      1.3  hubertf 	@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' | sed 's/^0*//'  ); \
     54      1.3  hubertf 		echo "#### There are $$1 free bytes in ${PROG}"
     55      1.1      dsl 	${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
     56      1.1      dsl 	rm -f ${PROG}.tmp
     57      1.1      dsl 
     58      1.1      dsl .include <bsd.prog.mk>
     59