alware 静态交叉编译
buildroot 构建工具链
下载 buildroot
make menuconfig,配置交叉编译目标
make
在 buildroot/output/host/bin 中得到交叉编译工具链
libpcap.a 静态交叉编译
下载 libpcap 源码
进入 libpcap root
先 configure:
CROSS_COMPILE=/home/dev2ero/buildroot-2021.05/output/host/bin/arm-buildroot-linux-gnueabi- CC=${CROSS_COMPILE}gcc ./configure --host=arm-buildroot-linux-gnueabi --prefix=$(pwd)/libpcap-output
再 make:
CROSS_COMPILE=/home/dev2ero/buildroot-2021.05/output/host/bin/arm-buildroot-linux-gnueabi- CC=${CROSS_COMPILE}gcc make -j4
在 libpcap root 中得到 libpcap.a
alware 静态交叉编译
一行:
/home/dev2ero/buildroot-2021.05/output/host/bin/arm-buildroot-linux-gnueabi-gcc alware.c fstrace.c netrace.c ../libpcap/libpcap.a -lpthread -I../libpcap -static -o alware
最后更新于