From e2f1008b7fa43a95d490fa2833146639541cfa98 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 11 Apr 2024 13:31:32 -0700 Subject: [PATCH] Update make for SUNDIALS --- ExampleCodes/SUNDIALS/Exec/GNUmakefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ExampleCodes/SUNDIALS/Exec/GNUmakefile b/ExampleCodes/SUNDIALS/Exec/GNUmakefile index 1d1bc5a2..bee147e2 100644 --- a/ExampleCodes/SUNDIALS/Exec/GNUmakefile +++ b/ExampleCodes/SUNDIALS/Exec/GNUmakefile @@ -26,12 +26,16 @@ DEFINES += -DAMREX_USE_SUNDIALS INCLUDE_LOCATIONS += $(SUNDIALS_ROOT)/include LIBRARY_LOCATIONS += $(SUNDIALS_LIB_DIR) -LIBRARIES += -L$(SUNDIALS_LIB_DIR) -lsundials_cvode -LIBRARIES += -L$(SUNDIALS_LIB_DIR) -lsundials_arkode -LIBRARIES += -L$(SUNDIALS_LIB_DIR) -lsundials_nvecmanyvector +LIBRARIES += -lsundials_cvode +LIBRARIES += -lsundials_arkode +LIBRARIES += -lsundials_nvecmanyvector + +ifneq (,$(wildcard $(SUNDIALS_LIB_DIR)/libsundials_core*)) + LIBRARIES += -L$(SUNDIALS_LIB_DIR) -lsundials_core +endif ifeq ($(USE_CUDA),TRUE) -LIBRARIES += -L$(SUNDIALS_LIB_DIR) -lsundials_nveccuda + LIBRARIES += -lsundials_nveccuda endif endif