#===============================================================================
# BLAS, no test for integer overflow.  No timers
#===============================================================================

INSTALL ?= /garbage
INSTALL_LIB = $(INSTALL)/lib
INSTALL_INCLUDE = $(INSTALL)/include
INSTALL_DOC = $(INSTALL)/doc
LAPACK =
BLAS = -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm

CC = gcc
CF = -O0 -g --coverage -fPIC -fopenmp
LDFLAGS = --coverage
UMFPACK_CONFIG = -DTESTING -DNTIMER
LDLIBS = -L$(INSTALL)/lib $(LAPACK) $(BLAS) -lm -lrt \
    -Wl,-rpath=lib -lgcov

ifneq ($(CUDA),no)
    CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
endif
ifneq ($(wildcard $(CUDA_PATH)),)
    # CHOLMOD was compiled to use CUDA
    LDLIBS += $(CUDA_PATH)/lib64/libcudart.so $(CUDA_PATH)/lib64/libcublas.so
endif

RANLIB = ranlib
MV = mv -f
CP = cp -f
ARCHIVE = ar rv

AR_TARGET = $(LIBRARY).a
SO_PLAIN  = $(LIBRARY).so
SO_MAIN   = $(LIBRARY).so.$(SO_VERSION)
SO_TARGET = $(LIBRARY).so.$(VERSION)
SO_OPTS   = -shared -Wl,-soname -Wl,$(SO_MAIN)
SO_INSTALL_NAME = echo
JOBS = 1

#===============================================================================

CLEAN = *.o *.obj *.ln *.bb *.bbg *.da *.c.tcov *.c.gcov gmon.out
