Files
cuda/Makefile.build
2022-11-15 15:02:13 -05:00

17 lines
559 B
Makefile

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
SELF_DIR := $(dir $(mkfile_path))
include $(SELF_DIR)Makefile.env
CUDA_HOST=x86_64-linux
gnatcuda: device host
host:
# 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 -Xcuda_host=$(CUDA_HOST) -P host -largs $(CURDIR)/lib/*.fatbin.o
device:
gprbuild -Xcuda_host=$(CUDA_HOST) -P device