Iperf Transplant Records
1. Generate the header files required for ARM compilation Config.h
./configure--host=arm
If you need make clean
Make Distclean
2. Add android.mk File
Local_path: = $ (call My-dir)
Include $ (clear_vars)
Local_src_files: = \
Compat/delay.cpp \
COMPAT/ERROR.C \
COMPAT/GETTIMEOFDAY.C \
COMPAT/INET_NTOP.C \
COMPAT/INET_PTON.C \
COMPAT/SIGNAL.C \
COMPAT/SNPRINTF.C \
COMPAT/STRING.C \
Compat/thread.c
Local_src_files + = \
Src/client.cpp \
SRC/EXTRACTOR.C \
SRC/GNU_GETOPT.C \
SRC/GNU_GETOPT_LONG.C \
Src/launch.cpp \
Src/list.cpp \
Src/listener.cpp \
SRC/LOCALE.C \
Src/main.cpp \
Src/perfsocket.cpp \
SRC/REPORTCSV.C \
SRC/REPORTDEFAULT.C \
SRC/REPORTER.C \
Src/server.cpp \
SRC/SERVICE.C \
Src/settings.cpp \
SRC/SOCKETADDR.C \
SRC/SOCKETS.C \
SRC/STDIO.C \
Src/tcp_window_size.c
Local_c_includes + = \
$ (Local_path) \
$ (Local_path)/include
Local_cflags + =-wno-format-security
Local_cflags + =-dhave_config_h
Local_ldlibs + =-lpthread
Local_shared_libraries: = libc libm libcutils libnetutils
Local_module_tags: = Optional
Local_module: = Iperf
Include $ (build_executable)
If you do not add local_cflags + =-wno-format-security
Error compiling prompt:
Format not a string literal and no format arguments [-werror=format-security]
Cc1:some warnings being treated as errors
Modify Android.mk
Local_cflags + =-wno-format-security
3. Execute mm-b under the source directory
Generate the Iperf executable file, and push Iperf to System/bin can be used
The whole transplant process is still relatively smooth, the [-werror=format-security] problem on the card for a long time, the Linux C compilation is not familiar.
Porting Iperf to Android to learn the Linux porting to Android example