From c8e35d1307145d76c6e4b30c6a0b5c20f37b23d2 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Thu, 16 Jul 2015 12:30:30 +0100 Subject: [PATCH] Update Makefile with better rules and a clean option --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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