diff --git a/Makefile b/Makefile index 468fb98..911eb8e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,13 @@ -all: - icpc ocl-stream.cpp -framework OpenCL +LIBS = -l OpenCL + +PLATFORM = $(shell uname -s) +ifeq ($(PLATFORM), Darwin) + LIBS = -framework OpenCL +endif + +gpu-stream-ocl: ocl-stream.cpp + c++ $< -std=c++11 -o $@ $(LIBS) + +clean: + rm -f gpu-stream-ocl