From c958153461173d01033c856e0a76627e531e7f91 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 29 Jan 2015 09:33:06 -0600 Subject: apps/examples/udgram: Add option to configure program name and task properties --- apps/examples/udgram/Kconfig | 59 +++++++++++++++++++++++++++++++++++++++++++ apps/examples/udgram/Makefile | 24 ++++++++++++------ 2 files changed, 75 insertions(+), 8 deletions(-) (limited to 'apps') diff --git a/apps/examples/udgram/Kconfig b/apps/examples/udgram/Kconfig index 90b568c62..464a89093 100644 --- a/apps/examples/udgram/Kconfig +++ b/apps/examples/udgram/Kconfig @@ -16,4 +16,63 @@ config EXAMPLES_UDGRAM_ADDR string "Unix domain address" default "/var/fifo/fifo" +config EXAMPLES_UDGRAM_SERVER_APPNAME + string "Server executable name" + default "server" + depends on NSH_BUILTIN_APPS + ---help--- + This is the name of the built-in server application + +config EXAMPLES_UDGRAM_SERVER_STACKSIZE + int "Server stack size" + default 4096 + depends on NSH_BUILTIN_APPS + ---help--- + This is the stack size allocated when the server task runs + +config EXAMPLES_UDGRAM_SERVER_PRIORITY + int "Server task priority" + default 100 + depends on NSH_BUILTIN_APPS + ---help--- + This is the priority of the server task + +config EXAMPLES_UDGRAM_SERVER_PROGNAME + string "Server program name" + default "server" + depends on BUILD_KERNEL + ---help--- + This is the name of the program that will be use when the NSH ELF + server program is installed. + +config EXAMPLES_UDGRAM_CLIENT_APPNAME + string "Client executable name" + default "client" + depends on NSH_BUILTIN_APPS + ---help--- + This is the name of the built-in client application + +config EXAMPLES_UDGRAM_CLIENT_STACKSIZE + int "Client stack size" + default 4096 + depends on NSH_BUILTIN_APPS + ---help--- + This is the stack size allocated when the client task runs + +config EXAMPLES_UDGRAM_CLIENT_PRIORITY + int "Client task priority" + default 100 + depends on NSH_BUILTIN_APPS + ---help--- + This is the priority of the client task + +config EXAMPLES_UDGRAM_CLIENT_PROGNAME + string "Client program name" + default "client" + depends on BUILD_KERNEL + ---help--- + This is the name of the program that will be use when the NSH ELF + client program is installed. + + endif # EXAMPLES_UDGRAM diff --git a/apps/examples/udgram/Makefile b/apps/examples/udgram/Makefile index 846e6efad..a6903f8ce 100644 --- a/apps/examples/udgram/Makefile +++ b/apps/examples/udgram/Makefile @@ -51,11 +51,15 @@ SERVER_MAINOBJ = $(SERVER_MAINSRC:.c=$(OBJEXT)) SERVER_SRCS = $(SERVER_ASRCS) $(SERVER_CSRCS) $(SERVER_MAINSRC) SERVER_OBJS = $(SERVER_AOBJS) $(SERVER_COBJS) -SERVER_PROGNAME = server$(EXEEXT) +CONFIG_EXAMPLES_UDGRAM_SERVER_APPNAME ?= server +CONFIG_EXAMPLES_UDGRAM_SERVER_STACKSIZE ?= 4096 +CONFIG_EXAMPLES_UDGRAM_SERVER_PRIORITY ?= SCHED_PRIORITY_DEFAULT +CONFIG_EXAMPLES_UDGRAM_SERVER_PROGNAME ?= server$(EXEEXT) -SERVER_APPNAME = server -SERVER_PRIORITY = SCHED_PRIORITY_DEFAULT -SERVER_STACKSIZE = 2048 +SERVER_APPNAME = $(CONFIG_EXAMPLES_UDGRAM_SERVER_APPNAME) +SERVER_PRIORITY = $(CONFIG_EXAMPLES_UDGRAM_SERVER_PRIORITY) +SERVER_STACKSIZE = $(CONFIG_EXAMPLES_UDGRAM_SERVER_STACKSIZE) +SERVER_PROGNAME = $(CONFIG_EXAMPLES_UDGRAM_SERVER_PROGNAME) CLIENT_ASRCS = CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT)) @@ -69,11 +73,15 @@ CLIENT_MAINOBJ = $(CLIENT_MAINSRC:.c=$(OBJEXT)) CLIENT_SRCS = $(CLIENT_ASRCS) $(CLIENT_CSRCS) $(CLIENT_MAINSRC) CLIENT_OBJS = $(CLIENT_AOBJS) $(CLIENT_COBJS) -CLIENT_PROGNAME = server$(EXEEXT) +CONFIG_EXAMPLES_UDGRAM_CLIENT_APPNAME ?= client +CONFIG_EXAMPLES_UDGRAM_CLIENT_STACKSIZE ?= 4096 +CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY ?= SCHED_PRIORITY_DEFAULT +CONFIG_EXAMPLES_UDGRAM_CLIENT_PROGNAME ?= client(EXEEXT) -CLIENT_APPNAME = client -CLIENT_PRIORITY = SCHED_PRIORITY_DEFAULT -CLIENT_STACKSIZE = 2048 +CLIENT_APPNAME = $(CONFIG_EXAMPLES_UDGRAM_CLIENT_APPNAME) +CLIENT_PRIORITY = $(CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY) +CLIENT_STACKSIZE = $(CONFIG_EXAMPLES_UDGRAM_CLIENT_STACKSIZE) +CLIENT_PROGNAME = $(CONFIG_EXAMPLES_UDGRAM_CLIENT_PROGNAME) AOBJS = $(CLIENT_AOBJS) $(SERVER_AOBJS) COBJS = $(CLIENT_COBJS) $(CLIENT_MAINOBJ) $(SERVER_COBJS) $(SERVER_MAINOBJ) -- cgit v1.2.3