Changeset 19375


Ignore:
Timestamp:
05/22/15 18:41:45 (10 years ago)
Author:
glperez
Message:

CHG: Improved libtool.m4 patch for Windows build. Patch now has fewer unrecognized flags during linking and can now "rebuild" objects when they have too many source files.
CHG: Both makefiles now build convinience libraries during Windows builds.

Location:
issm/trunk-jpl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/autotools/patches/libtool.m4.patch

    r15296 r19375  
    1 --- m4/libtool.m4       2013-06-19 22:19:27.313488900 -0700
    2 +++ m4/libtool.m4.bak   2013-06-18 18:45:55.766285300 -0700
     1--- ./externalpackages/autotools/install/share/aclocal/libtool.m4       2015-05-22 18:31:17.780392900 -0700
     2+++ ./m4/libtool.m4     2015-05-22 18:35:16.669058700 -0700
     3@@ -3142,7 +3142,7 @@
     4 case $host_os in
     5   cygwin* | mingw* | pw32* | cegcc*)
     6     if test "$GCC" != yes; then
     7-      reload_cmds=false
     8+      reload_cmds='lib /OUT:$output$reload_objs'
     9     fi
     10     ;;
     11   darwin*)
    312@@ -4752,7 +4752,7 @@
    413       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
     
    615       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
    716-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
    8 +        _LT_TAGVAR(archive_cmds, $1)='$CC /LD $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib '
     17+        _LT_TAGVAR(archive_cmds, $1)='$CC /LD $libobjs $deplibs $compiler_flags -o $output_objdir/$soname '
    918        # If the export-symbols file already is a .def file (1st line
    1019        # is EXPORTS), use it as is; otherwise, prepend...
     
    1524        fi~
    1625-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
    17 +       $CC /LD $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib '
     26+       $CC /LD $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname '
    1827       else
    1928        _LT_TAGVAR(ld_shlibs, $1)=no
     
    2433          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
    2534-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
    26 +           _LT_TAGVAR(archive_cmds, $1)='$CC /LD -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib '
     35+           _LT_TAGVAR(archive_cmds, $1)='$CC /LD -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname '
    2736            # If the export-symbols file already is a .def file (1st line
    2837            # is EXPORTS), use it as is; otherwise, prepend...
     
    3342            fi~
    3443-           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
    35 +           $CC /LD -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib '
     44+           $CC /LD -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname '
    3645          else
    3746            _LT_TAGVAR(ld_shlibs, $1)=no
  • issm/trunk-jpl/src/c/Makefile.am

    r19286 r19375  
    66
    77#Library declaration {{{
    8 
     8if !WINDOWS
    99lib_LTLIBRARIES = libISSMCore.la libISSMOverload.la
    1010if WRAPPERS
    1111lib_LTLIBRARIES += libISSMModules.la
     12endif
     13else
     14noinst_LTLIBRARIES = libISSMCore.la libISSMOverload.la
     15if WRAPPERS
     16noinst_LTLIBRARIES += libISSMModules.la
     17endif
    1218endif
    1319#}}}
     
    558564libISSMCore_la_FFLAGS = $(AM_FFLAGS)
    559565
     566if !WINDOWS
    560567libISSMCore_la_LIBADD = $(PETSCLIB) $(TAOLIB) $(M1QN3LIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB)   $(ADOLCLIB) $(AMPILIB) $(METEOIOLIB) $(SNOWPACKLIB)
     568endif
    561569
    562570if WRAPPERS
     
    570578endif
    571579libISSMModules_la_CXXFLAGS = $(ALLCXXFLAGS)
     580if !WINDOWS
    572581if STANDALONE_LIBRARIES
    573582libISSMModules_la_LIBADD = ./libISSMCore.la
    574583else
    575584libISSMModules_la_LIBADD = ./libISSMCore.la $(TRIANGLELIB)
     585endif
    576586endif
    577587endif
     
    592602if WRAPPERS
    593603libISSMModules_la_LDFLAGS = -static
    594 endif
     604else
     605libISSMModules_la_LDFLAGS =
     606endif
     607else
     608libISSMCore_la_LDFLAGS =
     609libISSMOverload_la_LDFLAGS =
    595610endif
    596611
     
    637652#Automatic differentiation (must be done at the end) {{{
    638653if ADIC2
     654if !WINDOWS
    639655lib_LTLIBRARIES += libAD.la libISSMRose.la
     656else
     657noinst_LTLIBRARIES += libAD.la libISSMRose.la
     658endif
    640659
    641660#ADIC2 library, for automatic differentiation
  • issm/trunk-jpl/src/wrappers/matlab/Makefile.am

    r19212 r19375  
    88
    99#matlab io{{{
     10if !WINDOWS
    1011lib_LTLIBRARIES = libISSMMatlab.la
     12else
     13noinst_LTLIBRARIES = libISSMMatlab.la
     14lib_LTLIBRARIES =
     15endif
    1116
    1217io_sources= ./io/CheckNumMatlabArguments.cpp\
     
    2025#}}}
    2126#api io{{{
     27if !WINDOWS
    2228lib_LTLIBRARIES += libISSMApi.la
     29else
     30noinst_LTLIBRARIES += libISSMApi.la
     31endif
    2332
    2433api_sources= ./io/ApiPrintf.cpp
     
    92101AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -fPIC
    93102
    94 # This is a temporary fix to an issue with Libtool regarding linking against
    95 # static libraries for Windows. Ideally, we would build all libraries as DLLs
    96 # and and avoid this workaround which removes the dependency of ISSM libraries
    97 # from the perspective of our build system.
     103deps += ./libISSMMatlab.la ../../c/libISSMModules.la ../../c/libISSMCore.la ./libISSMApi.la
     104
    98105if WINDOWS
    99 AM_LDFLAGS += $(METISLIB) -Wl,./.libs/libISSMMatlab.lib -Wl,./../../c/.libs/libISSMModules.lib -Wl,./../../c/.libs/libISSMCore.lib -Wl,././.libs/libISSMApi.lib
    100 else
    101 deps += ./libISSMMatlab.la ../../c/libISSMModules.la ../../c/libISSMCore.la ./libISSMApi.la
     106deps += $(METISLIB)
    102107endif
    103108
     
    117122#}}}
    118123# Module sources and dependencies {{{
     124if !WINDOWS
    119125libISSMMatlab_la_LIBADD = ./../../c/libISSMCore.la ./../../c/libISSMModules.la $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) $(MATHLIB) $(MEXLIB)
     126endif
    120127
    121128if STANDALONE_LIBRARIES
Note: See TracChangeset for help on using the changeset viewer.