summaryrefslogtreecommitdiff
path: root/apps/examples/nx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/nx')
-rw-r--r--apps/examples/nx/Makefile16
-rw-r--r--apps/examples/nx/nx_main.c6
2 files changed, 19 insertions, 3 deletions
diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile
index 326edd118..bdeb57e22 100644
--- a/apps/examples/nx/Makefile
+++ b/apps/examples/nx/Makefile
@@ -59,12 +59,18 @@ endif
ROOTDEPPATH = --dep-path .
+# NX built-in application info
+
+APPNAME = nx
+PRIORITY = SCHED_PRIORITY_DEFAULT
+STACKSIZE = 2048
+
# Common build
VPATH =
all: .built
-.PHONY: clean depend distclean
+.PHONY: context clean depend distclean
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -78,7 +84,13 @@ $(COBJS): %$(OBJEXT): %.c
done ; )
@touch .built
-context:
+.context:
+ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
+ $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
+ @touch $@
+endif
+
+context: .context
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nx/nx_main.c b/apps/examples/nx/nx_main.c
index 3f0578e3f..d8b1eaba0 100644
--- a/apps/examples/nx/nx_main.c
+++ b/apps/examples/nx/nx_main.c
@@ -610,10 +610,14 @@ static int nxeg_initialize(void)
****************************************************************************/
/****************************************************************************
- * Name: user_start
+ * Name: user_start/nx_main
****************************************************************************/
+#ifdef CONFIG_EXAMPLES_NX_BUILTIN
+int nx_main(int argc, char **argv)
+#else
int user_start(int argc, char *argv[])
+#endif
{
NXEGWINDOW hwnd1;
NXEGWINDOW hwnd2;