summaryrefslogtreecommitdiff
path: root/apps/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-14 20:50:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-14 20:50:46 +0000
commit0e24b0de612ad596103e4e01d250f0be12278783 (patch)
tree6ddb2ebc5c6cc9b94cc88baa085901046a345861 /apps/Makefile
parent9264b754565c550afad96d4ef5ad1a76e6e8c233 (diff)
downloadpx4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.tar.gz
px4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.tar.bz2
px4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.zip
Add apps/poweroff lpc17 hardware handshake
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3380 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/Makefile')
-rw-r--r--apps/Makefile38
1 files changed, 31 insertions, 7 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 40cae5a40..6622932a0 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -49,23 +49,44 @@ BUILTIN_APPS_DIR =
ifeq ($(CONFIG_BUILTIN_APPS_NUTTX),y)
-# Individual application: HELLO
+# BUILTIN_APPS is the list of all configured built-in directories/built action
+
+BUILTIN_APPS =
ifeq ($(CONFIG_BUILTIN_APPS_HELLO),y)
-BUILTIN_APPS_DIR += hello
-BUILTIN_APPS_BUILT += hello/.built_always
+BUILTIN_APPS += hello/.built_always
endif
ifeq ($(CONFIG_BUILTIN_APPS_POWEROFF),y)
-BUILTIN_APPS_DIR += poweroff
-BUILTIN_APPS_BUILT += poweroff/.built_always
+BUILTIN_APPS += poweroff/.built_always
endif
ifeq ($(CONFIG_BUILTIN_APPS_JVM),y)
-BUILTIN_APPS_DIR += jvm
-BUILTIN_APPS_BUILT += jvm/.built_always
+BUILTIN_APPS += jvm/.built_always
endif
+# AVAILABLE_APPS is the list of currently available application directories
+
+AVAILABLE_APPS =
+
+define ADD_AVAILABLE
+AVAILABLE_APPS += ${shell DIR=`echo $1 | cut -d'/' -f1`; if [ -r $$DIR/Makefile ]; then echo "$1"; fi}
+endef
+
+define BUILTIN_ADD_APP
+BUILTIN_APPS_DIR += ${shell echo $1 | cut -d'/' -f1}
+endef
+
+define BUILTIN_ADD_BUILT
+BUILTIN_APPS_BUILT += ${shell echo $1 | cut -d'/' -f2}
+endef
+
+# Create the list of applications to build
+
+$(foreach BUILTIN, $(BUILTIN_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))))
+
# end of application list
endif
@@ -122,5 +143,8 @@ clean:
distclean: clean
@rm -f Make.dep .depend
+ @rm -f exec_nuttapp_list.h
+ @rm -f exec_nuttapp_proto.h
-include Make.dep
+