From ec61a179713059a79e905b16e9c0057aa325e454 Mon Sep 17 00:00:00 2001
From: Cristian Galperti <cristian.galperti@epfl.ch>
Date: Fri, 26 Jul 2019 10:28:06 +0200
Subject: [PATCH] main .tmf with DMmagctrl .so linkage inserted

---
 test/simulink_codegen_tests/ert_unix.tmf | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/simulink_codegen_tests/ert_unix.tmf b/test/simulink_codegen_tests/ert_unix.tmf
index 3595936..2848cbd 100644
--- a/test/simulink_codegen_tests/ert_unix.tmf
+++ b/test/simulink_codegen_tests/ert_unix.tmf
@@ -303,6 +303,13 @@ ifeq ($(SFCN),0)
 SYSLIBS += -lm
 endif
 
+# Additional .so for compiling DM controllers, RTWINCLUDEAOT has
+# to be set before building, e.g. setenv('RTWINCLUDEAOT','1') from
+# the compiling matlab session
+ifeq ($(RTWINCLUDEAOT),1)
+SYSLIBS += -lexport_aot_model_linux
+endif
+
 LIBS =
 |>START_PRECOMP_LIBRARIES<|
 ifeq ($(OPT_OPTS),$(DEFAULT_OPT_OPTS))
-- 
GitLab