summaryrefslogtreecommitdiff
path: root/apps/system/prun/Makefile
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-05-09 12:30:07 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-05-09 12:30:07 -0600
commit2992f82c56ff672531fd152c89e783c6fc2daec0 (patch)
tree9c640841e6e562f9e98e154ea68d97cb2c211f45 /apps/system/prun/Makefile
parentdb7257ad4894df88a59100a8849b156029fbcf21 (diff)
downloadnuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.tar.gz
nuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.tar.bz2
nuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.zip
Move prun from interpreters/ to system/; And an NSH built-in appliation that can be used to execute P-Code files from the NSH command line
Diffstat (limited to 'apps/system/prun/Makefile')
-rw-r--r--apps/system/prun/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/system/prun/Makefile b/apps/system/prun/Makefile
index 63fc1ad74..6d5d0a768 100644
--- a/apps/system/prun/Makefile
+++ b/apps/system/prun/Makefile
@@ -48,9 +48,20 @@ CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \
"$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)include" \
"$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)insn$(DELIM)include"}
+CONFIG_SYSTEM_PEXEC_STACKSIZE ?= 1536
+CONFIG_SYSTEM_PEXEC_PRIORITY ?= 100
+
+APPNAME = pexec
+PRIORITY = $(CONFIG_SYSTEM_PEXEC_PRIORITY)
+STACKSIZE = $(CONFIG_SYSTEM_PEXEC_STACKSIZE)
+
ASRCS =
CSRCS = prun.c
+ifeq ($(CONFIG_SYSTEM_PEXEC),y)
+CSRCS += pexec_main.c
+endif
+
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
@@ -86,7 +97,18 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+ifeq ($(CONFIG_SYSTEM_PEXEC),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
+ $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
+
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
context:
+endif
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep