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} ${.CURDIR
}/..
/..
/..
/powerpc
/powerpc
12 S
= ${.CURDIR
}/..
/..
/..
/..
15 ELF2PEF
= ${.CURDIR
}/..
/..
/..
/powerpc
/stand
/mkbootimage
17 COMMONLIBDIR
= ${.CURDIR
}/..
/..
/..
/..
/..
/common
24 SRCS
+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
25 SRCS
+= fd.c filesystem.c inkernel.c io.c kbd.c monitor.c ns16550.c
26 SRCS
+= prf.c tgets.c vers.c vga.c video.c vreset.c
29 CFLAGS
= -Wno-main
-ffreestanding
30 AFLAGS
= -x assembler-with-cpp
-traditional-cpp
32 CPPFLAGS
= -nostdinc
-I
${.OBJDIR
} -I
${ELF2PEF} -I
${S} -I
${COMMONLIBDIR}/include
33 CPPFLAGS
+= -Werror
-Wall
-Wstrict-prototypes
-Wmissing-prototypes
34 CPPFLAGS
+= -D_STANDALONE
-DRELOC
=${RELOC} -DUSE_SCAN
35 CPPFLAGS
+= -D__daddr_t
=int32_t
36 #CPPFLAGS+= -DDBMONITOR
38 .if
(${BASE} == "boot")
40 .elif
(${BASE} == "boot_com0")
41 CPPFLAGS
+= -DCONS_SERIAL
-DCOMSPEED
=9600 -DCOMPORT
=0x3f8
42 .elif
(${BASE} == "boot_vga")
49 # XXX SHOULD NOT NEED TO DEFINE THESE!
57 CLEANFILES
+= vers.c machine powerpc
${PROG}.elf
59 LIBS
= ${L}/sa
/libsa.a
${L}/kern
/libkern.a
${L}/z
/libz.a
61 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
62 .BEGIN
: machine powerpc
63 .NOPATH
: machine powerpc
67 ln
-s
${S}/arch
/${MACHINE}/include $@
71 ln
-s
${S}/arch
/powerpc
/include $@
74 vers.c
: ${.CURDIR
}/..
/boot
/version
75 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/..
/boot
/version \
76 "bebox" ${NEWVERSWHAT}
78 ${PROG}: ${OBJS} ${LIBS}
79 ${LD} -o
${PROG}.elf
-N
-T
${.CURDIR
}/..
/boot
/ld.script \
80 -Ttext
${RELOC} ${OBJS} ${LIBS}
81 ${STRIP} -o
${PROG} ${PROG}.elf
83 .
include <bsd.prog.mk
>