Author: sebor
Date: Fri Mar 17 17:38:54 2006
New Revision: 386787

URL: http://svn.apache.org/viewcvs?rev=386787&view=rev
Log:
2006-03-17  Martin Sebor  <[EMAIL PROTECTED]>

        * GNUmakefile.lib: Generalized the handling of shared archives
        so as not to depend on the name of the compiler (which, while
        unique to VisualAge/XLC++, is specific to AIX); Used BUILDMODE
        instead.
        Moved LDFLAGS before OBJS on the link line since the former
        should not contain any libraries (that's what LDLIBS is for).

Modified:
    incubator/stdcxx/trunk/etc/config/GNUmakefile.lib

Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.lib
URL: 
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/GNUmakefile.lib?rev=386787&r1=386786&r2=386787&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/GNUmakefile.lib (original)
+++ incubator/stdcxx/trunk/etc/config/GNUmakefile.lib Fri Mar 17 17:38:54 2006
@@ -56,13 +56,10 @@
 # build an archive or shared library (repository included for DEC cxx 6.2)
 ifeq ($(findstring shared,$(BUILDMODE)),shared)
 
-  # determione whether we're bulding a .so-type shared library
-  # with VisualAge or a shared archive
-  xlC_lib_suffix = $(findstring xlC,$(CXX))$(LIBSUFFIX)
-
-  ifeq ($(xlC_lib_suffix),xlC.a)
-  # IBM VisualAge first "preprocesses" .o's with -qmkshrobj
-  # and then uses `ar' to create a shared library
+  ifeq ($(findstring archive,$(BUILDMODE)),archive)
+  # shared archives are unique to IBM AIX
+  # IBM VisualAge/XLC++ on AIX first "preprocesses" object files
+  # with -qmkshrobj and then uses `ar' to create a shared archive
 $(TARGET): $(OBJS)
        @echo "$(CXXPRELINK) -o $(LIBBASE).o" >> $(LOGFILE)
        $(CXXPRELINK) -o $(LIBBASE).o $(TEEOPTS)
@@ -70,12 +67,12 @@
        $(AR) $(ARFLAGS) $(LIBNAME) $(LIBBASE).o $(TEEOPTS)
   else
 $(TARGET): $(OBJS) $(MAPFILE)
-       @echo "$(LD) $(OBJS) $(LDFLAGS) -o [EMAIL PROTECTED](LIBVER)" >> 
$(LOGFILE)
-       $(LD) $(OBJS) $(LDFLAGS) -o [EMAIL PROTECTED](LIBVER) $(TEEOPTS)
+       @echo "$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o [EMAIL PROTECTED](LIBVER)" 
>> $(LOGFILE)
+       $(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o [EMAIL PROTECTED](LIBVER) 
$(TEEOPTS)
        @echo "ln -sf [EMAIL PROTECTED](LIBVER) $@" >> $(LOGFILE)
        rm -f $@
        ln -s [EMAIL PROTECTED](LIBVER) $@
-  endif   # eq ($(CXX),xlC)
+  endif   # shared archive
 
 else
 


Reply via email to