From 76ce880bef54d80cfd5a55817b203616f50de823 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 20 Jul 2022 19:36:25 +0200 Subject: configure: add --with-sundials (preliminary work) --- src/grt/Makefile.inc | 12 ++++++++++++ src/grt/grt-no_sundials_c.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/grt/grt-no_sundials_c.c (limited to 'src/grt') diff --git a/src/grt/Makefile.inc b/src/grt/Makefile.inc index 71c202e11..c8e0d9f06 100644 --- a/src/grt/Makefile.inc +++ b/src/grt/Makefile.inc @@ -110,6 +110,12 @@ ifeq ($(GRT_USE_PTHREADS),y) GRT_EXTRA_LIB+=-lpthread endif +ifeq ($(with_sundials),true) + GRT_ADD_OBJS+=grt-sundials_c.o +else + GRT_ADD_OBJS+=grt-no_sundials_c.o +endif + GRT_LIBBACKTRACE= ifneq ($(LIBBACKTRACE),) GRT_LIBBACKTRACE=libbacktrace.a @@ -217,6 +223,12 @@ pic/grt-cdynload.o: $(GRTSRCDIR)/grt-cdynload.c grt-cthreads.o: $(GRTSRCDIR)/grt-cthreads.c $(GRT_C_COMPILE) +grt-sundials_c.o: $(GRTSRCDIR)/grt-sundials_c.c + $(GRT_C_COMPILE) $(sundials_incflags) + +grt-no_sundials_c.o: $(GRTSRCDIR)/grt-no_sundials_c.c + $(GRT_C_COMPILE) + fstapi.o: $(GRTSRCDIR)/fst/fstapi.c $(GRT_C_COMPILE) -I$(GRTSRCDIR)/fst diff --git a/src/grt/grt-no_sundials_c.c b/src/grt/grt-no_sundials_c.c new file mode 100644 index 000000000..87e7bb7a5 --- /dev/null +++ b/src/grt/grt-no_sundials_c.c @@ -0,0 +1,32 @@ +#include +typedef double realtype; + +realtype * +grt_sundials_get_yy_vec(void) +{ + return NULL; +} + +realtype * +grt_sundials_get_yp_vec(void) +{ + return NULL; +} + +int +grt_sundials_init(int sz) +{ + return -1; +} + +int +grt_sundials_start (void) +{ + return -1; +} + +int +grt_sundials_solve(realtype t0, realtype *tn, int *res) +{ + return 1; +} -- cgit v1.2.3