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

case ${MakeClean} in
	[Yy][Ee][Ss])
		make distclean 2>/dev/null
		;;
esac

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


env	CC="${CC}" CXX="${CXX}" LD="${LD}" AR=${AR} STRIP=${STRIP} RANLIB=${RANLIB} NM=${NM} \
	CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" \
	LDFLAGS="${LDFLAGS}" \
	DSOFLAGS="${LDFLAGS}" \
	./configure ${ConfigOpt} \
		--prefix=/usr \
		--libdir=/usr/lib \
		--sbindir=/usr/bin \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--datadir=/usr/share \
		--disable-ssl \
		--disable-gnutls \
		--disable-cdsassl \
		--disable-pam \
		--disable-libusb \
		--without-java \
		--without-perl \
		--without-python \
		--without-php \
		--enable-debug \
		--enable-debug-printfs \
		--disable-gssapi \
		--enable-largefile \
		--enable-avahi \
		--disable-dnssd \
		--disable-dbus \
		--disable-webif \
		--with-components=synology

make ${MAKE_FLAGS} HOSTCXX=/usr/bin/ccache-g++

# vim:ft=sh
