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

case "$MakeClean" in
	[Yy][Ee][Ss])
		[ -f Makefile ] && make distclean
		;;
esac

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

CFLAGS="${CFLAGS} -DSYNO_SSH2"

env CC="$CC" LD="$LD" AR="$AR" STRIP="$STRIP" RANLIB="$RANLIB" NM="$NM" \
	CPPFLAGS="$CFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
	./configure $ConfigOpt \
		--prefix=/usr \
		--enable-static \
		--with-pic \
		--with-crypto=openssl \
		--with-libssl-prefix="$SysRootPrefix" \
		--with-libz-prefix="$SysRootPrefix"

make $MAKE_FLAGS

# vim:ft=sh
