
LIB	:= -lm

# uncomment these lines for the Gnu gcc compiler
# CC	:= gcc
# FLAGS	:= -std=c99 -O3 -march=native -fopenmp -L${MKLROOT}/include
# LIB	:= -L${MKLROOT}/lib -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl

# see here for compiler/link options
# https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html

# uncomment these lines for the Intel icx compiler
# -- the default for -qopt-report is 2, the range is 1-5
CC	:= icx
FLAGS	:= -std=c99 -O3 -xHost -qopenmp -qmkl -qopt-report=1 -qopt-report-file=stdout

all:	GBM GBM2

GBM:	GBM.c Makefile
	$(CC) $(FLAGS) GBM.c -o GBM $(LIB)

GBM2:	GBM2.c Makefile
	$(CC) $(FLAGS) GBM2.c -o GBM2 $(LIB)

clean:
	rm -f GBM

