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

if ! checkPlatformFunction SYNO_FEA_ROUTER_COMMON; then
	SkipThisProject
	return
fi

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

case ${CleanOnly} in
	[Yy][Ee][Ss])
		cd ..
		return
		;;
esac
# Due to the timestamp between local build machine and build system is different,
# then the build system will try to aclocal and automake again and cause build failed
touch aclocal.m4 Makefile.in

LIBUSBDIR="/source/${LIBUSBProj}/"
env CC="${CC}" CXX="${CXX}" LD="${LD}" AR=${AR} STRIP=${STRIP} RANLIB=${RANLIB} NM=${NM} \
	./configure ${ConfigOpt} --disable-werror \
	--prefix=$SynoDir --disable-build-docs \
	--enable-udev=no

make ${MAKE_FLAGS}
