Module Name: src
Committed By: uebayasi
Date: Sat Aug 29 16:07:07 UTC 2015
Modified Files:
src/sys/conf: Makefile.kern.inc
Added Files:
src/sys/conf: kern.ldscript
Log Message:
Define two suffix rules, .c -> .o and .S -> .o, using ${NORMAL_C} and
${NORMAL_S} respectively. Use the .c rule to build devsw.c, ioconf.c, and
param.c. Other .c/.S files have explicit rules in the generated `Makefile',
and unaffected.
To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/conf/Makefile.kern.inc
cvs rdiff -u -r0 -r1.1 src/sys/conf/kern.ldscript
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.208 src/sys/conf/Makefile.kern.inc:1.209
--- src/sys/conf/Makefile.kern.inc:1.208 Sat Aug 29 15:58:38 2015
+++ src/sys/conf/Makefile.kern.inc Sat Aug 29 16:07:07 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.208 2015/08/29 15:58:38 uebayasi Exp $
+# $NetBSD: Makefile.kern.inc,v 1.209 2015/08/29 16:07:07 uebayasi Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -163,6 +163,14 @@ LINK_O?= @${_MKSHMSG} " link ${.CURDI
${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} && \
${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC}
+.SUFFIXES: .c .o
+.c.o:
+ ${NORMAL_C}
+
+.SUFFIXES: .S .o
+.S.o:
+ ${NORMAL_S}
+
##
## (3) libkern and compat
##
@@ -196,6 +204,7 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN}
## Each port should have a corresponding section with settings for
## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same.
##
+
MI_CFILES=devsw.c ioconf.c param.c
# the need for a MI_SFILES variable is dubitable at best
MI_OBJS=${MI_CFILES:S/.c/.o/}
@@ -205,11 +214,6 @@ param.c: $S/conf/param.c
rm -f param.c
cp $S/conf/param.c .
-.for _cfile in ${MI_CFILES}
-${_cfile:T:R}.o: ${_cfile}
- ${NORMAL_C}
-.endfor
-
##
## (5) link settings
##
Added files: