Skip to content

Commit

Permalink
Use __APPLE__ instead of -DAPPLE
Browse files Browse the repository at this point in the history
Modified all the exercises - solutions were already done.
  • Loading branch information
simonmcs committed Sep 12, 2013
1 parent f6a000d commit 10ce653
Show file tree
Hide file tree
Showing 19 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Exercises/C_common/device_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
Expand Down
2 changes: 1 addition & 1 deletion Exercises/C_common/err_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Cpp_common/err_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise01/C/DeviceInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdlib.h>

#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <unistd.h>
#else
Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise01/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ COMMON_DIR = ../../C_common
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CCFLAGS += -DAPPLE
LIBS = -framework OpenCL
endif

Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise01/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LIBS = -lOpenCL
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
LIBS = -framework OpenCL
endif

Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise02/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ endif
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CCFLAGS += -DAPPLE
LIBS = -framework OpenCL -fopenmp
endif

Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise02/C/vadd_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <unistd.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise03/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
CCFLAGS += -stdlib=libc++
LIBS = -framework OpenCL
endif

Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise04/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ endif
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CCFLAGS += -DAPPLE
LIBS = -framework OpenCL -fopenmp
endif

Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise04/C/vadd_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <unistd.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise04/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
CCFLAGS += -stdlib=libc++
LIBS = -framework OpenCL
endif

Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise05/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ endif
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CCFLAGS += -DAPPLE
LIBS = -framework OpenCL -fopenmp
endif

Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise05/C/vadd_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <unistd.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise05/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
CCFLAGS += -stdlib=libc++
LIBS = -framework OpenCL
endif

Expand Down
1 change: 0 additions & 1 deletion Exercises/Exercise06/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ CCFLAGS += -D DEVICE=$(DEVICE)
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CCFLAGS += -DAPPLE
LIBS = -lm -framework OpenCL -fopenmp
endif

Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise06/C/matmul.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdlib.h>
#include <math.h>

#ifdef APPLE
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <unistd.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise06/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
CCFLAGS += -stdlib=libc++
LIBS = -lm -framework OpenCL
endif

Expand Down
2 changes: 1 addition & 1 deletion Exercises/Exercise09/Cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ INC = -I $(CPP_COMMON)
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -DAPPLE -stdlib=libc++
CCFLAGS += -stdlib=libc++
endif

pi: pi.cpp
Expand Down

0 comments on commit 10ce653

Please sign in to comment.