#!/bin/sh # Build a co-simulation fmu-2.0 driver. # Usage: build_fmusim2 include="-DFMI_COSIMULATION" case "`uname -s`" in CYGWIN*) arch=win sharedLibrarySuffix=dll;; Darwin) arch=darwin sharedLibrarySuffix=dylib;; Linux) arch=linux pic=-fPIC sharedLibrarySuffix=so;; esac # Number of bits, default to 64 bits=64 case "`uname -m`" in *64) bits=64;; *32) bits=32;; *i[3-6]86) if [ "$arch" != "darwin" ]; then bits=32 fi ;; esac # Uncomment the next line to force building 32-bit #bits=32 # See also ../Makefile if [ $arch = linux -a $bits = 32 ]; then CBITSFLAGS=-m32 fi set -x make dirclean; \ make ARCH=${arch}${bits} CBITSFLAGS=${CBITSFLAGS} INCLUDE="${include}" PIC=${pic} SHARED_LIBRARY_SUFFIX=${sharedLibrarySuffix} fmusim2