Skip to content

Commit 229ef74

Browse files
authored
Update Makefile for Non-CUDA Installs (#481)
Users installing Curio for PDP-only operations do not need to have CUDA libraries installed. Running `sudo make install` without CUDA libraries installed results in the following error: ``` dirname: missing operand Try 'dirname --help' for more information. dirname: missing operand Try 'dirname --help' for more information. install -C ./curio /usr/local/bin/curio install -C ./sptool /usr/local/bin/sptool ``` Tested with `curio version 1.25.0+mainnet+git_90cd136_2025-04-14T12:54:07-04:00`
1 parent 11b719e commit 229ef74

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ build/.update-modules:
6767
# Conditional execution block for Linux
6868
OS := $(shell uname)
6969
ifeq ($(OS), Linux)
70-
$(eval CUDA_PATH := $(shell dirname $$(dirname $$(which nvcc))))
71-
$(eval CUDA_LIB_PATH := $(CUDA_PATH)/lib64)
72-
export LIBRARY_PATH := $(LIBRARY_PATH):$(CUDA_LIB_PATH)
70+
NVCC_PATH := $(shell which nvcc 2>/dev/null)
71+
ifneq ($(NVCC_PATH),)
72+
$(eval CUDA_PATH := $(shell dirname $$(dirname $$(which nvcc))))
73+
$(eval CUDA_LIB_PATH := $(CUDA_PATH)/lib64)
74+
export LIBRARY_PATH := $(LIBRARY_PATH):$(CUDA_LIB_PATH)
75+
endif
7376
endif
7477

7578
## MAIN BINARIES

0 commit comments

Comments
 (0)