Sun Mar 15 14:54:24 2009 UTC ()
Use <bsd.klinks.mk> to create MD include dir symlinks.


(tsutsui)
diff -r1.47 -r1.48 src/sys/arch/macppc/stand/ofwboot/Makefile

cvs diff -r1.47 -r1.48 src/sys/arch/macppc/stand/ofwboot/Makefile (expand / switch to unified diff)

--- src/sys/arch/macppc/stand/ofwboot/Makefile 2009/01/12 07:05:22 1.47
+++ src/sys/arch/macppc/stand/ofwboot/Makefile 2009/03/15 14:54:24 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.47 2009/01/12 07:05:22 tsutsui Exp $ 1# $NetBSD: Makefile,v 1.48 2009/03/15 14:54:24 tsutsui Exp $
2 2
3S= ${.CURDIR}/../../../.. 3S= ${.CURDIR}/../../../..
4 4
5PROG= ofwboot 5PROG= ofwboot
6FILES= ${PROG}.elf ${PROG}.xcf 6FILES= ${PROG}.elf ${PROG}.xcf
7SRCS= Locore.c boot.c ofdev.c hfs.c net.c netif_of.c alloc.c vers.c 7SRCS= Locore.c boot.c ofdev.c hfs.c net.c netif_of.c alloc.c vers.c
8XCOFFXTRA= Xcoffxtra.c 8XCOFFXTRA= Xcoffxtra.c
9XCOFFXTRAOBJ= Xcoffxtra.o 9XCOFFXTRAOBJ= Xcoffxtra.o
10CFLAGS+= -msoft-float -mmultiple -ffreestanding 10CFLAGS+= -msoft-float -mmultiple -ffreestanding
11CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 11CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
12#CPPFLAGS+= -DDEBUG -DNETIF_DEBUG 12#CPPFLAGS+= -DDEBUG -DNETIF_DEBUG
13CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 13CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP
14CPPFLAGS+= -DSUPPORT_USTARFS -DHAVE_CHANGEDISK_HOOK 14CPPFLAGS+= -DSUPPORT_USTARFS -DHAVE_CHANGEDISK_HOOK
@@ -38,42 +38,33 @@ TOOL_MACPPCFIXCOFFDIR!= cd ${.CURDIR}/.. @@ -38,42 +38,33 @@ TOOL_MACPPCFIXCOFFDIR!= cd ${.CURDIR}/..
38TOOL_MACPPCFIXCOFF= ${TOOL_MACPPCFIXCOFFDIR}/fixcoff 38TOOL_MACPPCFIXCOFF= ${TOOL_MACPPCFIXCOFFDIR}/fixcoff
39.endif 39.endif
40.endif 40.endif
41 41
42NEWVERSWHAT= "OpenFirmware Boot" 42NEWVERSWHAT= "OpenFirmware Boot"
43 43
44# For now... 44# For now...
45#RELOC= 20000 45#RELOC= 20000
46RELOC= E00000 46RELOC= E00000
47 47
48ENTRY= _start 48ENTRY= _start
49 49
50CLEANFILES+= vers.c ${PROG}.elf ${PROG}.el1 ${PROG}.mrg ${PROG}.xcf 50CLEANFILES+= vers.c ${PROG}.elf ${PROG}.el1 ${PROG}.mrg ${PROG}.xcf
51CLEANFILES+= machine powerpc 
52 51
53CPPFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 52CPPFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
54CPPFLAGS+= -DRELOC=0x${RELOC} -DRELOC_FLATFILE=0x${RELOC_FLATFILE} 53CPPFLAGS+= -DRELOC=0x${RELOC} -DRELOC_FLATFILE=0x${RELOC_FLATFILE}
55#CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs 54#CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs
56 55
57CLEANFILES+= ${XCOFFXTRAOBJ} 56CLEANFILES+= ${XCOFFXTRAOBJ}
58 57
59.if !make(obj) && !make(clean) && !make(cleandir) 
60.BEGIN: 
61 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 
62 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 
63.NOPATH: machine powerpc 
64.endif 
65CLEANFILES+= machine powerpc 
66 
67### find out what to use for libkern 58### find out what to use for libkern
68KERN_AS= library 59KERN_AS= library
69.include "${S}/lib/libkern/Makefile.inc" 60.include "${S}/lib/libkern/Makefile.inc"
70LIBKERN= ${KERNLIB} 61LIBKERN= ${KERNLIB}
71 62
72### find out what to use for libz 63### find out what to use for libz
73Z_AS= library 64Z_AS= library
74.include "${S}/lib/libz/Makefile.inc" 65.include "${S}/lib/libz/Makefile.inc"
75LIBZ= ${ZLIB} 66LIBZ= ${ZLIB}
76 67
77### find out what to use for libsa 68### find out what to use for libsa
78SA_AS= library 69SA_AS= library
79SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 70SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
@@ -87,26 +78,27 @@ cleanlibdir: @@ -87,26 +78,27 @@ cleanlibdir:
87 78
88.PHONY: vers.c 79.PHONY: vers.c
89vers.c: version 80vers.c: version
90 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "macppc" ${NEWVERSWHAT} 81 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "macppc" ${NEWVERSWHAT}
91 82
92all realall: ${PROG} ${PROG}.xcf ${PROG}.elf 83all realall: ${PROG} ${PROG}.xcf ${PROG}.elf
93 84
94${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}  85${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
95 ${_MKTARGET_LINK} 86 ${_MKTARGET_LINK}
96 ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.el1 \ 87 ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.el1 \
97 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 88 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
98 ${OBJCOPY} -O binary ${PROG}.el1 ${PROG} 89 ${OBJCOPY} -O binary ${PROG}.el1 ${PROG}
99 90
 91.include <bsd.klinks.mk>
100.include <bsd.prog.mk> 92.include <bsd.prog.mk>
101 93
102${PROG}.elf: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 94${PROG}.elf: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
103 ${_MKTARGET_LINK} 95 ${_MKTARGET_LINK}
104 ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \ 96 ${LD} -s -N -Ttext ${RELOC} -Bstatic -o ${PROG}.elf \
105 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 97 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
106 98
107${PROG}.xcf: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN} 99${PROG}.xcf: ${OBJS} ${XCOFFXTRAOBJ} ${LIBSA} ${LIBZ} ${LIBKERN}
108 ${_MKTARGET_LINK} 100 ${_MKTARGET_LINK}
109 ${LD} -s -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \ 101 ${LD} -s -N -T ${.CURDIR}/../fixcoff/elf32_powerpc_merge.x -e _entry \
110 -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg ${XCOFFXTRAOBJ} \ 102 -Ttext ${RELOC} -Bstatic -o ${PROG}.mrg ${XCOFFXTRAOBJ} \
111 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 103 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
112 ${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \ 104 ${OBJCOPY} -O aixcoff-rs6000 -R .comment -R .note \