net: split cmd/net.c into cmd/net.c and cmd/net-common.c
Extract some code from cmd/net.c that will be useful in a subsequent
commit to implement wget with NET_LWIP.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/cmd/Makefile b/cmd/Makefile
index 94a3df4..f309140 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -130,7 +130,10 @@
ifdef CONFIG_CMD_NET
obj-$(CONFIG_NET) += net.o
obj-$(CONFIG_NET_LWIP) += net-lwip.o
-CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
+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)
endif
obj-$(CONFIG_ENV_SUPPORT) += nvedit.o
obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o