From 0e24b0de612ad596103e4e01d250f0be12278783 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 14 Mar 2011 20:50:46 +0000 Subject: Add apps/poweroff lpc17 hardware handshake git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3380 42af7a65-404d-4744-a932-0658087f49c3 --- apps/Makefile | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'apps/Makefile') 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 + -- cgit v1.2.3