Skip to content

Commit

Permalink
update 01_build_src.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
superconvert committed Oct 27, 2022
1 parent 1537408 commit 3a0a576
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions 01_build_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,22 @@ if [ "${with_ufw}" = true ]; then
# 编译 libnftnl
if [ ! -d "libnftnl_install" ]; then
mkdir -pv libnftnl_install && cd ${LIBNFTNL_SRC_DIR}
CFLAGS="${ufw_include} ${ufw_library} $CFLAGS" ./configure --prefix=/usr
export LIBMNL_CFLAGS="-I${libmnl_install}/usr/include"
export LIBMNL_LIBS="-L${libmnl_install}/usr/lib -lmnl"
./configure --prefix=/usr
CFLAGS="-L${glibc_install}/lib64 $CFLAGS" make -j8 && make install -j8 DESTDIR=${libnftnl_install} PREFIX=/usr || exit
cd ..
fi

# 编译 iptables ( 需要 libmnl, libnftnl )
if [ ! -d "iptables_install" ]; then
mkdir -pv iptables_install && cd ${IPTABLES_SRC_DIR}
CFLAGS="${ufw_include} ${ufw_library} $CFLAGS" ./configure --prefix=/usr
CFLAGS="-L${glibc_install}/lib64 $CFLAGS" make -j8 && make install -j8 DESTDIR=${iptables_install} PREFIX=/usr || exit
export libmnl_CFLAGS="-I${libmnl_install}/usr/include"
export libmnl_LIBS="-L${libmnl_install}/usr/lib -lmnl"
export libnftnl_CFLAGS="-I${libnftnl_install}/usr/include"
export libnftnl_LIBS="-L${libnftnl_install}/usr/lib -lnftnl"
./configure --prefix=/usr
CFLAGS="-L${glibc_install}/lib64 ${ufw_include} $CFLAGS" make -j8 && make install -j8 DESTDIR=${iptables_install} PREFIX=/usr || exit
cd ..
fi
fi
Expand Down

0 comments on commit 3a0a576

Please sign in to comment.