Skip to content
Snippets Groups Projects
Commit 08393572 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 68786f38
No related branches found
No related tags found
No related merge requests found
...@@ -36,17 +36,13 @@ GMSH_EMBEDDED = ${GMSH_API} Geo/discrete*.cpp\ ...@@ -36,17 +36,13 @@ GMSH_EMBEDDED = ${GMSH_API} Geo/discrete*.cpp\
Numeric/NumericEmbedded.{cpp,h} Numeric/FunctionSpace.{cpp,h}\ Numeric/NumericEmbedded.{cpp,h} Numeric/FunctionSpace.{cpp,h}\
utils/embed/GmshEmbedded.{cpp,h} utils/embed/Makefile utils/embed/GmshEmbedded.{cpp,h} utils/embed/Makefile
# Main building rules
all: link all: link
link: compile link: compile
${LINKER} ${OPTIM} ${DASH}o bin/gmsh${EXEEXT} ${GMSH_LIBS} ${LINKER} ${OPTIM} ${DASH}o bin/gmsh${EXEEXT} ${GMSH_LIBS}
link-mac-universal: compile
${LINKER} -arch i386 ${OPTIM} -o bin/gmsh_i386 ${GMSH_LIBS}
${LINKER} -arch ppc ${OPTIM} -o bin/gmsh_ppc ${GMSH_LIBS}
lipo -create bin/gmsh_i386 bin/gmsh_ppc -output bin/gmsh
rm -f bin/gmsh_i386 bin/gmsh_ppc
compile: variables initialtag compile: variables initialtag
@for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE}); done @for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE}); done
...@@ -61,12 +57,7 @@ uninstall: ...@@ -61,12 +57,7 @@ uninstall:
rm -f ${bindir}/gmsh${EXEEXT} rm -f ${bindir}/gmsh${EXEEXT}
rm -f ${mandir}/man1/gmsh.1 rm -f ${mandir}/man1/gmsh.1
install-mac: variables package-mac # Rules to build the Gmsh library
cp -rf gmsh-${GMSH_VERSION}/Gmsh.app /Applications
rm -rf gmsh-${GMSH_VERSION} gmsh-${GMSH_VERSION}-MacOSX.tgz
uninstall-mac:
rm -rf /Applications/Gmsh.app
.PHONY: lib .PHONY: lib
lib: variables initialtag lib: variables initialtag
...@@ -86,6 +77,27 @@ uninstall-lib: ...@@ -86,6 +77,27 @@ uninstall-lib:
rm -rf ${includedir}/gmsh rm -rf ${includedir}/gmsh
rm -rf ${libdir}/libGmsh${LIBSUFFIX}${LIBEXT} rm -rf ${libdir}/libGmsh${LIBSUFFIX}${LIBEXT}
embed:
@if [ -r ../getdp/contrib/gmsh/Makefile ]; then \
rsync -av ${GMSH_EMBEDDED} ../getdp/contrib/gmsh;\
rm -f ../getdp/contrib/gmsh/Message.h;\
fi
# Macintosh-specific rules
link-mac-universal: compile
${LINKER} -arch i386 ${OPTIM} -o bin/gmsh_i386 ${GMSH_LIBS}
${LINKER} -arch ppc ${OPTIM} -o bin/gmsh_ppc ${GMSH_LIBS}
lipo -create bin/gmsh_i386 bin/gmsh_ppc -output bin/gmsh
rm -f bin/gmsh_i386 bin/gmsh_ppc
install-mac: variables package-mac
cp -rf gmsh-${GMSH_VERSION}/Gmsh.app /Applications
rm -rf gmsh-${GMSH_VERSION} gmsh-${GMSH_VERSION}-MacOSX.tgz
uninstall-mac:
rm -rf /Applications/Gmsh.app
framework: lib framework: lib
rm -rf Gmsh.framework rm -rf Gmsh.framework
mkdir -p Gmsh.framework mkdir -p Gmsh.framework
...@@ -102,11 +114,23 @@ framework: lib ...@@ -102,11 +114,23 @@ framework: lib
cd Gmsh.framework && ln -s Versions/Current/Headers cd Gmsh.framework && ln -s Versions/Current/Headers
cd Gmsh.framework && ln -s Versions/Current/Resources cd Gmsh.framework && ln -s Versions/Current/Resources
embed: # Windows specific rules that will work in a DOS command window
@if [ -r ../getdp/contrib/gmsh/Makefile ]; then \ # without any unix-type shell (only gmake.exe needs to be present)
rsync -av ${GMSH_EMBEDDED} ../getdp/contrib/gmsh;\
rm -f ../getdp/contrib/gmsh/Message.h;\ dos: tag
fi for %%i in (${GMSH_DIRS}) do gmake -C %%i
${LINKER} ${OPTIM} ${DASH}o bin/gmsh${EXEEXT} ${GMSH_LIBS}
dos-lib: tag
for %%i in (${GMSH_DIRS}); do gmake -C %%i cpobj
${AR} ${ARFLAGS}lib/libGmsh${LIBEXT} lib/*${OBJEXT}
erase lib\*${OBJEXT}
dos-clean:
for %%i in (doc lib ${GMSH_DIRS}) do gmake -C clean
erase Common\GmshVersion.h
# Utilities
variables: configure variables: configure
@echo "********************************************************************" @echo "********************************************************************"
...@@ -165,7 +189,6 @@ nodepend: ...@@ -165,7 +189,6 @@ nodepend:
done done
tag: tag:
rm -f ${GMSH_VERSION_FILE}
echo "#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION}" > ${GMSH_VERSION_FILE} echo "#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION}" > ${GMSH_VERSION_FILE}
echo "#define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION}" >> ${GMSH_VERSION_FILE} echo "#define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION}" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION}" >> ${GMSH_VERSION_FILE} echo "#define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION}" >> ${GMSH_VERSION_FILE}
......
How to build OpenCascade 6.2 (OCC) for Gmsh: How to build OpenCascade 6.3 (OCC) for Gmsh:
- Get the linux (source) distribution of OCC and unpack it. In the - Get the source distribution of OCC and unpack it (you only need the
following <OpenCascade dir> refers to the directory where OCC is "ros" subdirectory). In the following <OpenCascade dir> refers to
installed (e.g ~/OpenCascade) the directory where OCC is installed (e.g ~/OpenCASCADE6.3.0)
- OS/compiler specific stuff: - OS/compiler specific stuff:
* On Cygwin/Mingw32 (Windows) define * On Windows/MinGW define
export CC="gcc -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL" export CC="gcc -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
export CXX="g++ -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL" export CXX="g++ -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
* With new versions of gcc, add "-ffriend-injection -fpermissive" (With cygwin add "-mno-cygwin")
to the compiler options (this prevents the
"Standard_Transient_Type_ not declared" error), i.e., define You'll also need to fix a few things in the source code as you
go, depending on the version MinGW and of the bundled g++:
- remove all pthread tests in ./configure
- replace all refs to #include <limits> with #include <limits.h> in
<OpenCascade dir>/ros/inc/Standard_values.h
- fix "delete RefToCurrentTMSKrnl;" & co calls in OSD_Chronometer.cxx
- remove STATUS_FLOAT_MULTIPLE_TRAPS & co switch cases in
OSD_Signal_Wnt.cxx
- add explicit (void*) cast in Standard_MMgrOpt.cxx
* With new versions of gcc, you might have to add
"-ffriend-injection -fpermissive" to the compiler options (this
prevents the "Standard_Transient_Type_ not declared" error),
i.e., define
export CXXFLAGS="${CXXFLAGS} -ffriend-injection -fpermissive" export CXXFLAGS="${CXXFLAGS} -ffriend-injection -fpermissive"
...@@ -36,13 +50,13 @@ How to build OpenCascade 6.2 (OCC) for Gmsh: ...@@ -36,13 +50,13 @@ How to build OpenCascade 6.2 (OCC) for Gmsh:
lipo -create libi386.a libppc.a -output libuniversal.a lipo -create libi386.a libppc.a -output libuniversal.a
- Go to the <OpenCascade dir>/Linux/ros directory and type - Go to the <OpenCascade dir>/ros directory and type
./configure --prefix=/usr/local/opencascade --enable-debug=no ./configure --prefix=/usr/local/opencascade --enable-debug=no
--enable-production=yes --enable-static=yes --enable-shared=no --enable-production=yes --enable-static=yes --enable-shared=no
--disable-dependency-tracking --disable-dependency-tracking
- Then go to the <OpenCascade dir>/Linux/ros/adm/make/ directory and - Then go to the <OpenCascade dir>/ros/adm/make/ directory and
run "make" in the following subdirectories, e.g. by running the run "make" in the following subdirectories, e.g. by running the
following bash script: following bash script:
...@@ -69,7 +83,7 @@ How to build OpenCascade 6.2 (OCC) for Gmsh: ...@@ -69,7 +83,7 @@ How to build OpenCascade 6.2 (OCC) for Gmsh:
cd $lib && make install; cd ..; cd $lib && make install; cd ..;
done done
and copy config.h and the <OpenCascade dir>/Linux/ros/inc/ subdirectory and copy config.h and the <OpenCascade dir>/ros/inc/ subdirectory
to /usr/local/opencascade (This is the same as a doing a partial to /usr/local/opencascade (This is the same as a doing a partial
'make install') 'make install')
......
...@@ -60,8 +60,8 @@ Gmsh's capabilities</a>. ...@@ -60,8 +60,8 @@ Gmsh's capabilities</a>.
Gmsh is distributed under the terms of Gmsh is distributed under the terms of
the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public
License (GPL)</a>. Pre-compiled binaries<a href="#opengl-footnote" License (GPL)</a>. Pre-compiled binaries<a href="#opengl-footnote"
name="opengl-footmark"><sup>1</sup></a> are available for Windows name="opengl-footmark"><sup>1</sup></a> are available for Windows (XP
(2000, XP), Linux (Intel, glibc 2.3) and Mac OS X (10.4, Universal &amp; Vista), Linux (Intel, glibc 2.3) and Mac OS X (10.5, Universal
binary). Tutorial and demos files are included in all the archives. binary). Tutorial and demos files are included in all the archives.
<ul> <ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment