Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / i386 / stand / mbr / Makefile.mbr
blob51be184c49302ea45043e8d0f15ec35f79c251a3
1 #       $NetBSD: Makefile.mbr,v 1.16 2009/03/30 09:22:52 tsutsui Exp $
3 S=              ${.CURDIR}/../../../../..
5 NOMAN=          # defined
7 LIBCRT0=        # nothing
8 LIBCRTBEGIN=    # nothing
9 LIBCRTEND=      # nothing
10 LIBC=           # nothing
12 PIE_CFLAGS=
13 PIE_LDFLAGS=
14 PIE_AFLAGS=
16 .include <bsd.own.mk>
18 STRIPFLAG=      # override
20 SRCS?=          mbr.S
22 BINDIR=         /usr/mdec
23 BINMODE=        444
25 .PATH:          ${.CURDIR}/..
27 LDFLAGS+=       -nostdlib -Wl,-e,start
28 CPPFLAGS+=      -I. -I${.CURDIR}/../../lib -I${S}
30 .if ${MACHINE_ARCH} == "x86_64"
31 LDFLAGS+=       -Wl,-m,elf_i386
32 AFLAGS+=        -m32
33 .endif
35 BUILDSYMLINKS+= $S/arch/i386/include    machine \
36                 $S/arch/x86/include     x86
38 DPSRCS+=        machine x86
40 CLEANFILES+=    ${PROG}.tmp
42 LOADADDR=       0x8800
44 ${PROG}: ${OBJS}
45         ${_MKTARGET_LINK}
46         ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${LOADADDR} ${OBJS}
47         @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' \
48                     | ${TOOL_SED} 's/^0*//'  ); \
49                 echo "#### There are $$1 free bytes in ${PROG}"
50         ${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
51         rm -f ${PROG}.tmp
53 .include <bsd.prog.mk>