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

if checkPlatformFunction SYNO_FEA_VDSM; then
	X64=yes
	MAKE_OPTS='SYNO_MKE2FS_64BITS="yes"'
else
	SkipThisProject
	return
fi

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

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

# [Work around] -L${SysRootLib} force linker search sysroot/usr/lib first instead of sysroot/lib
# libuuid.so is duplicated in sysroot/lib and sysroot/usr/lib.
./configure --prefix="" \
	--enable-elf-shlibs --disable-nls --disable-tls --disable-libuuid --disable-libblkid --disable-uuidd \
	--disable-imager --enable-fsck="no" --enable-e2initrd-helper="no"

make ${MAKE_FLAGS} ${MAKE_OPTS}
