1 # $NetBSD: Makefile,v 1.48 2009/03/15 14:54:24 tsutsui Exp $
3 S
= ${.CURDIR
}/..
/..
/..
/..
6 FILES
= ${PROG}.elf
${PROG}.xcf
7 SRCS
= Locore.c boot.c ofdev.c hfs.c net.c netif_of.c alloc.c vers.c
9 XCOFFXTRAOBJ
= Xcoffxtra.o
10 CFLAGS
+= -msoft-float
-mmultiple
-ffreestanding
11 CFLAGS
+= -Wall
-Wmissing-prototypes
-Wstrict-prototypes
-Wpointer-arith
12 #CPPFLAGS+= -DDEBUG -DNETIF_DEBUG
13 CPPFLAGS
+= -D_STANDALONE
-DSUPPORT_DHCP
14 CPPFLAGS
+= -DSUPPORT_USTARFS
-DHAVE_CHANGEDISK_HOOK
18 LIBCRTBEGIN
= # nothing
22 .PATH
: ${S}/arch
/powerpc
/powerpc
35 .if
!defined
(TOOL_MACPPCFIXCOFF
)
36 TOOL_MACPPCFIXCOFFDIR
!= cd
${.CURDIR
}/..
/fixcoff
&& ${PRINTOBJDIR}
37 TOOL_MACPPCFIXCOFF
= ${TOOL_MACPPCFIXCOFFDIR}/fixcoff
41 NEWVERSWHAT
= "OpenFirmware Boot"
49 CLEANFILES
+= vers.c
${PROG}.elf
${PROG}.el1
${PROG}.mrg
${PROG}.xcf
51 CPPFLAGS
+= -I.
-I
${.CURDIR
} -I
${.CURDIR
}/..
/..
/..
-I
${.CURDIR
}/..
/..
/..
/..
52 CPPFLAGS
+= -DRELOC
=0x
${RELOC} -DRELOC_FLATFILE
=0x
${RELOC_FLATFILE}
53 #CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs
55 CLEANFILES
+= ${XCOFFXTRAOBJ}
57 ### find out what to use for libkern
59 .
include "${S}/lib/libkern/Makefile.inc"
62 ### find out what to use for libz
64 .
include "${S}/lib/libz/Makefile.inc"
67 ### find out what to use for libsa
69 SAMISCMAKEFLAGS
= SA_USE_CREAD
=yes SA_USE_LOADFILE
=yes
70 .
include "${S}/lib/libsa/Makefile.inc"
73 cleandir
distclean: cleanlibdir
80 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/version
"macppc" ${NEWVERSWHAT}
82 all realall
: ${PROG} ${PROG}.xcf
${PROG}.elf
84 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
86 ${LD} -s
-N
-Ttext
${RELOC} -Bstatic
-o
${PROG}.el1 \
87 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
88 ${OBJCOPY} -O binary
${PROG}.el1
${PROG}
90 .
include <bsd.klinks.mk
>
91 .
include <bsd.prog.mk
>
93 ${PROG}.elf
: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
95 ${LD} -s
-N
-Ttext
${RELOC} -Bstatic
-o
${PROG}.elf \
96 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
98 ${PROG}.xcf
: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN}
100 ${LD} -s
-N
-T
${.CURDIR
}/..
/fixcoff
/elf32_powerpc_merge.x
-e _entry \
101 -Ttext
${RELOC} -Bstatic
-o
${PROG}.mrg
${XCOFFXTRAOBJ} \
102 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
103 ${OBJCOPY} -O aixcoff-rs6000
-R .comment
-R .note \
104 ${PROG}.mrg
${PROG}.xcf
105 ${TOOL_MACPPCFIXCOFF} ${PROG}.xcf