Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / i386 / stand / bootxx / bootxx_cd9660 / Makefile
blob602dbe72b8bfd67b81d99864017c52c5f97a711d
1 # $NetBSD: Makefile,v 1.11 2008/10/25 22:27:37 apb Exp $
3 S= ${.CURDIR}/../../../../..
5 NOMAN= # defined
6 .include <bsd.own.mk>
8 STRIPFLAG= # nothing
10 LIBCRT0= # nothing
11 LIBCRTBEGIN= # nothing
12 LIBCRTEND= # nothing
13 LIBC= # nothing
15 PRIMARY_LOAD_ADDRESS= 0x600
16 SECONDARY_LOAD_ADDRESS= 0x10000
18 PROG= bootxx_cd9660
19 SRCS?= cdboot.S
21 BINDIR= /usr/mdec
22 BINMODE= 444
24 .PATH: ${.CURDIR}/../.. ${.CURDIR}/../../cdboot
26 LDFLAGS+= -nostdlib -Wl,-e,start
27 CPPFLAGS+= -I. -I${.CURDIR}/../../lib -I${S}
28 CPPFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
29 CPPFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
30 CPPFLAGS+= -DDISABLE_KEYPRESS
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,${PRIMARY_LOAD_ADDRESS} \
47 ${OBJS}
48 @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<free_space\>' \
49 | ${TOOL_SED} 's/^0*//' ); \
50 echo "#### There are $$1 free bytes in ${PROG}"
51 ${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
52 rm -f ${PROG}.tmp
54 .include <bsd.prog.mk>