交叉编译openssl/curl/sqlite/modbus/libxml2/mosquitto

交叉编译工具 arm-linux-gnueabihf-gcc
ARM开发板 Cortex A8 ARMv7a

1.openssl(openssl-1.0.2p.tar.gz)

./Configure --prefix=/usr/local/src/arm-linux/openssl --cross-compile-prefix=arm-linux-gnueabihf- no-asm shared linux-armv4 -march=armv7-a -D__ARM_MAX_ARCH__=7
make
make install

2.curl(curl-7.60.0.tar.gz)

env LDFLAGS=-R/usr/local/src/arm-linux/openssl/lib ./configure --prefix=/usr/local/src/arm-linux/curl CC=arm-linux-gnueabihf-gcc --host=arm-linux --with-ssl=/usr/local/src/arm-linux/openssl
make
make install

3.sqlite(sqlite-snapshot-201804210306.tar.gz)

./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc --prefix=/usr/local/src/arm-linux/sqlite
make
make install

4.modbus (libmodbus-3.1.4.tar.gz)

./configure ac_cv_func_malloc_0_nonnull=yes --host=arm-linux --enable-static --prefix=/usr/local/src/arm-linux/modbus 
make 
make install

5.libxml2(libxml2-2.9.1.tar.gz)

./configure --host=arm-linux  CC=arm-linux-gnueabihf-gcc --prefix=/usr/local/src/arm-linux/libxml2 --enable-shared --with-python=no
make 
make install

6.mosquitto

make WITH_SRV=no WITH_UUID=no WITH_WEBSOCKETS=no WITH_DOCS=no  CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ CFLAGS="-I/usr/local/src/arm-linux/openssl/include" LDFLAGS="-L/usr/local/src/arm-linux/openssl/lib -lssl -lcrypto"

你可能感兴趣的:(嵌入式)