make gpr update

This commit is contained in:
awe
2026-09-21 13:39:04 +03:00
parent f0ad4e6185
commit 243963063c
22 changed files with 5161 additions and 30 deletions
+19 -9
View File
@@ -8,15 +8,17 @@ VISA_LDFLAGS := $(LDFLAGS) -lvisa
BUILD_DIR := build
BIN_DIR := $(BUILD_DIR)/bin
# --- gpr_cpp: external C++/CUDA 3D SAR library (VNA_AlGo). Build it first with
# `bash $(GPR_CPP_DIR)/build_cmake.sh`; it is NOT built by this Makefile. CUDA
# headers and libnvrtc come from the pip nvidia-* packages inside the VNA_AlGo
# venv (same detection as build_cmake.sh); when those are absent (e.g. Jetson,
# where CUDA comes with JetPack) the system toolkit at /usr/local/cuda is used.
# libcuda is always the system driver.
GPR_CPP_DIR ?= $(HOME)/Documents/VNA_AlGo/gpr_cpp
# --- gpr_cpp: vendored C++/CUDA 3D SAR library (originally from VNA_AlGo).
# Built automatically by the $(GPR_CPP_LIB) rule below via its own CMake
# (build_cmake.sh). CUDA headers and libnvrtc come from the pip nvidia-*
# packages inside this repo's venv (same detection as build_cmake.sh); when
# those are absent (e.g. Jetson, where CUDA comes with JetPack) the system
# toolkit at /usr/local/cuda is used. libcuda is always the system driver.
GPR_CPP_DIR ?= data_acq_and_processing/gpr_cpp
GPR_CPP_LIB ?= $(GPR_CPP_DIR)/build/libgpr_core_cpp.a
GPR_VENV ?= $(GPR_CPP_DIR)/../.venv
# Absolute so the derived -rpath (libnvrtc dir) survives running the binary
# from outside the repo root.
GPR_VENV ?= $(CURDIR)/.venv
GPR_CUDA_INC_DIR ?= $(dir $(firstword $(wildcard $(GPR_VENV)/lib/python*/site-packages/nvidia/*/include/nvrtc.h)))
# cuda.h can live in a DIFFERENT pip package than nvrtc.h (Jetson: cuda_runtime
# vs cuda_nvrtc); the unified cu13 package on dev machines has both in one dir.
@@ -181,6 +183,14 @@ $(BIN_DIR)/data_processor: $(DATA_PROCESSOR_OBJS) $(GPR_CPP_LIB)
@mkdir -p $(BIN_DIR)
$(CXX) $(DATA_PROCESSOR_OBJS) -o $@ $(DATA_PROCESSOR_LDFLAGS)
# Vendored gpr_cpp static lib: delegate to its CMake build (also produces the
# standalone_bp example used by sar3d_parity cross-checks).
GPR_CPP_SRC_FILES := $(wildcard $(GPR_CPP_DIR)/src/*) $(wildcard $(GPR_CPP_DIR)/include/gpr/*) \
$(wildcard $(GPR_CPP_DIR)/examples/*) $(GPR_CPP_DIR)/CMakeLists.txt $(GPR_CPP_DIR)/build_cmake.sh
$(GPR_CPP_LIB): $(GPR_CPP_SRC_FILES)
GPR_BUILD_PYTHON=OFF VENV=$(abspath $(GPR_VENV)) bash $(GPR_CPP_DIR)/build_cmake.sh
# The collector compiles into its own build/kamil/ tree with collector-only
# includes (no VISA), so the shared driver/config sources it reuses never collide
# with the orchestrator's objects of the same name. Basenames are unique, so a
@@ -202,4 +212,4 @@ $(BUILD_DIR)/%.o: %.cpp
-include $(DEPFILES)
clean:
rm -rf $(BUILD_DIR)
rm -rf $(BUILD_DIR) $(GPR_CPP_DIR)/build