Module Name: src
Committed By: matt
Date: Wed Aug 21 06:41:52 UTC 2013
Modified Files:
src/sys/arch/sparc/stand/bootblk: Makefile
src/sys/arch/sparc/stand/ofwboot: Makefile
Log Message:
Use <bsd.klinks.mk>
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/stand/bootblk/Makefile
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/stand/ofwboot/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/stand/bootblk/Makefile
diff -u src/sys/arch/sparc/stand/bootblk/Makefile:1.13 src/sys/arch/sparc/stand/bootblk/Makefile:1.14
--- src/sys/arch/sparc/stand/bootblk/Makefile:1.13 Sat Feb 13 23:38:17 2010
+++ src/sys/arch/sparc/stand/bootblk/Makefile Wed Aug 21 06:41:52 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2010/02/13 23:38:17 eeh Exp $
+# $NetBSD: Makefile,v 1.14 2013/08/21 06:41:52 matt Exp $
CURDIR= ${.CURDIR}
S= ${CURDIR}/../../../..
@@ -10,7 +10,7 @@ S= ${CURDIR}/../../../..
PROG= bootblk
SRCS= bootblk.fth
OBJS=
-CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp machine sparc \
+CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \
bootblk bootblk.text bootblk.text.tmp
NOMAN= # defined
@@ -21,17 +21,6 @@ USE_GENASSYM?= no
INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL
-#all:: bootblk.text bootblk
-
-#clean::
-# rm assym.fth.h bootblk.text machine bootblk
-
-sparc:
- ln -s ${.CURDIR}/../../../sparc/include sparc
-
-machine:
- ln -s ${.CURDIR}/../../../${MACHINE}/include machine
-
ffs.fth.h: genfth.cf machine sparc
${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
<${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \
@@ -61,4 +50,5 @@ fake: bootblk bootblk.text
../fakeboot/fakeboot -elf32 <bootblk >/bootblk
../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
+.include <bsd.klinks.mk>
.include <bsd.prog.mk>
Index: src/sys/arch/sparc/stand/ofwboot/Makefile
diff -u src/sys/arch/sparc/stand/ofwboot/Makefile:1.29 src/sys/arch/sparc/stand/ofwboot/Makefile:1.30
--- src/sys/arch/sparc/stand/ofwboot/Makefile:1.29 Sat May 21 15:50:42 2011
+++ src/sys/arch/sparc/stand/ofwboot/Makefile Wed Aug 21 06:41:52 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2011/05/21 15:50:42 tsutsui Exp $
+# $NetBSD: Makefile,v 1.30 2013/08/21 06:41:52 matt Exp $
CURDIR= ${.CURDIR}
S= ${CURDIR}/../../../..
@@ -8,6 +8,7 @@ S= ${CURDIR}/../../../..
#
WARNS?= 2
+KLINK_MACHINE= sparc64
PROG?= ofwboot
SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c
@@ -78,21 +79,8 @@ SAMISCCPPFLAGS+= -DCOMPAT_SOLARIS_UFS
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
-.if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
- @([ -h machine ] || ln -s ${S}/arch/sparc64/include machine)
- @([ -h sparc64 ] || ln -s ${S}/arch/sparc64/include sparc64)
- @([ -h sparc ] || ln -s ${S}/arch/sparc/include sparc)
-.NOPATH: machine sparc64 sparc
-.endif
-CLEANFILES+= machine sparc64 sparc
-
-cleandir distclean: .WAIT cleanlibdir
-
-cleanlibdir:
- -rm -rf lib
-
.include <bsd.own.mk>
+.include <bsd.klinks.mk>
vers.c: version
${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
@@ -102,10 +90,12 @@ CLEANFILES+= vers.c
.if CROSS
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
+ ${_MKTARGET_LINK}
${LD} -N -p -Ttext ${RELOC} -e ${ENTRY} >lderr -o ${PROG} \
${OBJS} -L${SADST} -lsa -L${ZDST} -lz -L${KERNDST} -lkern # solaris linker
.else
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
+ ${_MKTARGET_LINK}
${LD} -X -N -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} # native linker
.endif