net: split net into net{,-common,-legacy,-lwip}
Make net.h a wrapper which includes net-common.h and either
net-legacy.h or net-lwip.h based on NET_LWIP. The function
copy_filename() can be useful when NET_LWIP is enabled, therefore
move it out of net/net.c which is built only when networking choice
is NET and create a new file net/net-common.c.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/Makefile b/Makefile
index f203a4f..a2e9435 100644
--- a/Makefile
+++ b/Makefile
@@ -842,7 +842,9 @@
-I$(srctree)/arch/arm/thumb1/include)) \
-I$(srctree)/arch/$(ARCH)/include \
-include $(srctree)/include/linux/kconfig.h \
- -I$(srctree)/dts/upstream/include
+ -I$(srctree)/dts/upstream/include \
+ $(if $(CONFIG_NET_LWIP), -I$(srctree)/lib/lwip/lwip/src/include \
+ -I$(srctree)/lib/lwip/u-boot)
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)