3 # Copyright (c) 2007-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.
11 INCLUDEARGS="@includeflag@"
12 CMAKE_LINKARGS="-L@libdir@"
18 if [ "@WIN32@" != "1" ]; then
19 list_add CFLAGS "-Dmain=smpi_simulated_main_"
20 list_add LINKARGS "-lsimgrid"
22 list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
23 list_add LINKARGS "@libdir@\libsimgrid.dll"
27 while [ $# -gt 0 ]; do
37 SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
38 if [ -z "$SRCFILE" ] ; then
41 list_add CMDARGS "${SRCFILE}"
44 list_add CMDARGS "${ARG}"
49 list_set CMDLINE "${CC}"
50 list_add_not_empty CMDLINE "${CFLAGS}"
51 list_add_not_empty CMDLINE ${INCLUDEARGS}
52 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
53 list_add_not_empty CMDLINE "${CMDARGS}"
54 list_add_not_empty CMDLINE "${LINKARGS}"
56 eval $(list_get CMDLINE)