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

case ${MakeClean} in
	[Yy][Ee][Ss])
		make distclean
		;;
esac

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

env	CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \
	NM="$NM" STRIP="$STRIP" OBJDUMP="$OBJDUMP" \
	CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \
	./configure ${ConfigOpt} \
		--prefix=/usr \
		--with-sysroot=${ToolChainSysRoot} \
		--with-threads \
		--with-zlib \
		--with-lzma \
		--without-python \
		--disable-rebuild-docs \

make ${MAKE_FLAGS}
