Improve creation of shared libraries for FreeBSD
authorMarcin Cieslak <saper@saper.info>
Mon, 13 Aug 2012 02:01:45 +0000 (04:01 +0200)
committerJon Trulson <jon@radscan.com>
Mon, 13 Aug 2012 02:57:48 +0000 (20:57 -0600)
cde/config/cf/FreeBSD.cf
cde/config/cf/bsdLib.rules

index 5e3a00d85d1740921dd9704cdc13848179039def..dc37202d05220df1429b1d57dbe178b962d4e305 100644 (file)
@@ -4,7 +4,7 @@ XCOMM platform:  $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
 #define OSName                 DefaultOSName
 #endif
 #ifndef OSVendor
-#define OSVendor               Walnut Creek CD-ROM
+#define OSVendor               FreeBSD Foundation
 #endif
 #ifndef OSMajorVersion
 #define OSMajorVersion         DefaultOSMajorVersion
@@ -57,6 +57,8 @@ XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
 #define DefaultCCOptions       -pipe
 #endif
 
+#define CplusplusLibC          -lstdc++
+
 #if OSMajorVersion > 1
 #define ServerOSDefines                XFree86ServerOSDefines -DDDXTIME
 #define XawI18nDefines         -DUSE_XWCHAR_STRING
index 8c052221d4ed459ec5db9eac964d1ea0d892ce1b..0d18ecac2f5472c05e98a1dfa7b2321052fbb4e1 100644 (file)
@@ -33,8 +33,8 @@ XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $
 #define InstallSharedLibrary(libname,rev,dest)                         @@\
 install:: Concat(lib,libname.so.rev)                                   @@\
        MakeDir($(DESTDIR)dest)                                         @@\
-       $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest 
-@@\
+       $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+       $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
 
 #endif /* InstallSharedLibrary */
 
@@ -52,10 +52,13 @@ Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)                     @@\
        (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
        $(RM) $@                                                        @@\
        $(MV) $@~ $@                                                    @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(LN) $@ Concat(lib,libname.so)                                 @@\
        LinkBuildLibrary($@)                                            @@\
+       LinkBuildLibrary(Concat(lib,libname.so))                        @@\
                                                                        @@\
 clean::                                                                        @@\
-       $(RM) Concat(lib,libname.so.rev)
+       $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
 
 #endif /* SharedLibraryTarget */