/usr/share/gerris/build_function is in gerris-mpi 20131206+dfsg-7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/bin/sh
# file generated automatically by configure from 'build_function_gcc'
DIMENSION=$1 # gerris2D or gerris3D
WDIR=$2 # simulation directory
CC=mpicc
LD=mpicc
CFLAGS="-O -fpic -Wall -Wno-unused -Werror"
LDFLAGS="-O -fpic -shared"
touch links
if sed 's/@/#/g' < function.c | awk '{
if ($1 == "#" && $2 == "link") {
for (i = 3; i <= NF; i++)
printf ("%s ", $i) >> "links";
print "";
} else if ($1 == "#link") {
for (i = 2; i <= NF; i++)
printf ("%s ", $i) >> "links";
print "";
} else print $0;
}' > module.c; then :
else
exit 1
fi
if $CC `pkg-config $DIMENSION --cflags` $CFLAGS -I"$WDIR" \
-c -o module.o module.c; then
if $LD `pkg-config $DIMENSION --libs` $LDFLAGS -o module.so `cat links` module.o; then :
else
exit 1
fi
else
exit 1
fi
|