summaryrefslogtreecommitdiff
path: root/nuttx/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-26 16:47:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-26 16:47:17 +0000
commit899c7204851d44de519804af8a75e0b459012e9f (patch)
tree449ad4c5decd48591605264d1a881a4b81b9bdce /nuttx/Makefile
parent3a5002af1855fbc7989ea994301abaa420be6db3 (diff)
downloadpx4-nuttx-899c7204851d44de519804af8a75e0b459012e9f.tar.gz
px4-nuttx-899c7204851d44de519804af8a75e0b459012e9f.tar.bz2
px4-nuttx-899c7204851d44de519804af8a75e0b459012e9f.zip
Create a place to hold board specific header files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@146 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Makefile')
-rw-r--r--nuttx/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/nuttx/Makefile b/nuttx/Makefile
index e41e9cbb1..34cc90910 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -39,6 +39,7 @@ TOPDIR = ${shell pwd}
ARCH_DIR = arch/$(CONFIG_ARCH)
ARCH_SRC = $(ARCH_DIR)/src
+BOARD_DIR = configs/$(CONFIG_BOARD)
SUBDIRS = sched lib $(ARCH_SRC) mm fs drivers examples/$(CONFIG_EXAMPLE)
@@ -57,7 +58,7 @@ tools/mkconfig:
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
tools/mkconfig $(TOPDIR) > include/nuttx/config.h
-include/arch: include/nuttx/config.h
+include/arch: Make.defs
@if [ -e include/arch ]; then \
if [ -h include/arch ]; then \
rm -f include/arch ; \
@@ -68,11 +69,23 @@ include/arch: include/nuttx/config.h
fi
@ln -s $(TOPDIR)/$(ARCH_DIR)/include include/arch
-context: check_context include/nuttx/config.h include/arch
+include/arch/board: Make.defs include/arch
+ @if [ -e include/arch/board ]; then \
+ if [ -h include/arch/board ]; then \
+ rm -f include/arch/board ; \
+ else \
+ echo "include/arch/board exists but is not a symbolic link" ; \
+ exit 1 ; \
+ fi ; \
+ fi
+ @ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
+
+context: check_context include/nuttx/config.h include/arch include/arch/board
clean_context:
rm -f include/nuttx/config.h
rm -f include/arch
+ rm -f include/arch/board
check_context:
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \