mirror of
https://github.com/AdaCore/cuda.git
synced 2026-02-12 13:05:54 -08:00
Building cuda-gcc does not require a CUDA installation. This patch extracts the generation of cuda-gcc to a separate Makefile that does not check for a CUDA installation like the main Makefile does. TN: W220-014
23 lines
653 B
Plaintext
23 lines
653 B
Plaintext
local_llvm := $(shell which llvm-gcc)
|
|
ifeq (, $(local_llvm))
|
|
$(error "No llvm-gcc in PATH")
|
|
endif
|
|
$(info "LLVM's GCC : $(local_llvm)")
|
|
|
|
llvm_dir := $(shell dirname $(dir $(local_llvm)))
|
|
ifeq (, $(llvm_dir))
|
|
$(error "Could not locate LLVM's directory")
|
|
endif
|
|
$(info "LLVM directory: $(llvm_dir)")
|
|
|
|
.PHONY: wrapper
|
|
|
|
wrapper:
|
|
@echo "======================= INSTALL SETUP"
|
|
mkdir -p install/bin
|
|
@echo "======================= WRAPPER BUILDING"
|
|
gprbuild -p -P wrapper/wrapper.gpr
|
|
cp wrapper/obj/gnatcuda_wrapper install/bin/cuda-gcc
|
|
cp install/bin/cuda-gcc $(llvm_dir)/bin/cuda-gcc
|
|
cp $(llvm_dir)/bin/llvm-gnatbind $(llvm_dir)/bin/cuda-gnatbind
|