From bd68a69a55783fe7985910fe0e3e359de7102e3c Mon Sep 17 00:00:00 2001 From: FlorealRISSO <floreal.risso@univ-tlse3.fr> Date: Mon, 20 Mar 2023 11:36:10 +0100 Subject: [PATCH] auto configure nvml --- configure.sh | 5 +++-- makefile | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.sh b/configure.sh index 207cf07..ebf6881 100755 --- a/configure.sh +++ b/configure.sh @@ -191,8 +191,9 @@ fi try gen_sensors_h "$sensors" "$nb_sensors" >"$target_hdr" try gen_sensors_mk "$sensors" >"$target_mk" -try printf "LDFLAGS += %s\n" "$NVML_LDFLAGS" >>"$target_mk" -try printf "IFLAGS += %s\n" "$NVML_IFLAGS" >>"$target_mk" + +try printf "NVML_LDFLAGS = %s\n" "$NVML_LDFLAGS" >>"$target_mk" +try printf "NVML_IFLAGS = %s\n" "$NVML_IFLAGS" >>"$target_mk" printf -- 'Run `make` to build `bin/mojitos`.\n' >&2 printf -- 'The resulting binary will have the %d following sensors:\n' "$nb_sensors" >&2 diff --git a/makefile b/makefile index 1b636c4..8a3c129 100644 --- a/makefile +++ b/makefile @@ -9,8 +9,8 @@ TESTS_DIR = tests BIN = mojitos CAPTOR_OBJ = -IFLAGS = -LDFLAGS = +NVML_LDFLAGS = +NVML_IFLAGS = include ./sensors.mk @@ -19,9 +19,9 @@ OBJ = \ $(OBJ_DIR)/util.o CC = gcc -CPPFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Wno-unused-function -I./lib $(IFLAGS) +CPPFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Wno-unused-function -I./lib $(NVML_IFLAGS) CFLAGS = $(CPPFLAGS) -O3 -Werror -LDFLAGS += +LDFLAGS = $(NVML_LDFLAGS) ASTYLE = astyle --style=kr -xf -s4 -k3 -n -Z -Q -- GitLab