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

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

if [ "$PLATFORM_FAMILY" != "SYNOPLAT_F_X86_64" ]; then
	SkipThisProject
	return
fi

make DESTDIR=${TmpInstDir} install-exec

find "$TmpInstDir/" -type f -name "*.la" | xargs rm
find "$TmpInstDir/" -type f -name "*.a" | xargs rm

mv "$TmpInstDir/usr/lib" "$TmpInstDir"
rm -rf "$TmpInstDir/usr"

if [ "$NOSTRIP" != "NOSTRIP" ]; then
	$STRIP "$TmpInstDir/lib/"*
fi
