changeset 202:02c1a507ea30

Allow to specify TARGET_CPUARCH in soc.mk or board.mk
author ray@terran.dlink.ua
date Fri, 30 Sep 2011 12:14:27 +0300
parents 3b87524c2bed
children 958786b3331a
files Makefile
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Sep 18 01:15:02 2011 +0300
+++ b/Makefile	Fri Sep 30 12:14:27 2011 +0300
@@ -18,6 +18,8 @@
 WORLDDESTDIR=${ZROUTER_OBJ}/${TARGET_VENDOR}_${TARGET_DEVICE}_rootfs
 SRCROOTUP!=${ZROUTER_ROOT}/tools/rootup.sh ${FREEBSD_SRC_TREE}
 
+TARGET_CPUARCH?=${TARGET}
+
 # XXX Need found something better or use per profile
 ROOTFS_DEPTEST?=${WORLDDESTDIR}/bin/sh
 
@@ -125,7 +127,7 @@
 _KERNEL_BUILD_ENV= \
 	TARGET=${TARGET} \
 	TARGET_ARCH=${TARGET_ARCH} \
-	TARGET_CPUARCH=${TARGET} \
+	TARGET_CPUARCH=${TARGET_CPUARCH} \
 	ZROUTER_ROOT=${ZROUTER_ROOT} \
 	WITHOUT_RESCUE=yes \
 	WITHOUT_CLANG=yes \
@@ -154,7 +156,7 @@
 _WORLD_TCBUILD_ENV= \
 	TARGET=${TARGET} \
 	TARGET_ARCH=${TARGET_ARCH} \
-	TARGET_CPUARCH=${TARGET} \
+	TARGET_CPUARCH=${TARGET_CPUARCH} \
 	ZROUTER_ROOT=${ZROUTER_ROOT} \
 	WITHOUT_ATM=yes \
 	WITHOUT_INFO=yes \
@@ -174,7 +176,7 @@
 _WORLD_BUILD_ENV= \
 	TARGET=${TARGET} \
 	TARGET_ARCH=${TARGET_ARCH} \
-	TARGET_CPUARCH=${TARGET} \
+	TARGET_CPUARCH=${TARGET_CPUARCH} \
 	ZROUTER_ROOT=${ZROUTER_ROOT} \
 	WITHOUT_ASSERT_DEBUG=yes \
 	WITHOUT_ATM=yes \
@@ -320,9 +322,11 @@
 
 .include "share/mk/zrouter.ports.mk"
 
-rootfs-dir:
+rootfs-dir!
 	mkdir -p ${WORLDDESTDIR}
-	mkdir -p ${WORLDDESTDIR}/usr/lib/lua/
+	mkdir -p ${WORLDDESTDIR}/usr/lib/lua/ || true
+	mkdir -p ${WORLDDESTDIR}/usr/local/bin/ || true
+	mkdir -p ${WORLDDESTDIR}/usr/local/sbin/ || true
 	for dir in ${PREINSTALLDIRS}; do mkdir -p ${WORLDDESTDIR}/$${dir}; done
 
 kernel-install-dir: