1 # $NetBSD: Makefile,v 1.12 2011/05/20 22:29:55 joerg Exp $
3 S
= ${.CURDIR
}/..
/..
/..
/..
5 AFLAGS.cdboot.S
= ${${ACTIVE_CC} == "clang":?
-no-integrated-as
:}
17 LIBCRTBEGIN
= # nothing
21 PRIMARY_LOAD_ADDRESS
= 0x1000
22 SECONDARY_LOAD_ADDRESS
= 0x10000
32 LDFLAGS
+= -nostdlib
-Wl
,-e
,start
33 CPPFLAGS
+= -I.
-I
${.CURDIR
}/..
/lib
-I
${S}
34 CPPFLAGS
+= -DPRIMARY_LOAD_ADDRESS
=${PRIMARY_LOAD_ADDRESS}
35 CPPFLAGS
+= -DSECONDARY_LOAD_ADDRESS
=${SECONDARY_LOAD_ADDRESS}
36 CPPFLAGS
+= -DDISABLE_KEYPRESS
38 .if
${MACHINE_ARCH} == "x86_64"
39 LDFLAGS
+= -Wl
,-m
,elf_i386
43 BUILDSYMLINKS
+= $S/arch
/i386
/include machine \
44 $S/arch
/x86
/include x86
48 CLEANFILES
+= ${PROG}.tmp
52 ${CC} -o
${PROG}.tmp
${LDFLAGS} -Wl
,-Ttext
,${PRIMARY_LOAD_ADDRESS} \
54 @ set
-- $$( ${NM} -t d
${PROG}.tmp | grep
'free_space' \
55 |
${TOOL_SED} 's/^0*//' ); \
56 echo
"#### There are $$1 free bytes in ${PROG}"
57 ${OBJCOPY} -O binary
${PROG}.tmp
${PROG}
60 .
include <bsd.prog.mk
>