Last change
on this file since 26034 was 26034, checked in by jdquinn, 4 years ago |
CHG: Modifications to build system and additional configurations in support of Windows 10 MSYS2 MinGW build
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[26034] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | # TODO
|
---|
| 6 | # - Move installation of GKlib to $PREFIX to Makefile instead of simply copying
|
---|
| 7 | # it
|
---|
| 8 | #
|
---|
| 9 |
|
---|
| 10 | ## Constants
|
---|
| 11 | #
|
---|
| 12 | VER=5.1.0
|
---|
| 13 |
|
---|
| 14 | PREFIX="${ISSM_DIR}/externalpackages/metis/install"
|
---|
| 15 |
|
---|
| 16 | # Cleanup
|
---|
| 17 | rm -rf ${PREFIX} src
|
---|
| 18 | mkdir ${PREFIX} src
|
---|
| 19 |
|
---|
| 20 | # Download source
|
---|
| 21 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/metis-${VER}.tar.gz" "metis-${VER}.tar.gz"
|
---|
| 22 |
|
---|
| 23 | # Unpack source
|
---|
| 24 | tar -zxvf metis-$VER.tar.gz
|
---|
| 25 |
|
---|
| 26 | # Move source into 'src' directory
|
---|
| 27 | mv metis-${VER}/* src
|
---|
| 28 | rm -rf metis-${VER}
|
---|
| 29 |
|
---|
| 30 | # Copy customized source and configuration files to 'src' directory
|
---|
| 31 | cp configs/5.1/win/msys2/Makefile src
|
---|
| 32 | cp configs/5.1/win/msys2/GKlib/gk_arch.h src/GKlib
|
---|
| 33 | cp configs/5.1/win/msys2/GKlib/gk_getopt.h src/GKlib
|
---|
| 34 |
|
---|
| 35 | # Configure
|
---|
| 36 | cd src
|
---|
| 37 | make config \
|
---|
| 38 | prefix=${PREFIX} \
|
---|
| 39 | shared=1 \
|
---|
| 40 | cc=/mingw64/bin/gcc \
|
---|
| 41 | cxx=/mingw64/bin/g++
|
---|
| 42 |
|
---|
| 43 | # Compile and install
|
---|
| 44 | if [ $# -eq 0 ]; then
|
---|
| 45 | make
|
---|
| 46 | make install
|
---|
| 47 | else
|
---|
| 48 | make -j $1
|
---|
| 49 | make -j $1 install
|
---|
| 50 | fi
|
---|
| 51 |
|
---|
| 52 | # Install GKlib
|
---|
| 53 | cp -R GKlib ${PREFIX}
|
---|
| 54 |
|
---|
| 55 | # Create link to lib directory (PETSc, by default, looks for libraries in
|
---|
| 56 | # lib64/ if it detects that 64-bit integers are being used)
|
---|
| 57 | #
|
---|
| 58 | # NOTE: MSYS2 needs to be run as administrator for this to work.
|
---|
| 59 | #
|
---|
| 60 | cd ${PREFIX}
|
---|
| 61 | ln -s ./lib ./lib64
|
---|
| 62 |
|
---|
| 63 | # Create link to shared version of library so that libtool can find it
|
---|
| 64 | cd ${PREFIX}/lib
|
---|
| 65 | ln -s libmetis.so libmetis.dll
|
---|
Note:
See
TracBrowser
for help on using the repository browser.