#set default architecture, can be overridden from the compile line
ARCH = $(VLASIATOR_ARCH)
include ../../MAKE/Makefile.${ARCH}

#set FP precision to SP (single) or DP (double)
FP_PRECISION = SP

#Set floating point precision for distribution function to SPF (single) or DPF (double)
DISTRIBUTION_FP_PRECISION = SPF

#Set vector backend type for vlasov solvers, sets precision and length. 
#This mini-app only supports length 4(!)
VECTORCLASS = VEC4D_AGNER
#set vector class


#is profiling on?
CXXFLAGS += -DPROFILE

#Add -DNDEBUG to turn debugging off. If debugging is enabled performance will degrade significantly
CXXFLAGS += -DNDEBUG -fno-tree-vectorize

#Set order of semilag solver in velocity space acceleration
#  ACC_SEMILAG_PLM 	2nd order	
#  ACC_SEMILAG_PPM	3rd order (use this one unless you are testing)
#  ACC_SEMILAG_PQM      5th order (in development)
CXXFLAGS += -DACC_SEMILAG_PPM 
#define USE_AGNER_VECTORCLASS to use an external vector class that is used in some of the solvers
#If not defined a slower but portable implementation is used, as the external one only supports 
#Linux & x86 processors  
#CXXFLAGS += -DUSE_AGNER_VECTORCLASS



#//////////////////////////////////////////////////////
# The rest of this file users shouldn't need to change
#//////////////////////////////////////////////////////

#will need profiler in most places..
CXXFLAGS += ${INC_PROFILE} 

#define precision
CXXFLAGS += -D${FP_PRECISION} -D${DISTRIBUTION_FP_PRECISION} -D${VECTORCLASS}


default: map_test

all: map_test

# Compile directory:
INSTALL = $(CURDIR)

# Executable:
EXE = map_test

# Collect libraries into single variable:
LIBS += ${LIB_PROFILE}

# Define common dependencies
DEPS_COMMON = ../../common.h ../../definitions.h 

#all objects for vlasiator

OBJS = 	map_test.o



help:
	@echo ''
	@echo 'make c(lean)             delete all generated files'
	@echo 'make                     make map_test'

# remove data generated by simulation

clean:
	rm -rf *.o *~ $(EXE)

# Rules for making each object file needed by the executable

map_test.o: map_test.cpp 
	${CMP} ${CXXFLAGS} ${FLAG_OPENMP} ${MATHFLAGS} ${FLAGS}  -c map_test.cpp -I../.. ${INC_PROFILE}  ${INC_VECTORCLASS} 

# Make executable
map_test: $(OBJS)
	$(LNK) ${LDFLAGS} -o ${EXE} $(OBJS) $(LIBS)


