交叉编译脚本-tcpdump

阅读 68

2022-11-08


说明

编译tcpdump的脚本。

参考

​​tcpdump的移植和使用方法​​

编译脚本

run_tcpdump.sh

#!/bin/bash

set -e

PATH_INSTALL=/opt/tcpdump

if [ -f "Makefile" ]; then
make distclean
fi

rm -rf $PATH_INSTALL

./configure \
--prefix=$PATH_INSTALL \
--host=arm-linux \
--target=arm-linux \
--with-pcap=linux \
CC=arm-hisiv400-linux-gcc

make -j12
make install

run_libcap.sh

#!/bin/bash

set -e

PATH_INSTALL=/opt/libpcap

if [ -f "Makefile" ]; then
make distclean
fi

rm -rf $PATH_INSTALL

./configure \
--prefix=$PATH_INSTALL \
--host=arm-linux \
--target=arm-linux \
--with-pcap=linux \
CC=arm-hisiv400-linux-gcc

make -j12
make install


精彩评论(0)

0 0 举报