1CUDA_PATH := /opt/cuda 2 3NVCC := $(CUDA_PATH)/bin/nvcc 4 5CPPFLAGS := -O2 -std=c++11 6LDFLAGS := -g -L/usr/local/lib 7INCLUDES := -I/usr/local/include -I$(CUDA_PATH)/include 8LIBRARIES := -lboost_fiber -lboost_context -lboost_system -lboost_filesystem 9 10all: build 11 12build: single_stream multiple_streams 13 14single_stream.o:single_stream.cu 15 $(NVCC) $(INCLUDES) $(CPPFLAGS) -o $@ -c $< 16 17single_stream: single_stream.o 18 $(NVCC) $(LDFLAGS) -o $@ $+ $(LIBRARIES) 19 20multiple_streams.o:multiple_streams.cu 21 $(NVCC) $(INCLUDES) $(CPPFLAGS) -o $@ -c $< 22 23multiple_streams: multiple_streams.o 24 $(NVCC) $(LDFLAGS) -o $@ $+ $(LIBRARIES) 25 26clean: 27 rm -f single_stream single_stream.o multiple_streams multiple_streams.o 28 29clobber: clean 30