Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refactorize the sthread interception of functions
[simgrid.git] / src / smpi / smpicc.in
index 6463ec8..4379ffe 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-# Copyright (c) 2007-2022. The SimGrid Team.
+# Copyright (c) 2007-2023. The SimGrid Team.
 # All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
@@ -25,11 +25,7 @@ fi
 
 list_set CFLAGS @SMPI_C_FLAGS@
 list_add LINKARGS
-if [ "x@WIN32@" = "x1" ]; then
-    list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
-    list_add LINKARGS "@libdir@\libsimgrid.dll"
-elif [ "x@APPLE@" = "x1" ]; then
-    list_add CFLAGS "-fPIC"
+if [ "x@APPLE@" = "x1" ]; then
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -40,7 +36,6 @@ elif [ "x@APPLE@" = "x1" ]; then
       list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
     fi
 else
-    list_add CFLAGS "-fPIC"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -78,7 +73,7 @@ while [ $# -gt 0 ]; do
             exit 0
             ;;
         '-trace-call-location')
-            list_add_not_empty CMDARGS "-DTRACE_CALL_LOCATION"
+            list_add CMDARGS "-DTRACE_CALL_LOCATION"
             ;;
         '-compiler-version' | '--compiler-version')
             ${CC} --version
@@ -93,6 +88,8 @@ while [ $# -gt 0 ]; do
     esac
 done
 
+list_add CMDARGS "-fPIC"
+
 list_set CMDLINE "${CC}"
 list_add_not_empty CMDLINE "${CFLAGS}"
 list_add_not_empty CMDLINE "${INCLUDEARGS}"