3 # Copyright (c) 2012-2014. The SimGrid Team.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
10 SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
12 prefix="@exec_prefix@"
13 smpicc="$prefix/bin/smpicc"
14 smpif2c="$prefix/bin/smpif2c"
18 INCLUDEARGS="@includeflag@"
19 CMAKE_LINKARGS="-L@libdir@"
20 >>>>>>> 167177a9f2980982c1bb3f89ec90fc1937395cd5
24 list_set FFLAGS "-ff2c" "-fno-second-underscore"
25 list_set LINKARGS "-lsimgrid" "-lm" "-lgfortran"
30 eval $(list_get TMPFILES)
35 list_set CMDLINE "${F77}"
36 list_add_not_empty CMDLINE "${FFLAGS}"
37 while [ $# -gt 0 ]; do
47 TMPFILE=$(mymktemp "${ARG}" ".f")
48 list_add TMPFILES "${TMPFILE}"
49 #replace "program main_name by subroutine user\_main (and the end clause as well)"
50 sed 's/[[:space:]]\{6\}[[:space:]]*\(end \)\{0,1\}program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/ \1subroutine user_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI' "${ARG}" > "${TMPFILE}"
52 list_add CMDLINE "${SRCFILE}"
54 '-version' | '--version' | '-v')
55 # -e is not recognised by MS-DOS...
56 echo -e $SIMGRID_VERSION
60 list_add CMDLINE "${ARG}"
65 list_add_not_empty CMDLINE ${INCLUDEARGS}
66 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
67 list_add_not_empty CMDLINE "${LINKARGS}"
69 eval $(list_get CMDLINE)