Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
125 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
all: omshell @OMSHELL_TERMINAL@ | ||
|
||
prefix = @prefix@ | ||
exec_prefix = @exec_prefix@ | ||
bindir = @bindir@ | ||
CMAKE=CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" cmake | ||
CMAKE_TARGET = "Unix Makefiles" | ||
|
||
ifeq (@APP@,) | ||
install: | ||
mkdir -p ${DESTDIR}/@bindir@ | ||
cp -a build/bin/OMShell@EXE@ ${DESTDIR}/@bindir@ | ||
else | ||
install: | ||
mkdir -p ${DESTDIR}/Applications/ | ||
cp -a build/Applications/OMShell@APP@ ${DESTDIR}/Applications/ | ||
endif | ||
mkdir -p ${DESTDIR}/lib/@host_short@/omc/ ${DESTDIR}/share/omedit/nls/ | ||
cp -a build/lib/@host_short@/omc/* ${DESTDIR}/lib/@host_short@/omc/ | ||
|
||
mkbuilddirs: | ||
mkdir -p @OMBUILDDIR@/bin @OMBUILDDIR@/lib/@host_short@/omc | ||
omshell: mkbuilddirs | ||
$(MAKE) -C OMShell/OMShellGUI -f Makefile.unix | ||
mosh: mkbuilddirs | ||
$(MAKE) -C mosh/src | ||
clean: | ||
$(MAKE) -C OMEdit/OMEditGUI -f Makefile.unix clean | ||
$(MAKE) -C mosh/src clean | ||
distclean: clean | ||
rm -f config.status configure Makefile OMShell/OMShellGUI/Makefile.unix | ||
Makefile: Makefile.in config.status | ||
./config.status | ||
config.status: configure | ||
./config.status -recheck | ||
configure: configure.ac common/m4/corba.m4 common/m4/omhome.m4 common/m4/qmake.m4 | ||
autoconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define CONFIG_DEFAULT_OPENMODELICAHOME "@OPENMODELICAHOME@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
dnl Process this file with autoconf to produce a configure script. | ||
|
||
AC_PREREQ([2.63]) | ||
AC_INIT([OMShell],[dev],[https://trac.openmodelica.org/OpenModelica],[openmodelica],[https://openmodelica.org]) | ||
|
||
AC_SUBST(APP) | ||
AC_SUBST(EXE) | ||
AC_SUBST(IDLCMD) | ||
AC_SUBST(RPATH_QMAKE) | ||
AC_SUBST(host_short) | ||
|
||
m4_include([common/m4/pre-commit.m4]) | ||
cp common/install-sh common/config.guess common/config.sub ./ | ||
m4_include([common/m4/ombuilddir.m4]) | ||
|
||
AC_CANONICAL_BUILD | ||
AC_CANONICAL_HOST | ||
AC_CANONICAL_TARGET | ||
|
||
dnl Checks for programs. | ||
|
||
AC_LANG([C++]) | ||
AC_PROG_CXX | ||
AC_PROG_CC | ||
|
||
host_short=$host_cpu-$host_os | ||
|
||
m4_include([common/m4/qmake.m4]) | ||
m4_include([common/m4/omhome.m4]) | ||
|
||
FIND_OPENMODELICAHOME() | ||
|
||
OMNIORB_DEFAULT=yes | ||
m4_include([common/m4/corba.m4]) | ||
|
||
if test -z "$USE_CORBA"; then | ||
AC_MSG_ERROR([OMOptim requires using the OMC CORBA interface. Configure using --with-omniORB.]) | ||
fi | ||
|
||
AC_SUBST(LIBREADLINE) | ||
AC_SUBST(OMSHELL_TERMINAL) | ||
AC_MSG_CHECKING([if the user wants to compile OMShell-terminal]) | ||
OMSHELL_TERMINAL="mosh" | ||
AC_ARG_ENABLE(omshell-terminal, [ --disable-omshell-terminal Disables compilation of OMShell-terminal (enabled by default)],[test | ||
"xno" = x"$enableval" && OMSHELL_TERMINAL=""]) | ||
if test -z "$OMSHELL_TERMINAL" ; then | ||
AC_MSG_RESULT([no]) | ||
else | ||
AC_MSG_RESULT([yes]) | ||
AC_CHECK_HEADER(readline/readline.h,,AC_MSG_ERROR([readline missing])) | ||
AC_CHECK_HEADER(readline/history.h,,AC_MSG_ERROR([readline missing])) | ||
|
||
AC_ARG_WITH(static-readline, [ --with-static-readline=DIR (default to dynamic linking; searches /usr if no other directory is provided)],[WANT_STATIC_READLINE="$withval"],[WANT_STATIC_READLINE="no"]) | ||
|
||
if test "$WANT_STATIC_READLINE" = "no"; then | ||
LIBS="" | ||
AC_SEARCH_LIBS(readline,readline,,[AC_MSG_ERROR([readline missing])]) | ||
LIBREADLINE=$LIBS | ||
LIBS="" | ||
else | ||
if test "$WANT_STATIC_READLINE" = "yes"; then | ||
READLINELIB=/usr/lib; | ||
else | ||
READLINELIB=$WANT_STATIC_READLINE/lib | ||
fi | ||
test -f $READLINELIB/*/libreadline.a && READLINELIB=`dirname $READLINELIB/*/libreadline.a` | ||
LIBS="-lncurses $READLINELIB/libreadline.a -ltermcap" | ||
AC_MSG_CHECKING([for static readline $LIBS]) | ||
AC_LINK_IFELSE([AC_LANG_CALL([], [rl_message])], [LIBREADLINE=$LIBS], [AC_MSG_ERROR([failed])]) | ||
AC_MSG_RESULT([ok]) | ||
LIBS="" | ||
fi | ||
fi | ||
|
||
AC_OUTPUT(Makefile OMShell/OMShellGUI/Makefile.unix OMShell/OMShellGUI/OMShell.config mosh/src/Makefile OMShell/OMShellGUI/omc_config.h) | ||
# AC_CONFIG_COMMANDS([Clean qmake stuff],[make clean]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters