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 37 38 39 40 41 42 43
|
Description: Add missing build_functions files
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2014-07-31
--- /dev/null
+++ gerris-20131206-dfsg.1/build_function
@@ -0,0 +1,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
|