Files
cuda/Makefile.build
Tonu Naks 8877dea9e6 Provide an option for cleaning old build
Includes also clarifications for using the CUDA_ROOT
in the installation documentation.

Solves eng/toolchain/cuda#34
2023-11-27 13:57:24 +00:00

23 lines
633 B
Makefile

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
SELF_DIR := $(dir $(mkfile_path))
include $(SELF_DIR)Makefile.env
gnatcuda: host
host: device
# gprbuild currently doesn't pass ADA_INCLUDE_PATH to gnatbind. We need to
# set that manually so that cuda.ads can be found
export ADA_INCLUDE_PATH="$(SELF_DIR)api/host/cuda_raw_binding:$(SELF_DIR)/api/host/cuda_api:$(SELF_DIR)api/cuda_internal" ; \
gprbuild -P host -largs $(CURDIR)/lib/*.fatbin.o
device:
gprbuild -P device
# Use double-colon to permit extensions to the rule
# when this file is included in another Makefile
clean::
rm -f main
rm -rf obj
rm -rf lib