# # sample Makefile for gcc with OpenCL (AMD implementation) # # usage example: # "make hello" to compile "hello.c" to "hello" # # note that you must first set up to include AMD files # (command "module load amdapp") # CSTD=-std=c99 # uncomment if using more-recent gcc #CSTD=-std=c11 EXTRAS = # can be used to add additional user-specified options, e.g. -fopenmp OPT = -O3 CC = gcc OPENCL_CFLAGS = -DAMD_OS_LINUX -I$(AMDAPPSDKROOT)/include CFLAGS = $(OPT) $(CSTD) -Wall -pedantic $(OPENCL_CFLAGS) $(EXTRAS) OPENCL_LDFLAGS = -lOpenCL -L$(AMDAPPSDKROOT)/lib/x86_64 LDFLAGS = $(OPENCL_LDFLAGS) -lm