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

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

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

if checkPlatformFunction SYNO_PLAT_BIG_ENDIAN; then
	BYTE_ORDER="-DXML_BYTE_ORDER=12"
else
	BYTE_ORDER="-DXML_BYTE_ORDER=21"
fi

make ${MAKE_FLAGS} BYTE_ORDER=${BYTE_ORDER}
