Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / i386 / stand / fatboot / Makefile.fat
blob121b7ef0754e699cd044ba92cd95d050bdab665e
1 #       $NetBSD: Makefile.fat,v 1.4 2009/03/12 17:16:59 abs Exp $
3 S=              ${.CURDIR}/../../../../..
5 PROG?=          fatboot
6 NOMAN=          # defined
8 LIBCRT0=        # nothing
9 LIBCRTBEGIN=    # nothing
10 LIBCRTEND=      # nothing
11 LIBC=           # nothing
13 PIE_CFLAGS=
14 PIE_LDFLAGS=
15 PIE_AFLAGS=
17 .include <bsd.own.mk>
19 STRIPFLAG=      # override
21 SRCS=           fatboot.S
23 BINDIR=         /usr/mdec
24 BINMODE=        444
26 .PATH:          ${.CURDIR}/..
28 LDFLAGS+=       -nostdlib -Wl,-e,start
29 CPPFLAGS+=      -I. -I${.CURDIR}/../../lib -I${S}
30 CPPFLAGS+=      -DFAT_ENTRY_SIZE=${FAT_ENTRY_SIZE}
32 .if ${MACHINE_ARCH} == "x86_64"
33 LDFLAGS+=       -Wl,-m,elf_i386
34 AFLAGS+=        -m32
35 .endif
37 BUILDSYMLINKS+= $S/arch/i386/include    machine \
38                 $S/arch/x86/include     x86
40 DPSRCS+=        machine x86
42 CLEANFILES+=    ${PROG}.tmp
44 ${PROG}: ${OBJS}
45         ${_MKTARGET_LINK}
46         ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,0x7c00 ${OBJS}
47         @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<pbr_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>