1 # $NetBSD: Makefile,v 1.24 2009/01/12 07:49:57 tsutsui Exp $
3 S
!= cd
${.CURDIR
}/..
/..
/..
/..
; pwd
6 SRCS
= ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c
7 SRCS
+= mbr.c rdb.c vers.c
8 CFLAGS
+= -msoft-float
-Wno-main
-ffreestanding
9 CFLAGS
+= -Wall
-Wmissing-prototypes
-Wstrict-prototypes
-Wpointer-arith
10 #CPPFLAGS+= -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG
12 CPPFLAGS
+= -D_STANDALONE
-DSUPPORT_DHCP
-I
${.CURDIR
}
13 CPPFLAGS
+= -DHEAP_VARIABLE
17 .PATH
: ${S}/arch
/powerpc
/powerpc
26 # XXX SHOULD NOT NEED TO DEFINE THESE!
32 NEWVERSWHAT
= "OpenFirmware Boot"
41 CPPFLAGS
+= -I.
-I
${S} -I
${S}/..
/common
/include
42 CPPFLAGS
+= -DRELOC
=0x
${RELOC}
43 CPPFLAGS
+= -DFIRMWORKSBUGS
44 CPPFLAGS
+= -DCOMPAT_386BSD_MBRPART
46 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
48 @
[ -h machine
] || ln
-s
${S}/arch
/${MACHINE}/include machine
49 @
[ -h powerpc
] || ln
-s
${S}/arch
/powerpc
/include powerpc
51 .NOPATH
: machine powerpc
52 CLEANFILES
+= machine powerpc
54 ### find out what to use for libkern
56 .
include "${S}/lib/libkern/Makefile.inc"
59 ### find out what to use for libz
61 .
include "${S}/lib/libz/Makefile.inc"
64 ### find out what to use for libsa
66 SAMISCMAKEFLAGS
= SA_USE_CREAD
=yes SA_USE_LOADFILE
=yes
67 .
include "${S}/lib/libsa/Makefile.inc"
72 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/version
"ofppc" ${NEWVERSWHAT}
74 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
75 ${LD} -s
-N
-T
${.CURDIR
}/ldscript
-Ttext
${RELOC} -Bstatic \
76 -e
${ENTRY} -o
${PROG}.X
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
77 mv
-f
${PROG}.X
${PROG}
79 .
include <bsd.prog.mk
>