]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/linuxbuild/linuxdebugbuild.sh
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / linuxbuild / linuxdebugbuild.sh
1 #!/bin/bash
2
3 CPPFLAGS="-fPIC -ggdb -std=c++11 -Wall -pedantic -Wno-switch -Wno-unused-function -Iinclude -Iinclude/linux -I../FMILibrary/src/Util/include -I../FMILibrary/src/ZIP/include -I../FMILibrary/src/Import/include -I../FMILibrary/ThirdParty/FMI/default"
4 LDFLAGS="-L/builds/fmildebug/ -lfmilib_shared"
5
6 # Stop on first non-zero return value
7 set -e
8
9 rm -rf obj
10 mkdir obj
11 g++ ${CPPFLAGS} -o obj/fmi_util.o -c src/fmi_util.c
12 g++ ${CPPFLAGS} -o obj/fmu_control.o -c src/fmu_control.cpp
13 g++ ${CPPFLAGS} -o obj/sim_support.o -c src/sim_support.c
14 g++ ${CPPFLAGS} -o obj/stack.o -c src/stack.c
15
16 g++ -ggdb -shared -Wl,-soname,libFMUSimulatorDebug.so -o libFMUSimulatorDebug.so obj/fmi_util.o obj/fmu_control.o obj/sim_support.o obj/stack.o ${LDFLAGS}
17
18 patchelf --add-needed libfmilib_shared.so libFMUSimulatorDebug.so
19 patchelf --set-rpath \$ORIGIN libFMUSimulatorDebug.so