1 # $NetBSD: Makefile.fat,v 1.4 2009/03/12 17:16:59 abs Exp $
3 S= ${.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
37 BUILDSYMLINKS+= $S/arch/i386/include machine \
38 $S/arch/x86/include x86
42 CLEANFILES+= ${PROG}.tmp
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}
53 .include <bsd.prog.mk>