Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Move ldscript related code out of Makefile.kern.inc.
details: https://anonhg.NetBSD.org/src/rev/ebe8d8ed809e
branches: trunk
changeset: 340456:ebe8d8ed809e
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sun Sep 06 06:41:14 2015 +0000
description:
Move ldscript related code out of Makefile.kern.inc.
diffstat:
sys/conf/Makefile.kern.inc | 21 ++-------------------
sys/conf/ldscript.mk | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 19 deletions(-)
diffs (65 lines):
diff -r 28a10e204aa3 -r ebe8d8ed809e sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Sun Sep 06 06:13:16 2015 +0000
+++ b/sys/conf/Makefile.kern.inc Sun Sep 06 06:41:14 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.240 2015/09/06 06:13:16 uebayasi Exp $
+# $NetBSD: Makefile.kern.inc,v 1.241 2015/09/06 06:41:14 uebayasi Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -219,24 +219,6 @@
${SYSTEM_OBJ:N*swap*netbsd*} ${EXTRA_OBJ} vers.o \
${OBJS:M*swap${.TARGET}.o}
-# Give MD generated ldscript dependency on ${SYSTEM_OBJ}
-.if defined(KERNLDSCRIPT)
-.if target(${KERNLDSCRIPT})
-${KERNLDSCRIPT}: ${SYSTEM_OBJ}
-.endif
-.endif
-
-.if defined(KERNLDSCRIPT)
-.for k in ${KERNELS}
-EXTRA_CLEAN+= ${k}.ldscript
-${k}: ${k}.ldscript
-${k}.ldscript: ${KERNLDSCRIPT} assym.h
- ${_MKTARGET_CREATE}
- ${CPP} -I. ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@
-.endfor
-LINKSCRIPT= -T ${.TARGET}.ldscript
-.endif
-
TEXTADDR?= ${LOADADDRESS} # backwards compatibility
LINKTEXT?= ${TEXTADDR:C/.+/-Ttext &/}
LINKDATA?= ${DATAADDR:C/.+/-Tdata &/}
@@ -429,6 +411,7 @@
.endif
.endif
+.include "${S}/conf/ldscript.mk"
.include "${S}/conf/assym.mk"
.include "${S}/conf/newvers.mk"
.include "${S}/conf/splash.mk"
diff -r 28a10e204aa3 -r ebe8d8ed809e sys/conf/ldscript.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/conf/ldscript.mk Sun Sep 06 06:41:14 2015 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: ldscript.mk,v 1.1 2015/09/06 06:41:14 uebayasi Exp $
+
+# Give MD generated ldscript dependency on ${SYSTEM_OBJ}
+.if defined(KERNLDSCRIPT)
+.if target(${KERNLDSCRIPT})
+${KERNLDSCRIPT}: ${SYSTEM_OBJ}
+.endif
+.endif
+
+.if defined(KERNLDSCRIPT)
+.for k in ${KERNELS}
+EXTRA_CLEAN+= ${k}.ldscript
+${k}: ${k}.ldscript
+${k}.ldscript: ${KERNLDSCRIPT} assym.h
+ ${_MKTARGET_CREATE}
+ ${CPP} -I. ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@
+.endfor
+LINKSCRIPT= -T ${.TARGET}.ldscript
+.endif
Home |
Main Index |
Thread Index |
Old Index