Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules Tidy up Makefile of cyclic and dtrace modules to...



details:   https://anonhg.NetBSD.org/src/rev/3b83464755fd
branches:  trunk
changeset: 327346:3b83464755fd
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Wed Mar 05 06:40:45 2014 +0000

description:
Tidy up Makefile of cyclic and dtrace modules to support ARM

diffstat:

 sys/modules/cyclic/Makefile        |  20 ++++++++++++++++----
 sys/modules/dtrace/dtrace/Makefile |  26 ++++++++++++++++++--------
 2 files changed, 34 insertions(+), 12 deletions(-)

diffs (78 lines):

diff -r 9fd7f5c67539 -r 3b83464755fd sys/modules/cyclic/Makefile
--- a/sys/modules/cyclic/Makefile       Wed Mar 05 06:35:44 2014 +0000
+++ b/sys/modules/cyclic/Makefile       Wed Mar 05 06:40:45 2014 +0000
@@ -2,14 +2,26 @@
 
 .include "../Makefile.inc"
 
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/cyclic
+.include <bsd.own.mk>
+
+OSNETDIR=${NETBSDSRCDIR}/external/cddl/osnet
+
+.if exists(${OSNETDIR}/dev/cyclic/${MACHINE:S/amd64/i386/})
+ARCH=${MACHINE:S/amd64/i386/}
+.elif exists(${OSNETDIR}/dev/cyclic/${MACHINE_CPU})
+ARCH=${MACHINE_CPU}
+.else
+.error ${MACHINE} or ${MACHINE_CPU} not supported.
+.endif
+
+.PATH: ${OSNETDIR}/dev/cyclic
 
 KMOD=          cyclic
 SRCS=          cyclic.c
 
-CPPFLAGS+=     -I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-               -I${NETBSDSRCDIR}/external/cddl/osnet/dev/cyclic/${MACHINE:S/amd64/i386/} \
-               -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
+CPPFLAGS+=     -I${OSNETDIR}/sys \
+               -I${OSNETDIR}/dev/cyclic/${ARCH} \
+               -I${OSNETDIR}/dist/uts/common
 
 CPPFLAGS+=     -Wno-unknown-pragmas -Wno-cast-qual
 
diff -r 9fd7f5c67539 -r 3b83464755fd sys/modules/dtrace/dtrace/Makefile
--- a/sys/modules/dtrace/dtrace/Makefile        Wed Mar 05 06:35:44 2014 +0000
+++ b/sys/modules/dtrace/dtrace/Makefile        Wed Mar 05 06:40:45 2014 +0000
@@ -3,11 +3,21 @@
 .include "../../Makefile.inc"
 .include "../../Makefile.assym"
 
-ARCHDIR=       ${MACHINE}
+.include <bsd.own.mk>
+
+OSNETDIR=${NETBSDSRCDIR}/external/cddl/osnet
 
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common/dtrace
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace/${ARCHDIR}
+.if exists(${OSNETDIR}/dev/dtrace/${MACHINE})
+ARCH=${MACHINE}
+.elif exists(${OSNETDIR}/dev/dtrace/${MACHINE_CPU})
+ARCH=${MACHINE_CPU}
+.else
+.error ${MACHINE} or ${MACHINE_CPU} not supported.
+.endif
+
+.PATH: ${OSNETDIR}/dist/uts/common/dtrace
+.PATH: ${OSNETDIR}/dev/dtrace
+.PATH: ${OSNETDIR}/dev/dtrace/${ARCH}
 
 KMOD=          dtrace
 SRCS=          dtrace.c \
@@ -19,10 +29,10 @@
                instr_size.c
 .endif
 
-CPPFLAGS+=     -I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-               -I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace \
-               -I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace/${ARCHDIR} \
-               -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common \
+CPPFLAGS+=     -I${OSNETDIR}/sys \
+               -I${OSNETDIR}/dev/dtrace \
+               -I${OSNETDIR}/dev/dtrace/${ARCH} \
+               -I${OSNETDIR}/dist/uts/common \
                -DDIS_MEM
 
 CPPFLAGS+=     -DSMP -DDEBUG



Home | Main Index | Thread Index | Old Index