mirror of
https://github.com/AdaCore/cuda.git
synced 2026-02-12 13:05:54 -08:00
Includes also clarifications for using the CUDA_ROOT in the installation documentation. Solves eng/toolchain/cuda#34
23 lines
633 B
Makefile
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
|