9
0
Fork 0

apps/examples/udgram: Add option to configure program name and task properties

This commit is contained in:
Gregory Nutt 2015-01-29 09:33:06 -06:00
parent 49beb2cc41
commit c958153461
2 changed files with 75 additions and 8 deletions

View File

@ -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

View File

@ -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)