Changeset 27631


Ignore:
Timestamp:
03/02/23 13:51:06 (2 years ago)
Author:
jdquinn
Message:

BUG: Corrected autom4ke config for Python binaries build; still need to refactor

Location:
issm/trunk-jpl/src/wrappers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/matlab/Makefile.am

    r27619 r27631  
    9090deps = $(MATHLIB)
    9191
    92 #Triangle library
     92# Triangle
    9393CXXFLAGS_FOR_TRI = -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
    9494
  • issm/trunk-jpl/src/wrappers/python/Makefile.am

    r27624 r27631  
    22AUTOMAKE_OPTIONS = subdir-objects
    33
    4 EXEEXT=$(PYTHONWRAPPEREXT)
    5 
    64#define prefix (from http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Defining-Directories.html)
    75AM_CPPFLAGS += -DISSM_PREFIX='"$(prefix)"'
    86
    97#python io{{{
     8if !WINDOWS
    109lib_LTLIBRARIES = libISSMPython.la
     10else
     11noinst_LTLIBRARIES = libISSMPython.la
     12lib_LTLIBRARIES =
     13endif
    1114
    1215io_sources = \
     
    1518        ./io/WritePythonData.cpp
    1619
    17 ALLCXXFLAGS= -fPIC -D_WRAPPERS_ $(CXXFLAGS) $(CXXOPTFLAGS)
     20ALL_CXXFLAGS = -fPIC -D_WRAPPERS_
     21
     22if MSYS2
     23ALL_CXXFLAGS += -D_DO_NOT_LOAD_GLOBALS_ # Cannot have undefined symbols under MSYS2
     24ALL_CXXFLAGS += -D_USE_MATH_DEFINES # Need to open fence to math.h definitions when --std=c++ is used (which is the default)
     25endif
     26
     27ALL_CXXFLAGS += $(CXXOPTFLAGS) $(CXXFLAGS)
    1828
    1929libISSMPython_la_SOURCES = $(io_sources)
    20 libISSMPython_la_CXXFLAGS= $(ALLCXXFLAGS)
     30libISSMPython_la_CXXFLAGS= ${ALL_CXXFLAGS}
    2131#}}}
    2232#api io{{{
     33if !WINDOWS
    2334lib_LTLIBRARIES += libISSMApi.la
    24 api_sources              = ./io/ApiPrintf.cpp
     35else
     36noinst_LTLIBRARIES += libISSMApi.la
     37endif
     38
     39if !MSYS2
     40api_sources= ./io/ApiPrintf.cpp
    2541
    2642libISSMApi_la_SOURCES = $(api_sources)
    27 libISSMApi_la_CXXFLAGS= $(ALLCXXFLAGS)
     43libISSMApi_la_CXXFLAGS = ${ALL_CXXFLAGS}
     44endif
    2845#}}}
    2946#Wrappers {{{
     
    5269endif
    5370#}}}
    54 #Flags and libraries {{{
     71# Dependencies {{{
    5572deps = $(MATHLIB) $(PYTHONLIB)
    5673
    57 #Triangle library
    58 AM_CXXFLAGS = -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER -D_WRAPPERS_
    59 
    60 #Python part
    61 AM_LDFLAGS = -module $(PYTHONLINK) -shrext ${EXEEXT} --export-dynamic -rdynamic -no-undefined
     74# Triangle
     75CXXFLAGS_FOR_TRI = -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
     76
     77# Python
     78LDFLAGS_FOR_PY = -module $(PYTHONLINK) -shrext $(PYTHONWRAPPEREXT) -no-undefined
     79
     80LDFLAGS_FOR_PY += --no-warnings
     81CXXFLAGS_FOR_PY = -D_HAVE_PYTHON_MODULES_
     82
     83if PYTHON3
     84CXXFLAGS_FOR_PY += -DNPY_NO_DEPRECATED_API
     85endif
     86
     87AM_CXXFLAGS = ${CXXFLAGS_FOR_TRI} ${CXXFLAGS_FOR_PY}
     88AM_LDFLAGS = ${LDFLAGS_FOR_PY}
     89
     90if !MSYS2
     91AM_LDFLAGS += --export-dynamic -rdynamic
     92endif
    6293
    6394if !VERSION
     
    80111endif
    81112
    82 AM_LDFLAGS      += --no-warnings
    83 AM_CXXFLAGS += -D_HAVE_PYTHON_MODULES_ -fPIC
    84 
    85 if PYTHON3
    86 AM_CXXFLAGS += -DNPY_NO_DEPRECATED_API
    87 endif
    88 
    89 deps += ./libISSMPython.la ../../c/libISSMModules.la ../../c/libISSMCore.la ./libISSMApi.la
     113AM_CXXFLAGS += -fPIC -D_WRAPPERS_
     114
     115deps += ./libISSMPython.la ../../c/libISSMModules.la ../../c/libISSMCore.la
     116
     117if !MSYS2
     118deps += ./libISSMApi.la
     119endif
    90120
    91121if ADOLC
     
    109139endif
    110140
    111 libISSMApi_la_LIBADD = $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(MATHLIB)
     141libISSMApi_la_LIBADD = $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(MATHLIB)
    112142
    113143BamgConvertMesh_python_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp
    114144BamgConvertMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    115 BamgConvertMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     145BamgConvertMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    116146
    117147BamgMesher_python_la_SOURCES = ../BamgMesher/BamgMesher.cpp
    118148BamgMesher_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    119 BamgMesher_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     149BamgMesher_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    120150
    121151BamgTriangulate_python_la_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp
    122152BamgTriangulate_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    123 BamgTriangulate_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     153BamgTriangulate_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    124154
    125155if CHACO
    126156Chaco_python_la_SOURCES = ../Chaco/Chaco.cpp
    127157Chaco_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    128 Chaco_python_la_LIBADD = ${deps} $(CHACOLIB) $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     158Chaco_python_la_LIBADD = ${deps} $(CHACOLIB) $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    129159endif
    130160
    131161ContourToMesh_python_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp
    132162ContourToMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    133 ContourToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
     163ContourToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
    134164
    135165ContourToNodes_python_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp
    136166ContourToNodes_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    137 ContourToNodes_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     167ContourToNodes_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    138168
    139169ElementConnectivity_python_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp
    140170ElementConnectivity_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    141 ElementConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     171ElementConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    142172
    143173ExpToLevelSet_python_la_SOURCES = ../ExpToLevelSet/ExpToLevelSet.cpp
    144174ExpToLevelSet_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    145 ExpToLevelSet_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(NEOPZLIB)
     175ExpToLevelSet_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB) $(NEOPZLIB)
    146176
    147177InterpFromMesh2d_python_la_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp
    148178InterpFromMesh2d_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    149 InterpFromMesh2d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
     179InterpFromMesh2d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
    150180
    151181InterpFromGridToMesh_python_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp
    152182InterpFromGridToMesh_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    153 InterpFromGridToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
     183InterpFromGridToMesh_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
    154184
    155185InterpFromMeshToGrid_python_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
    156186InterpFromMeshToGrid_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    157 InterpFromMeshToGrid_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
     187InterpFromMeshToGrid_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(NEOPZLIB) $(GSLLIB)
    158188
    159189InterpFromMeshToMesh2d_python_la_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
    160190InterpFromMeshToMesh2d_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    161 InterpFromMeshToMesh2d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB)
     191InterpFromMeshToMesh2d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB)
    162192
    163193InterpFromMeshToMesh3d_python_la_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
    164194InterpFromMeshToMesh3d_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    165 InterpFromMeshToMesh3d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB)
     195InterpFromMeshToMesh3d_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(MULTITHREADINGLIB) $(GSLLIB)
    166196
    167197IssmConfig_python_la_SOURCES = ../IssmConfig/IssmConfig.cpp
    168198IssmConfig_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    169 IssmConfig_python_la_LIBADD = ${deps} $(DAKOTALIB) $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB)
     199IssmConfig_python_la_LIBADD = ${deps} $(DAKOTALIB) $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB)
    170200
    171201MeshPartition_python_la_SOURCES = ../MeshPartition/MeshPartition.cpp
    172202MeshPartition_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    173 MeshPartition_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(METISLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     203MeshPartition_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(METISLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    174204
    175205MeshProfileIntersection_python_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp
    176206MeshProfileIntersection_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    177 MeshProfileIntersection_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     207MeshProfileIntersection_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    178208
    179209NodeConnectivity_python_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp
    180210NodeConnectivity_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    181 NodeConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     211NodeConnectivity_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    182212
    183213Triangle_python_la_SOURCES = ../Triangle/Triangle.cpp
    184214Triangle_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    185 Triangle_python_la_LIBADD = ${deps} $(TRIANGLELIB) $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     215Triangle_python_la_LIBADD = ${deps} $(TRIANGLELIB) $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    186216
    187217ProcessRifts_python_la_SOURCES = ../ProcessRifts/ProcessRifts.cpp
    188218ProcessRifts_python_la_CXXFLAGS = ${AM_CXXFLAGS}
    189 ProcessRifts_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
    190 #}}}
     219ProcessRifts_python_la_LIBADD = ${deps} $(PETSCLIB) $(HDF5LIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MPILIB) $(NEOPZLIB) $(GSLLIB)
     220#}}}
Note: See TracChangeset for help on using the changeset viewer.