From 3709f146170d7d052d274daa3a4d8f677f964bea Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Wed, 22 Feb 2023 14:09:58 +0100 Subject: [PATCH] Fix Makefile dependencies Device-side build artifacts need to be generated before compilation of the host side starts. Before the patch, the Makefile rules failed to meet that requirement, and things only worked when running make with a single job, i.e. with -j1. This patch tweaks the Makefile rules so that make is aware of the fact that the host side should only be compiled after the device side. --- Makefile.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.build b/Makefile.build index 39bdee7..c4eeab0 100644 --- a/Makefile.build +++ b/Makefile.build @@ -5,9 +5,9 @@ include $(SELF_DIR)Makefile.env CUDA_HOST=x86_64-linux -gnatcuda: device host +gnatcuda: host -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" ; \