summaryrefslogtreecommitdiff
path: root/apps/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-18 18:31:26 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-18 18:31:26 +0000
commit529a1cf7339541eaee3d189a3b97d9c544ba7810 (patch)
tree2ef2e0911d89b06813b81aa21360cf2e20e24ca3 /apps/Makefile
parent5029575d531576c6818094334dcae95359bdd119 (diff)
downloadnuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.tar.gz
nuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.tar.bz2
nuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.zip
apps/ update from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3392 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/Makefile')
-rw-r--r--apps/Makefile34
1 files changed, 14 insertions, 20 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 6622932a0..11d06217b 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -47,25 +47,17 @@ endif
BUILTIN_APPS_BUILT =
BUILTIN_APPS_DIR =
-ifeq ($(CONFIG_BUILTIN_APPS_NUTTX),y)
+ifeq ($(CONFIG_BUILTIN_APPS),y)
-# BUILTIN_APPS is the list of all configured built-in directories/built action
+# CONFIGURED_APPS is the list of all configured built-in directories/built action
+# It is created by the configured appconfig file (a copy of which appears in this
+# directoy as .config)
-BUILTIN_APPS =
+CONFIGURED_APPS =
+-include .config
-ifeq ($(CONFIG_BUILTIN_APPS_HELLO),y)
-BUILTIN_APPS += hello/.built_always
-endif
-
-ifeq ($(CONFIG_BUILTIN_APPS_POWEROFF),y)
-BUILTIN_APPS += poweroff/.built_always
-endif
-
-ifeq ($(CONFIG_BUILTIN_APPS_JVM),y)
-BUILTIN_APPS += jvm/.built_always
-endif
-
-# AVAILABLE_APPS is the list of currently available application directories
+# AVAILABLE_APPS is the list of currently available application directories. It
+# is the same as CONFIGURED_APPS, but filtered to exclude any non-existent apps
AVAILABLE_APPS =
@@ -78,12 +70,14 @@ BUILTIN_APPS_DIR += ${shell echo $1 | cut -d'/' -f1}
endef
define BUILTIN_ADD_BUILT
-BUILTIN_APPS_BUILT += ${shell echo $1 | cut -d'/' -f2}
+BUILTIN_APPS_BUILT += $1
endef
-# Create the list of applications to build
+# (1) Create the list of available applications (AVAILABLE_APPS), (2) Add each
+# available app to the list of to build (BUILTIN_APPS_DIR), and (3) Add the
+# "built" indication for each app (BUILTIN_APPS_BUILT).
-$(foreach BUILTIN, $(BUILTIN_APPS), $(eval $(call ADD_AVAILABLE,$(BUILTIN))))
+$(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_AVAILABLE,$(BUILTIN))))
$(foreach APP, $(AVAILABLE_APPS), $(eval $(call BUILTIN_ADD_APP,$(APP))))
$(foreach BUILT, $(AVAILABLE_APPS), $(eval $(call BUILTIN_ADD_BUILT,$(BUILT))))
@@ -91,7 +85,6 @@ $(foreach BUILT, $(AVAILABLE_APPS), $(eval $(call BUILTIN_ADD_BUILT,$(BUILT))))
endif
-
ROOTDEPPATH = --dep-path .
ASRCS =
CSRCS = exec_nuttapp.c
@@ -142,6 +135,7 @@ clean:
$(call CLEAN)
distclean: clean
+ @rm -r .config
@rm -f Make.dep .depend
@rm -f exec_nuttapp_list.h
@rm -f exec_nuttapp_proto.h