Changeset 2142 for ThirdParty/ASL


Ignore:
Timestamp:
Mar 27, 2011 1:41:57 PM (9 years ago)
Author:
stefan
Message:

fake libtool objects to avoid warning and empty archive in static build

Location:
ThirdParty/ASL/trunk
Files:
2 edited

Legend:

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

    r2141 r2142  
    1111#    in a shared library build, this should give a shared libcoinasl.so library
    1212#    further, configure should have taken care of adding -fPIC -DPIC to the CFLAGS when compiling the ASL sources
     13#    to avoid a failure when building static libraries and a libtool warning, we additionally create .lo files for each object
    1314
    1415AUTOMAKE_OPTIONS = foreign
     
    4344
    4445libcoinasl.la : $(AMPLSOLVER_A)
    45         mkdir tmp ; cd tmp ; $(AR) x ../$(AMPLSOLVER_A) ; cd ..
    46         $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) tmp/*.o
    47         rm -rf tmp
     46        $(mkdir_p) linkdir ; cd linkdir ; \
     47        $(AR) x ../$(AMPLSOLVER_A) ; \
     48        for i in *.o ; do \
     49          lofile=`echo $$i | sed -e 's/.o$$/.lo/'`; \
     50          echo "# fake line" > $$lofile ; \
     51          echo "# Generated by fake libtool" >> $$lofile ; \
     52          echo "pic_object='$$i'" >> $$lofile ; \
     53          echo "non_pic_object='$$i'" >> $$lofile ; \
     54        done ; cd ..
     55        $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) linkdir/*.lo
     56        rm -rf linkdir
    4857
    4958alltargets += libcoinasl.la
  • ThirdParty/ASL/trunk/Makefile.in

    r2141 r2142  
    2525#    in a shared library build, this should give a shared libcoinasl.so library
    2626#    further, configure should have taken care of adding -fPIC -DPIC to the CFLAGS when compiling the ASL sources
     27#    to avoid a libtool warning and
    2728
    2829# Copyright (C) 2006, 2007 International Business Machines and others.
     
    729730
    730731@COIN_CC_IS_CL_FALSE@libcoinasl.la : $(AMPLSOLVER_A)
    731 @COIN_CC_IS_CL_FALSE@   mkdir tmp ; cd tmp ; $(AR) x ../$(AMPLSOLVER_A) ; cd ..
    732 @COIN_CC_IS_CL_FALSE@   $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) tmp/*.o
    733 @COIN_CC_IS_CL_FALSE@   rm -rf tmp
     732@COIN_CC_IS_CL_FALSE@   $(mkdir_p) linkdir ; cd linkdir ; \
     733@COIN_CC_IS_CL_FALSE@   $(AR) x ../$(AMPLSOLVER_A) ; \
     734@COIN_CC_IS_CL_FALSE@   for i in *.o ; do \
     735@COIN_CC_IS_CL_FALSE@     lofile=`echo $$i | sed -e 's/.o$$/.lo/'`; \
     736@COIN_CC_IS_CL_FALSE@     echo "# fake line" > $$lofile ; \
     737@COIN_CC_IS_CL_FALSE@     echo "# Generated by bla libtool" >> $$lofile ; \
     738@COIN_CC_IS_CL_FALSE@     echo "pic_object='$$i'" >> $$lofile ; \
     739@COIN_CC_IS_CL_FALSE@     echo "non_pic_object='$$i'" >> $$lofile ; \
     740@COIN_CC_IS_CL_FALSE@   done ; cd ..
     741@COIN_CC_IS_CL_FALSE@   $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) linkdir/*.lo
     742@COIN_CC_IS_CL_FALSE@   rm -rf linkdir
    734743
    735744stdio1.h arith.h funcadd0.$(OBJEXT): $(AMPLSOLVER_A)
Note: See TracChangeset for help on using the changeset viewer.