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

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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.