changeset 366:462445ce9207

(Clean|Tidy)up, prepare for updated menu.sh
author ray@terran.dlink.ua
date Mon, 06 Feb 2012 20:18:00 +0200
parents 6c6fa895bcbc
children eeac13549d78
files Makefile
diffstat 1 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Feb 06 20:16:17 2012 +0200
+++ b/Makefile	Mon Feb 06 20:18:00 2012 +0200
@@ -48,10 +48,24 @@
 KERNEL_SIZE_MAX!=sh -c 'echo $$((8 * 1024 * 1024))'
 PREINSTALLDIRS=/lib
 
+##############################################################################
 # Board configuration must define used SoC/CPU
+##############################################################################
 .include "boards/boards.mk"
 
+.if !defined(TARGET_BOARDDIR)
+TARGET_PAIRS!=ls -d ${ZROUTER_ROOT}/boards/*/* | sed 's/^.*\/boards\///'
+.endif
+
+menu:
+	@/usr/bin/env ZROUTER_ROOT="${ZROUTER_ROOT}" ${ZROUTER_ROOT}/menu.sh
+
+show-target-pairs:
+	@echo "${TARGET_PAIRS}"
+
+##############################################################################
 # Set SoC defaults based on SOC_VENDOR/SOC_CHIP
+##############################################################################
 .include "socs/socs.mk"
 
 .if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING)
@@ -86,7 +100,9 @@
 target-profiles-list:
 	@echo ${TARGET_PROFILES}
 
+##############################################################################
 # Profiles - set of SUBDIRS that need to build
+##############################################################################
 .include "profiles/profiles.mk"
 
 .if defined(IMAGE_TYPE) && ${IMAGE_TYPE} == "trx"
@@ -95,13 +111,6 @@
 IMAGE_HEADER_EXTRA?=0
 .endif
 
-
-menu:
-	@/usr/bin/env ZROUTER_ROOT="${ZROUTER_ROOT}" ${ZROUTER_ROOT}/menu.sh
-
-show-target-pairs:
-	@echo "${TARGET_PAIRS}"
-
 build-verify:
 .if !exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/) || !exists(${ZROUTER_ROOT}/boards/${TARGET_VENDOR}/${TARGET_DEVICE}/)
 	@echo "Error: No board configuration for pair TARGET_VENDOR/TARGET_DEVICE \`\"${TARGET_VENDOR}\"/\"${TARGET_DEVICE}\"\`"
@@ -120,6 +129,7 @@
 	@echo "Vendor: ${TARGET_VENDOR}"
 	@echo "SoC Chip: ${SOC_CHIP}"
 	@echo "SoC Vendor: ${SOC_VENDOR}"
+	@echo "Enabled Profiles: ${TARGET_PROFILES}"
 	@echo
 
 basic-tools: