From a1418db164af92d350234dfe6846884562c9e227 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Wed, 25 Oct 2023 09:50:48 -0400 Subject: Allow custom nvcc location when running make + ignore gdb history To specify a custom path to nvcc when building: `make NVCC=/my/path/to/nvcc` --- .gitignore | 1 + Makefile | 5 +++-- copy_experiments/Makefile | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e589da8..b0d597a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +**/.gdb_history preemption_logger constant_cycles_kernel copy_experiments/copy_contender diff --git a/Makefile b/Makefile index 9f6da4d..688d73d 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ .PHONY: all copy_experiments clean +NVCC ?= nvcc all: constant_cycles_kernel preemption_logger copy_experiments constant_cycles_kernel: constant_cycles_kernel.cu testbench.h - nvcc constant_cycles_kernel.cu -o constant_cycles_kernel + $(NVCC) constant_cycles_kernel.cu -o constant_cycles_kernel preemption_logger: task_host_utilities.cu preemption_logger.cu testbench.h - nvcc preemption_logger.cu -o preemption_logger -g + $(NVCC) preemption_logger.cu -o preemption_logger -g copy_experiments: $(MAKE) -C $@ diff --git a/copy_experiments/Makefile b/copy_experiments/Makefile index b2d55c2..ede22dc 100644 --- a/copy_experiments/Makefile +++ b/copy_experiments/Makefile @@ -1,12 +1,13 @@ .PHONY: all clean +NVCC ?= nvcc all: copy_contender mon_cross_ctx_copies copy_contender: copy_contender.cu copy_testbench.h ../testbench.h - /usr/local/cuda/bin/nvcc copy_contender.cu -o $@ -lcuda -g + $(NVCC) copy_contender.cu -o $@ -lcuda -g mon_cross_ctx_copies: mon_cross_ctx_copies.cu copy_testbench.h ../testbench.h - /usr/local/cuda/bin/nvcc mon_cross_ctx_copies.cu -o $@ -lcuda -lpthread -g + $(NVCC) mon_cross_ctx_copies.cu -o $@ -lcuda -lpthread -g clean: rm -f copy_contender mon_cross_ctx_copies -- cgit v1.2.2