Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use <bsd.klinks.mk>
details: https://anonhg.NetBSD.org/src/rev/0e8e66e9f25c
branches: trunk
changeset: 789521:0e8e66e9f25c
user: matt <matt%NetBSD.org@localhost>
date: Wed Aug 21 06:41:52 2013 +0000
description:
Use <bsd.klinks.mk>
diffstat:
sys/arch/sandpoint/stand/altboot/Makefile | 12 +++---------
sys/arch/sparc/stand/bootblk/Makefile | 16 +++-------------
sys/arch/sparc/stand/ofwboot/Makefile | 20 +++++---------------
3 files changed, 11 insertions(+), 37 deletions(-)
diffs (135 lines):
diff -r 7e44aac4ec5c -r 0e8e66e9f25c sys/arch/sandpoint/stand/altboot/Makefile
--- a/sys/arch/sandpoint/stand/altboot/Makefile Wed Aug 21 06:24:42 2013 +0000
+++ b/sys/arch/sandpoint/stand/altboot/Makefile Wed Aug 21 06:41:52 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2011/10/30 20:42:09 phx Exp $
+# $NetBSD: Makefile,v 1.13 2013/08/21 06:44:02 matt Exp $
S= ${.CURDIR}/../../../..
@@ -19,6 +19,7 @@
DBG= -Os
.include <bsd.own.mk>
+.include <bsd.klinks.mk>
# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
@@ -32,14 +33,6 @@
RELOC= 1000000
ENTRY= _start
-.if !make(obj) && !make(clean) && !make(cleandir)
-.BEGIN:
- @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
- @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
-.NOPATH: machine powerpc
-.endif
-CLEANFILES+= machine powerpc
-
### find out what to use for libkern
KERN_AS= library
.include "${S}/lib/libkern/Makefile.inc"
@@ -62,6 +55,7 @@
${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint"
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
+ ${_MKTARGET_LINK}
${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${OBJCOPY} -S -O binary ${PROG} ${PROG}.bin
diff -r 7e44aac4ec5c -r 0e8e66e9f25c sys/arch/sparc/stand/bootblk/Makefile
--- a/sys/arch/sparc/stand/bootblk/Makefile Wed Aug 21 06:24:42 2013 +0000
+++ b/sys/arch/sparc/stand/bootblk/Makefile Wed Aug 21 06:41:52 2013 +0000
@@ -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 @@
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 @@
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 @@
../fakeboot/fakeboot -elf32 <bootblk >/bootblk
../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
+.include <bsd.klinks.mk>
.include <bsd.prog.mk>
diff -r 7e44aac4ec5c -r 0e8e66e9f25c sys/arch/sparc/stand/ofwboot/Makefile
--- a/sys/arch/sparc/stand/ofwboot/Makefile Wed Aug 21 06:24:42 2013 +0000
+++ b/sys/arch/sparc/stand/ofwboot/Makefile Wed Aug 21 06:41:52 2013 +0000
@@ -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 @@
#
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 @@
.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 @@
.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
Home |
Main Index |
Thread Index |
Old Index