Skip to content

Commit

Permalink
Allow static linking
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19370 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 2, 2014
1 parent 161a319 commit b03eee1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Compiler/boot/Makefile.common
Expand Up @@ -96,16 +96,16 @@ $(GEN_DIR)libOpenModelicaCompiler$(SHREXT): $(ALL_OBJECTS)

ifeq ($(STATIC),)

$(GEN_DIR)omc$(EXE_EXT): $(GEN_DIR)libOpenModelicaCompiler$(SHREXT) $(GEN_DIR)_main.o
$(CC) $(GEN_DIR)_main.o $(RPATH) $(CFLAGS) $(CPPFLAGS) -o $@ -L./ $(LDFLAGS) -lOpenModelicaCompiler
$(GEN_DIR)omc$(EXE_EXT): $(ALL_OBJECTS) $(GEN_DIR)_main.o
$(CC) $(GEN_DIR)_main.o $(RPATH) $(CFLAGS) $(CPPFLAGS) -o $@ $(ALL_OBJECTS) $(LDFLAGS)
install: $(GEN_DIR)omc$(EXE_EXT) $(GEN_DIR)libOpenModelicaCompiler$(SHREXT)
cp -a $(GEN_DIR)omc$(EXE_EXT) $(OMHOME)/bin/
cp -a $(GEN_DIR)libOpenModelicaCompiler$(SHREXT) $(OMHOME)/lib/omc/

else

$(GEN_DIR)omc$(EXE_EXT): $(ALL_OBJECTS) $(GEN_DIR)_main.o
$(CC) $(GEN_DIR)_main.o $(RPATH) $(CFLAGS) $(CPPFLAGS) -o $@ -L./ $(LDFLAGS) $(ALL_OBJECTS) -lOpenModelicaCompiler
$(GEN_DIR)omc$(EXE_EXT): $(GEN_DIR)libOpenModelicaCompiler$(SHREXT) $(GEN_DIR)_main.o
$(CC) $(GEN_DIR)_main.o $(RPATH) $(CFLAGS) $(CPPFLAGS) -o $@ $(LDFLAGS) $(ALL_OBJECTS) -lOpenModelicaCompiler
install: $(GEN_DIR)omc$(EXE_EXT)
cp -a $< $(OMHOME)/bin/

Expand Down
2 changes: 1 addition & 1 deletion Compiler/boot/Makefile.in
Expand Up @@ -12,10 +12,10 @@ FMILIB = -L$(TOP_DIR)/3rdParty/FMIL/install/lib -lfmilib
CPPFLAGS=-I"$(OMHOME)/include/omc/c" @CPPFLAGS@ -DADD_METARECORD_DEFINITIONS=
CORBALIBS=@CORBALIBS@
ULIMIT_CMD=true
BOOTSTRAP_TARGET=@BOOTSTRAP_TARGET@
SHREXT=@SHREXT@
OMC=@OMC@
RPATH=@RPATH@
STATIC=@BOOTSTRAP_STATIC@

default: all

Expand Down
8 changes: 4 additions & 4 deletions configure.in
Expand Up @@ -82,7 +82,7 @@ AC_SUBST(LDFLAGS_SOCKET)
AC_SUBST(APP)
AC_SUBST(OMC)
AC_SUBST(OMCTARGET)
AC_SUBST(BOOTSTRAP_TARGET)
AC_SUBST(BOOTSTRAP_STATIC)

FINAL_MESSAGES="\nConfigured OpenModelica successfully using the following options:"

Expand Down Expand Up @@ -806,7 +806,7 @@ if test "Darwin" = `uname`; then
OS_TARGET="osx"
LIS_LDFLAGS="-Wl,-install_name,@rpath/liblis.dylib"
AR_SH="sh -x ar.sh"
BOOTSTRAP_TARGET="main-static"
BOOTSTRAP_STATIC="static"
elif test "$host" = "i586-pc-mingw32msvc"; then
APP=".exe"
EXE=".exe"
Expand All @@ -828,7 +828,7 @@ elif test "$host" = "i586-pc-mingw32msvc"; then
AR_SH="$AR -ru"
CPPFLAGS_F2C=" -DUSE_CLOCK"
LDFLAGS_SOCKET=" -lwsock32"
BOOTSTRAP_TARGET="main-static"
BOOTSTRAP_STATIC="static"
else
APP=""
EXE=""
Expand All @@ -850,7 +850,7 @@ else
RPATH="-Wl,-z,origin -Wl,-rpath,'\$\$ORIGIN/../lib/omc'"
OS_TARGET="linux"
AR_SH="$AR -ru"
BOOTSTRAP_TARGET="main-shared"
BOOTSTRAP_STATIC=""
fi

AC_ARG_WITH(MODPAR, [ --with-MODPAR Compile with automatic parallelization, requires boost],
Expand Down

0 comments on commit b03eee1

Please sign in to comment.