Last change
on this file since 23540 was 23540, checked in by rueckamp, 6 years ago |
NEW: Added SEMIC capability
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | set -eu
|
---|
3 |
|
---|
4 | #Some cleanup
|
---|
5 | rm -rf install src
|
---|
6 | mkdir install
|
---|
7 |
|
---|
8 | #Download latest version
|
---|
9 | git clone https://github.com/mkrapp/semic.git src
|
---|
10 |
|
---|
11 | if which ifort >/dev/null; then
|
---|
12 | FC="ifort"
|
---|
13 | FFLAGS="-traceback -check all" #-O2 is default
|
---|
14 | else
|
---|
15 | FC="gfortran"
|
---|
16 | if [ `uname` == "Darwin" ]; then
|
---|
17 | FC="gfortran -arch x86_64"
|
---|
18 | FFLAGS="-fcheck=all"
|
---|
19 | fi
|
---|
20 | fi
|
---|
21 |
|
---|
22 | #Compile semic module utils.f90
|
---|
23 | cd src/
|
---|
24 | (
|
---|
25 | cat << EOF
|
---|
26 | LIB_EXT=a
|
---|
27 | FC=$FC
|
---|
28 | FFLAGS=$FFLAGS
|
---|
29 | install: libutils.\$(LIB_EXT)
|
---|
30 | cp libutils.\$(LIB_EXT) ../install/
|
---|
31 | OBJECTS= utils.o
|
---|
32 | libutils.\$(LIB_EXT): \$(OBJECTS)
|
---|
33 | ar -r libutils.\$(LIB_EXT) \$(OBJECTS)
|
---|
34 | ranlib libutils.\$(LIB_EXT)
|
---|
35 | %.o: %.f90
|
---|
36 | \$(FC) \$(FFLAGS) -fPIC -c $< -o \$@
|
---|
37 | clean:
|
---|
38 | rm -rf *.o *.\$(LIB_EXT)
|
---|
39 | EOF
|
---|
40 | ) > Makefile
|
---|
41 | make
|
---|
42 |
|
---|
43 | # patch surface_physics
|
---|
44 | patch surface_physics.f90 < ../surface_physics.f90.patch
|
---|
45 |
|
---|
46 | #Compile semic module surface_physics.f90
|
---|
47 | (
|
---|
48 | cat << EOF
|
---|
49 | LIB_EXT=a
|
---|
50 | FC=$FC
|
---|
51 | FFLAGS=$FFLAGS
|
---|
52 | install: libsurface_physics.\$(LIB_EXT)
|
---|
53 | cp libsurface_physics.\$(LIB_EXT) ../install/
|
---|
54 | OBJECTS= surface_physics.o
|
---|
55 | libsurface_physics.\$(LIB_EXT): \$(OBJECTS)
|
---|
56 | ar -r libsurface_physics.\$(LIB_EXT) \$(OBJECTS)
|
---|
57 | ranlib libsurface_physics.\$(LIB_EXT)
|
---|
58 | %.o: %.f90
|
---|
59 | \$(FC) \$(FFLAGS) -fPIC -c $< -o \$@
|
---|
60 | clean:
|
---|
61 | rm -rf *.o *.\$(LIB_EXT)
|
---|
62 | EOF
|
---|
63 | ) > Makefile
|
---|
64 | make |
---|
Note:
See
TracBrowser
for help on using the repository browser.