summaryrefslogtreecommitdiffstats
path: root/nuttx/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-03-20 18:18:19 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-03-20 18:18:19 +0000
commita684366ccf61685188a3959c164ee6928dcf3dc6 (patch)
treee513e4fd791670d9b74d33821682d4059ed73098 /nuttx/Makefile
parentd7379c826bb818de6a7a3715fa1bdded015ae7de (diff)
Move nuttx/examples to apps/examples
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3405 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/Makefile')
-rw-r--r--nuttx/Makefile32
1 files changed, 21 insertions, 11 deletions
diff --git a/nuttx/Makefile b/nuttx/Makefile
index fef629ee21..22102a91bf 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -62,23 +62,23 @@ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
#
-# APPS_LOC can be over-ridden from the command line:
+# APPLOC can be over-ridden from the command line or in the .config file:
ifeq ($(CONFIG_BUILTIN_APPS),y)
-ifeq ($(APPS_LOC),)
-APPS_LOC = ../apps
+ifeq ($(APPLOC),)
+APPLOC = ../apps
endif
-APPS_DIR := ${shell if [ -r $(APPS_LOC)/Makefile ]; then echo "$(APPS_LOC)"; fi}
+APPDIR := ${shell if [ -r $(APPLOC)/Makefile ]; then echo "$(APPLOC)"; fi}
endif
PCODE_DIR := ${shell if [ -r pcode/Makefile ]; then echo "pcode"; fi}
-ADDON_DIRS := $(PCODE_DIR) $(NX_DIR) $(APPS_DIR)
+ADDON_DIRS := $(PCODE_DIR) $(NX_DIR) $(APPDIR)
# FSDIRS depend on file descriptor support; NONFSDIRS do not
# (except for parts of FSDIRS). We will exclude FSDIRS
# from the build if file descriptor support is disabled
-NONFSDIRS = sched lib $(ARCH_SRC) mm $(CONFIG_APP_DIR) $(ADDON_DIRS)
+NONFSDIRS = sched lib $(ARCH_SRC) mm $(ADDON_DIRS)
FSDIRS = fs drivers binfmt
CONTEXTDIRS =
@@ -87,6 +87,10 @@ NONFSDIRS += graphics
CONTEXTDIRS += graphics
endif
+ifneq ($(CONFIG_APP_DIR),)
+NONFSDIRS = $(CONFIG_APP_DIR)
+endif
+
# CLEANDIRS are the directories that will clean in. These are
# all directories that we know about.
# MAKEDIRS are the directories in which we will build targets
@@ -99,7 +103,7 @@ ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
MAKEDIRS += fs
endif
ifeq ($(CONFIG_NET),y)
-MAKEDIRS += drivers
+MAKEDIRS += net
endif
else
MAKEDIRS += $(FSDIRS)
@@ -123,7 +127,7 @@ endif
# is disabled.
LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT) \
- lib/liblib$(LIBEXT) $(CONFIG_APP_DIR)/libapp$(LIBEXT)
+ lib/liblib$(LIBEXT)
# Add libraries for network support. CXX, CXXFLAGS, and COMPILEXX must
# be defined in Make.defs for this to work!
@@ -132,12 +136,18 @@ ifeq ($(CONFIG_HAVE_CXX),y)
LINKLIBS += libxx/liblibxx$(LIBEXT)
endif
+# Add application-specific library
+
+ifneq ($(CONFIG_APP_DIR),)
+LINKLIBS = $(CONFIG_APP_DIR)/libapp$(LIBEXT)
+endif
+
# Add library for application support
# Always compile the framework which includes exec_nuttapp if users
# or nuttX applications are to be included.
ifeq ($(CONFIG_BUILTIN_APPS),y)
-LINKLIBS += $(APPS_DIR)/libapps$(LIBEXT)
+LINKLIBS += $(APPDIR)/libapps$(LIBEXT)
endif
# Add libraries for network support
@@ -259,8 +269,8 @@ fs/libfs$(LIBEXT): context
drivers/libdrivers$(LIBEXT): context
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT)
-$(APPS_DIR)/libapps$(LIBEXT): context
- @$(MAKE) -C $(APPS_DIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
+$(APPDIR)/libapps$(LIBEXT): context
+ @$(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
binfmt/libbinfmt$(LIBEXT): context
@$(MAKE) -C binfmt TOPDIR="$(TOPDIR)" libbinfmt$(LIBEXT)