diff --git a/OpenCL.make b/OpenCL.make index 484921d..8ad7108 100644 --- a/OpenCL.make +++ b/OpenCL.make @@ -1,18 +1,20 @@ ifndef COMPILER define compiler_help -Set COMPILER to ensure correct flags are set. +Set COMPILER to change flags (defaulting to GNU). Available compilers are: GNU CLANG INTEL CRAY + endef $(info $(compiler_help)) +COMPILER=GNU endif -COMPILER_ = $(CXX) COMPILER_GNU = g++ COMPILER_CLANG = clang++ COMPILER_INTEL = icpc COMPILER_CRAY = CC +CXX = $(COMPILER_$(COMPILER)) FLAGS_ = -O3 -std=c++11 FLAGS_GNU = -O3 -std=c++11 @@ -29,7 +31,7 @@ else endif ocl-stream: main.cpp OCLStream.cpp - $(COMPILER_$(COMPILER)) $(CXXFLAGS) -DOCL $^ $(EXTRA_FLAGS) $(LIBS) -o $@ + $(CXX) $(CXXFLAGS) -DOCL $^ $(EXTRA_FLAGS) $(LIBS) -o $@ .PHONY: clean clean: