1 # $NetBSD: Makefile,v 1.22 2007/12/19 18:28:50 garbled Exp $
7 COMMON
= ${.CURDIR
}/..
/common
8 COMMONOBJ
!= cd
${COMMON} && ${PRINTOBJDIR}
10 .PATH
: ${.CURDIR
}/..
/boot
${COMMONOBJ}
12 S
= ${.CURDIR
}/..
/..
/..
/..
15 MKBOOTIMAGE
= ${.CURDIR
}/..
/..
/..
/powerpc
/stand
/mkbootimage
22 SRCS
+= boot.c clock.c com.c conf.c cons.c devopen.c
23 SRCS
+= filesystem.c inkernel.c io.c tgets.c prf.c monitor.c
24 SRCS
+= kbd.c ns16550.c vers.c vreset.c vga.c
26 CFLAGS
= -Os
-mmultiple
-ffreestanding
27 CFLAGS
+= -Werror
-Wall
-Wstrict-prototypes
-Wmissing-prototypes
28 AFLAGS
= -x assembler-with-cpp
-traditional-cpp
30 CPPFLAGS
= -nostdinc
-I
${.OBJDIR
} -I
${MKBOOTIMAGE} -I
${S}
31 CPPFLAGS
+= -D_STANDALONE
-DRELOC
=${RELOC} -DUSE_SCAN
32 CPPFLAGS
+= -D__daddr_t
=int32_t
33 #CPPFLAGS+= -DDBMONITOR
35 .if
(${BASE} == "boot")
36 CPPFLAGS
+= -DCONS_VGA
-DVGA_RESET
37 .elif
(${BASE} == "boot_com0")
38 CPPFLAGS
+= -DCONS_SERIAL
-DCOMSPEED
=9600 -DCOMPORT
=0x3f8
39 .elif
(${BASE} == "boot_com0_vreset")
40 CPPFLAGS
+= -DCONS_SERIAL
-DCOMSPEED
=9600 -DCOMPORT
=0x3f8 -DVGA_RESET
46 # XXX SHOULD NOT NEED TO DEFINE THESE!
54 CLEANFILES
+= vers.c machine powerpc
${PROG}.elf
56 LIBS
= ${L}/sa
/libsa.a
${L}/kern
/libkern.a
${L}/z
/libz.a
58 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
59 .BEGIN
: machine powerpc
60 .NOPATH
: machine powerpc
64 ln
-s
${S}/arch
/${MACHINE}/include $@
68 ln
-s
${S}/arch
/powerpc
/include $@
71 vers.c
: ${.CURDIR
}/..
/boot
/version
72 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/..
/boot
/version
"prep" ${NEWVERSWHAT}
74 ${PROG}: ${OBJS} ${LIBS}
75 ${LD} -o
${PROG}.elf
-N
-T
${.CURDIR
}/..
/boot
/ld.script \
76 -Ttext
${RELOC} ${OBJS} ${LIBS}
77 ${STRIP} -o
${PROG} ${PROG}.elf
79 .
include <bsd.prog.mk
>