逐一编译以下内容:
- # 编译脚本, 放到文件夹内
- echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
- ./configure --cache-file=arm-linux.cache --prefix=/home/worker/workspace/wifilib \
- --host=arm-linux-gnueabihf
-
- rm arm-linux.cache
- make
- make install
- make distclean
-
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/worker/workspace/wifilib
- export PKG_CONFIG_PATH=/home/worker/workspace/wifilib/lib/pkgconfig
-
- ./configure --prefix=/home/worker/workspace/wifilib --host=arm-linux-gnueabihf --without-x \
- CFLAGS=-I/home/worker/workspace/wifilib/include LDFLAGS=-L/home/worker/workspace/wifilib/lib
- ./configure --prefix=/home/worker/workspace/wifilib --host=arm-linux-gnueabihf
-
- make
- make install
- setarch i386 ./config --prefix=/home/worker/workspace/wifilib --cross-compile-prefix=arm-linux-gnueabihf- \
- no-asm shared
- ./config --prefix=/home/worker/workspace/wifilib --cross-compile-prefix=arm-linux-gnueabihf- \
- no-asm shared
- 添加以下内容:
-
- CFLAGS += -I/home/worker/workspace/wifilib/include
- LIBS += -L/home/worker/workspace/wifilib/lib
- CC=arm-linux-gnueabihf-gcc