#-----------------------------------------------------------------------
# makevars
# author: Serge Iovleff
#-----------------------------------------------------------------------
#
# This file have to be include in all makefile of the projects.
#
#-----------------------------------------------------------------------
#
# HASRMATH 't' if your system has libRmath.
# Note: If HASRMATH = t, you have to add the lines
# LIB_RMATH_A = /usr/[local/]lib/libRmath.a   # check the path on your system
# R_FLAGS = -DMATHLIB_STANDALONE
#
HASRMATH = f

#-----------------------------------------------------------------------
# Using stkpp in an R packages (comment CXXFLAGS and STK_FLAGS in Debug and Release section) 
# include $(R_HOME)/etc${R_ARCH}/Makeconf
 STK_FLAGS = ${CPICFLAGS} -ansi -pedantic -Wall

#-----------------------------------------------------------------------
#   Macro       Significance
#               
#   CC         C compiler
#   CXX        C++ compiler
#
#-----------------------------------------------------------------------
# The defaults below are for GNU g++.
#-----------------------------------------------------------------------
# compilers
#CC    = gcc
#CXX   = g++

#-----------------------------------------------------------------------
# make program
# MAKE  = make


#-----------------------------------------------------------------------
# Name of the STK++ library
LIB_STKPP_A = libSTKpp.a

#-----------------------------------------------------------------------
# specific C flags
# long long are available
CFLAGS   = -Wno-long-long

#-----------------------------------------------------------------------
# flags in Debug mode 
#CXXFLAGS   = -std=c++11 -ansi -pedantic -Wall -g -O0
#CXXFLAGS   = -ansi -pedantic -Wall -g -O0
# STK_FLAGS = -DSTK_BOUNDS_CHECK  -DSTK_DEBUG

LDFLAGS =
LDLIBS = -lm

#-----------------------------------------------------------------------
# flags in Release mode 
#CXXFLAGS   = -std=c++11 -ansi -pedantic -Wall -O3 -ftree-vectorize -march=native -funroll-loops
#CXXFLAGS   = -ansi -pedantic -Wall -O3 -march=native -funroll-loops

#-----------------------------------------------------------------------
# Uncomment the next line if you want to have 1 based arrays 
STK_FLAGS += -DSTKBASEARRAYS=1

#-----------------------------------------------------------------------
# Uncomment the next line if you want to use wchar set
# (will not work).
# STK_FLAGS = -DSTK_UNICODE