# Note: run # $ source /opt/intel/composerxe/bin/compilervars.sh intel64 # at the Bash prompt before compiling, or otherwise ensure MKLROOT # is set CXX = icpc LD = $(CXX) CXXFLAGS_ILP64 = -Wall -g -fast -DMKL_ILP64 CXXFLAGS_LP64 = -Wall -g -fast INCLUDES = -I$(MKLROOT)/include LDFLAGS = -Wall -g -L$(MKLROOT)/lib/intel64 LDLIBS_ILP64 = -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm LDLIBS_LP64 = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm EXES = test_ilp64 test_lp64 OBJS = test_ilp64.o test_lp64.o .PHONY: default default: $(EXES) test_ilp64 : test_ilp64.o $(LD) $(LDFLAGS) $^ $(LDLIBS_ILP64) -o $@ test_lp64 : test_lp64.o $(LD) $(LDFLAGS) $^ $(LDLIBS_LP64) -o $@ test_ilp64.o : test.cpp $(CXX) -c $(CXXFLAGS_ILP64) $(INCLUDES) $< -o $@ test_lp64.o : test.cpp $(CXX) -c $(CXXFLAGS_LP64) $(INCLUDES) $< -o $@ .PHONY: clean clean : rm -rf $(OBJS) $(EXES)