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

if [ "x$NOSTRIP" = "xNOSTRIP" ]; then
	make DESTDIR=$TmpInstDir install $RemoteInstallLayout
else
	make DESTDIR=$TmpInstDir install-strip $RemoteInstallLayout
fi

rm -rf $TmpInstDir/usr/sbin
rm -rf $TmpInstDir/usr/etc
rm -rf $TmpInstDir/usr/include
rm -rf $TmpInstDir/usr/share
rm -rf $TmpInstDir/usr/lib/pkgconfig/

# depend on the usage
rm -f $TmpInstDir/usr/lib/libnl-idiag*
rm -f $TmpInstDir/usr/lib/libnl-nf*

find $TmpInstDir | egrep -E '\.a$|\.la$' | xargs -I@ rm "@"
