Ignore:
Timestamp:
Feb 25, 2008 8:59:46 AM (14 years ago)
Author:
andreasw
Message:

first version of ThirdParty?/HSL that can be used to build a loadable HSL library that can be included from Ipopt at runtime. It is activated with the --enable-loadable-library flag. It should work on everything where BuildTools? can make shared libraries, as well on Cygwin with GCC and MSVC and Intel icl. Will now try it on MinGW

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/HSL/trunk/Makefile.am

    r523 r945  
    1 # Copyright (C) 2003, 2007 International Business Machines and others
     1# Copyright (C) 2003, 2008 International Business Machines and others
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    3030endif
    3131
     32lib_LTLIBRARIES =
     33if INSTALL_LOADABLE_LIBRARY
     34if EXTRA_SHARED_COMMAND
     35else
     36  lib_LTLIBRARIES += libhsl.la
     37  libhsl_la_SOURCES = nodist_libcoinhsl_la_SOURCES
     38endif
     39endif
     40
    3241libcoinhsl_la_LDFLAGS = $(LT_LDFLAGS)
     42
     43#############################################################################
     44#  Generating a shared library for delay loading
     45
     46if EXTRA_SHARED_COMMAND
     47
     48$(HSL_SHARED_LIB): $(noinst_LTLIBRARIES) $(DEFFILE)
     49        bla=; \
     50        for i in $(nodist_libcoinhsl_la_SOURCES); do \
     51          case $$i in \
     52            *.f) \
     53              obj=`echo $$i| sed -e 's|\(.*\).[cf]|.libs/\1.$(OBJEXT)|g'` ;\
     54              if test -r $$obj; then \
     55                bla="$$bla $$obj" ;\
     56              else \
     57                bla="$$bla `echo $$i| sed -e 's|\(.*\).[cf]|\1.$(OBJEXT)|g'`" ;\
     58              fi ;\
     59              ;; \
     60          esac ;\
     61        done ;\
     62        $(F77_SHARED_CMD) $$bla -o $(HSL_SHARED_LIB) $(F77_DLL_LINKFLAGS)
     63
     64if NEED_DEFFILE
     65$(DEFFILE): config.status
     66        echo 'LIBRARY LIBHSL' > $(DEFFILE)
     67        echo 'EXPORTS' >> $(DEFFILE)
     68        for i in $(EXPORT_SYMBOLS); do \
     69          echo "  $$i" >> $(DEFFILE); \
     70        done
     71endif
     72
     73install-exec-local: $(HSL_SHARED_LIB)
     74        test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
     75        $(libLTLIBRARIES_INSTALL) $(HSL_SHARED_LIB) "$(DESTDIR)$(libdir)/$(HSL_SHARED_LIB)"
     76
     77CLEANFILES = $(HSL_SHARED_LIB) $(DEFFILE)
     78
     79uninstall-local:
     80        rm -f "$(DESTDIR)$(libdir)/$(HSL_SHARED_LIB)"
     81endif
    3382
    3483########################################################################
Note: See TracChangeset for help on using the changeset viewer.