Module Name: src
Committed By: uebayasi
Date: Thu Oct 9 16:35:57 UTC 2014
Modified Files:
src/sys/conf: Makefile.kern.inc
Log Message:
Define a command to generate relocatable objects using ld -r.
To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/conf/Makefile.kern.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.174 src/sys/conf/Makefile.kern.inc:1.175
--- src/sys/conf/Makefile.kern.inc:1.174 Sat Sep 20 19:22:09 2014
+++ src/sys/conf/Makefile.kern.inc Thu Oct 9 16:35:57 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.174 2014/09/20 19:22:09 matt Exp $
+# $NetBSD: Makefile.kern.inc,v 1.175 2014/10/09 16:35:57 uebayasi Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -156,6 +156,12 @@ NORMAL_S?= @${_MKSHMSG} "compile ${.CUR
${_MKSHECHO}\
${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< && \
${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $<
+
+# link rules:
+LINK_O?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}" && \
+ ${_MKSHECHO}\
+ ${LD} -r -o ${.TARGET} ${.ALLSRC} && \
+ ${LD} -r -o ${.TARGET} ${.ALLSRC}
##
## (3) libkern and compat