system/dhcpc: The DHCPC renew command did not build correctly due to naming problems. Noted by Masayuki Ishikawa,
This commit is contained in:
parent
a3ac695f17
commit
54d55cb307
@ -3,7 +3,7 @@
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
config SYSTEM_DHCPC
|
||||
config SYSTEM_DHCPC_RENEW
|
||||
bool "DHCP Address Renewal"
|
||||
default n
|
||||
select NETUTILS_DHCPC
|
||||
@ -11,9 +11,9 @@ config SYSTEM_DHCPC
|
||||
---help---
|
||||
Enble the DHCP client 'renew' command
|
||||
|
||||
if SYSTEM_DHCPC
|
||||
if SYSTEM_DHCPC_RENEW
|
||||
|
||||
config SYSTEM_DHCPC_PROGNAME
|
||||
config DHCPC_RENEW_PROGNAME
|
||||
string "Program name"
|
||||
default "renew"
|
||||
depends on BUILD_KERNEL
|
||||
@ -21,11 +21,11 @@ config SYSTEM_DHCPC_PROGNAME
|
||||
This is the name of the program that will be use when the NSH ELF
|
||||
program is installed.
|
||||
|
||||
config SYSTEM_DHCPC_PRIORITY
|
||||
config DHCPC_RENEW_PRIORITY
|
||||
int "DHCPC task priority"
|
||||
default 100
|
||||
|
||||
config SYSTEM_DHCPC_STACKSIZE
|
||||
config DHCPC_RENEW_STACKSIZE
|
||||
int "DHCPC stack size"
|
||||
default 2048
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_SYSTEM_DHCPC),y)
|
||||
ifeq ($(CONFIG_SYSTEM_DHCPC_RENEW),y)
|
||||
CONFIGURED_APPS += system/dhcpc
|
||||
endif
|
||||
|
||||
|
@ -39,31 +39,31 @@ include $(APPDIR)/Make.defs
|
||||
|
||||
# DHCPC address renewal built-in application info
|
||||
|
||||
CONFIG_SYSTEM_DHCPC_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_SYSTEM_DHCPC_STACKSIZE ?= 2048
|
||||
CONFIG_DHCPC_RENEW_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_DHCPC_RENEW_STACKSIZE ?= 2048
|
||||
|
||||
APPNAME = renew
|
||||
PRIORITY = $(CONFIG_SYSTEM_DHCPC_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_SYSTEM_DHCPC_STACKSIZE)
|
||||
RENEW_APPNAME = renew
|
||||
RENEW_PRIORITY = $(CONFIG_DHCPC_RENEW_PRIORITY)
|
||||
RENEW_STACKSIZE = $(CONFIG_DHCPC_RENEW_STACKSIZE)
|
||||
|
||||
CONFIG_SYSTEM_DHCPC_PROGNAME ?= renew$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_SYSTEM_DHCPC_PROGNAME)
|
||||
CONFIG_DHCPC_RENEW_PROGNAME ?= renew$(EXEEXT)
|
||||
RENEW_PROGNAME = $(CONFIG_DHCPC_RENEW_PROGNAME)
|
||||
|
||||
# DHCPC address renewal
|
||||
|
||||
ASRCS =
|
||||
CSRCS =
|
||||
MAINSRC = dhcpc_main.c
|
||||
RENEW_SRCS =
|
||||
RENEW_MAINSRC = renew_main.c
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
||||
RENEW_OBJS = $(RENEW_SRCS:.c=$(OBJEXT))
|
||||
RENEW_MAINOBJ = $(RENEW_MAINSRC:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
# Other DHCPC commands go here
|
||||
|
||||
SRCS = $(RENEW_SRCS) $(RENEW_MAINSRC)
|
||||
OBJS = $(RENEW_OBJS)
|
||||
|
||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||
OBJS += $(MAINOBJ)
|
||||
OBJS += $(RENEW_MAINOBJ)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
@ -91,10 +91,7 @@ VPATH =
|
||||
all: .built
|
||||
.PHONY: clean depend distclean
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
||||
$(OBJS) $(RENEW_MAINOBJ): %$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
.built: $(OBJS)
|
||||
@ -102,12 +99,12 @@ $(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
||||
@touch .built
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||
@echo "LD: $(PROGNAME)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
||||
$(BIN_DIR)$(DELIM)$(RENEW_PROGNAME): $(OBJS) $(RENEW_MAINOBJ)
|
||||
@echo "LD: $(RENEW_PROGNAME)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(RENEW_PROGNAME) $(ARCHCRT0OBJ) $(RENEW_MAINOBJ) $(LDLIBS)
|
||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(RENEW_PROGNAME)
|
||||
|
||||
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
||||
install: $(BIN_DIR)$(DELIM)$(RENEW_PROGNAME)
|
||||
|
||||
else
|
||||
install:
|
||||
@ -115,10 +112,10 @@ install:
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
||||
$(BUILTIN_REGISTRY)$(DELIM)$(RENEW_APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||
$(call REGISTER,$(RENEW_APPNAME),$(RENEW_PRIORITY),$(RENEW_STACKSIZE),$(RENEW_APPNAME)_main)
|
||||
|
||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(RENEW_APPNAME)_main.bdat
|
||||
else
|
||||
context:
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* system/dhcpc/dhcpc_main.c
|
||||
* system/dhcpc/renew_main.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -66,13 +66,13 @@ static void dhcpc_showusage(FAR const char *progname, int exitcode)
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* dhcpc_main
|
||||
* renew_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int dhcpc_main(int argc, char *argv[])
|
||||
int renew_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
FAR const char *devname;
|
Loading…
Reference in New Issue
Block a user