################
#
# This is build-parameters fo GCC/MinGW.
# Neither for GCC/Linux and LLVM.
#

case ${CSP_DEBUG} in
   "Yes" | "yes" | "YES" )
     MAKEFLAGS_BASE2="-g -ggdb ${MAKEFLAGS_BASE} -DNDEBUG"
     ;;
   "No" | "no" | "NO" | * )
     MAKEFLAGS_BASE2="${MAKEFLAGS_BASE} -O3 \
                -fvect-cost-model=dynamic -ftree-vectorize \
		-ftree-loop-optimize -ftree-loop-if-convert-stores \
		-fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops \
		-funroll-loops \
		-floop-nest-optimize \
		-march=i686 \
	        -msse -msse2 -mfpmath=sse \
		-std=c++11 \
		-DNDEBUG "
     ;;
esac

case ${USE_LTO} in
   "Yes" | "yes" | "YES" )
       MAKEFLAGS_LINK_BASE="-flto -fwhole-program ${MAKEFLAGS_BASE2}"
       ;;
   "No" | "no" | "NO" | * )
       MAKEFLAGS_LINK_BASE="${MAKEFLAGS_BASE2}"
       ;;
esac

CMAKE_APPENDFLAG="-DUSE_QT5_4_APIS=ON -DUSE_MOVIE_LOADER=ON \
                   -DUSE_MOVIE_SAVER=ON \
                   -DCMAKE_AR:STRING=i686-w64-mingw32-gcc-ar \
                   -DCMAKE_LD:STRING=i686-w64-mingw32-gcc-ld \
		   -DCMAKE_NM:STRING=i686-w64-mingw32-gcc-nm \
		   -DCMAKE_RANLIB:STRING=i686-w64-mingw32-gcc-ranlib \
	   "

