#!/bin/bash
# Copyright (c) 2000-2016 Synology Inc. All rights reserved.

case ${MakeClean} in
	[Yy][Ee][Ss])
		[ -f Makefile ] && make clean
		;;
esac

case ${CleanOnly} in
	[Yy][Ee][Ss])
		return
		;;
esac

ConfigOpt="$ConfigOpt --disable-nftables"
env	CC=${CC} LD=${LD} AR=${AR} STRIP=${STRIP} RANLIB=${RANLIB} NM=${NM} \
	CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
	./configure ${ConfigOpt} \
		--prefix=/usr \
		--with-xtlibdir="/lib/iptables"

make ${MAKE_FLAGS}
