I'm trying to build the ip tool of iproute2 using:
$ source build/envsetup.sh
$ cd external/iproute2
$ mm TARGET_PRODUCT=am3517evm
The above lines just build tc. In fact there is no Android.mk file in
the ip directory. I've created an Android.mk file in external/iproute2/
ip and got lots of compiler errors.
It seems to me that the header files in external/iproute2/include/
linux and bionic/libc/kernel/common/linux are incompatible. For
instance the file if.h, in_route.h,... The following line in my
Android.mk file defines the order of the include files:
LOCAL_C_INCLUDES := $(KERNEL_HEADERS) external/iproute2/include
if.h is included from bionic/libc/kernel/common/linux instead of
external/iproute2/include. But if I change the order of the include
paths I get another bunch of errors. Copying and replacing header
files ends up in a big mess.
Is there any chance to build iproute2/ip using the rowboat-android
toolchain and environment?
I have no idea how to proceed. Thank you for your help.
andy
The content of the Android.mk in external/iproute2/ip:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := ip.c ipaddress.c ipaddrlabel.c iproute.c iprule.c
\
rtm_map.c iptunnel.c ip6tunnel.c tunnel.c ipneigh.c ipntable.c
iplink.c \
ipmaddr.c ipmonitor.c ipmroute.c ipprefix.c \
ipxfrm.c xfrm_state.c xfrm_policy.c xfrm_monitor.c \
iplink_vlan.c link_veth.c link_gre.c iplink_can.c
LOCAL_MODULE := ip
LOCAL_MODULE_TAGS := optional
LOCAL_SYSTEM_SHARED_LIBRARIES := \
libc libm libdl
LOCAL_SHARED_LIBRARIES += libiprouteutil libnetlink
$(warning Value of KERNEL_HEADERS is '$(KERNEL_HEADERS)')
LOCAL_C_INCLUDES := $(KERNEL_HEADERS) external/iproute2/include
LOCAL_CFLAGS := -O2 -g -W -Wall
include $(BUILD_EXECUTABLE)