[PATCH 1/1] cmd: simplify network definitions in Makefile

/Makefile already adds lib include paths to UBOOTINCLUDE. There is no point in adding the same paths again.
Clearly separate the lines relating to NET and to NET_LWIP.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- cmd/Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/cmd/Makefile b/cmd/Makefile index 3c5bd56e912..61992112f5f 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -127,13 +127,10 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -ifdef CONFIG_CMD_NET -obj-$(CONFIG_NET) += net.o -obj-$(CONFIG_NET_LWIP) += net-lwip.o -obj-$(filter y,$(CONFIG_CMD_NET) $(CONFIG_CMD_NET_LWIP)) += net-common.o -lwip-includes := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot -CFLAGS_net-lwip.o := $(lwip-includes) -CFLAGS_net-common.o := $(lwip-includes) +ifdef CONFIG_NET +obj-$(CONFIG_CMD_NET) += net.o net-common.o +else ifdef CONFIG_NET_LWIP +obj-$(CONFIG_CMD_NET) += net-lwip.o net-common.o endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o

Thanks Heinrich
On Sat, Oct 19, 2024 at 12:24:45PM +0200, Heinrich Schuchardt wrote:
/Makefile already adds lib include paths to UBOOTINCLUDE. There is no point in adding the same paths again.
Clearly separate the lines relating to NET and to NET_LWIP.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
cmd/Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/cmd/Makefile b/cmd/Makefile index 3c5bd56e912..61992112f5f 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -127,13 +127,10 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -ifdef CONFIG_CMD_NET -obj-$(CONFIG_NET) += net.o -obj-$(CONFIG_NET_LWIP) += net-lwip.o -obj-$(filter y,$(CONFIG_CMD_NET) $(CONFIG_CMD_NET_LWIP)) += net-common.o -lwip-includes := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot -CFLAGS_net-lwip.o := $(lwip-includes) -CFLAGS_net-common.o := $(lwip-includes) +ifdef CONFIG_NET +obj-$(CONFIG_CMD_NET) += net.o net-common.o +else ifdef CONFIG_NET_LWIP +obj-$(CONFIG_CMD_NET) += net-lwip.o net-common.o endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o -- 2.45.2
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org Tested-by: Ilias Apalodimas ilias.apalodimas@linaro.org

On Sat, 19 Oct 2024 12:24:45 +0200, Heinrich Schuchardt wrote:
/Makefile already adds lib include paths to UBOOTINCLUDE. There is no point in adding the same paths again.
Clearly separate the lines relating to NET and to NET_LWIP.
Applied to u-boot/master, thanks!
participants (3)
-
Heinrich Schuchardt
-
Ilias Apalodimas
-
Tom Rini