diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-26 22:14:28 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-26 22:14:28 +0000 |
commit | e3872c255c376176d377b0cb03ceedfe4b487242 (patch) | |
tree | 29e7e91187bc9192125e8d22dbf0408886fd1a97 /nuttx/Makefile | |
parent | 06c5cbbff4968fac4181d2204b1985252f4d5016 (diff) | |
download | px4-nuttx-e3872c255c376176d377b0cb03ceedfe4b487242.tar.gz px4-nuttx-e3872c255c376176d377b0cb03ceedfe4b487242.tar.bz2 px4-nuttx-e3872c255c376176d377b0cb03ceedfe4b487242.zip |
Add a directory to hold board-specific drivers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@151 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Makefile')
-rw-r--r-- | nuttx/Makefile | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/nuttx/Makefile b/nuttx/Makefile index 34cc90910..69ad07da2 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -80,12 +80,21 @@ include/arch/board: Make.defs include/arch fi @ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board -context: check_context include/nuttx/config.h include/arch include/arch/board +$(ARCH_SRC)/board: Make.defs + @if [ -e $(ARCH_SRC)/board ]; then \ + if [ -h $(ARCH_SRC)/board ]; then \ + rm -f $(ARCH_SRC)/board ; \ + else \ + echo "$(ARCH_SRC)/board exists but is not a symbolic link" ; \ + exit 1 ; \ + fi ; \ + fi + @ln -s $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board + +context: check_context include/nuttx/config.h include/arch include/arch/board $(ARCH_SRC)/board clean_context: - rm -f include/nuttx/config.h - rm -f include/arch - rm -f include/arch/board + rm -f include/nuttx/config.h include/arch include/arch/board $(ARCH_SRC)/board check_context: @if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \ @@ -123,19 +132,26 @@ depend: $(MAKE) -C $$dir TOPDIR=$(TOPDIR) depend ; \ done -clean: +subdir_clean: @for dir in $(SUBDIRS) ; do \ - $(MAKE) -C $$dir TOPDIR=$(TOPDIR) clean ; \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir TOPDIR=$(TOPDIR) clean ; \ + fi \ done $(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) clean $(MAKE) -C mm -f Makefile.test TOPDIR=$(TOPDIR) clean + +clean: subdir_clean rm -f $(BIN) $(BIN).* mm_test *.map *~ -distclean: clean clean_context +subdir_distclean: @for dir in $(SUBDIRS) ; do \ - $(MAKE) -C $$dir TOPDIR=$(TOPDIR) distclean ; \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir TOPDIR=$(TOPDIR) distclean ; \ + fi \ done - $(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR=$(TOPDIR) distclean + +distclean: clean subdir_distclean clean_context rm -f Make.defs setenv.sh .config |