Allow building on FreeBSD
[oweals/cde.git] / cde / config / cf / bsdLib.rules
index 8c052221d4ed459ec5db9eac964d1ea0d892ce1b..5f9d69d336f8d54152e77362f474839807fde0fd 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 */
 
@@ -49,13 +49,16 @@ AllTarget(Concat(lib,libname.so.rev))                                       @@\
                                                                        @@\
 Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)                        @@\
        $(RM) $@~                                                       @@\
-       (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+       (cd down; $(LD) -o up/$@~ -soname $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
        $(RM) $@                                                        @@\
        $(MV) $@~ $@                                                    @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(LN) $@ Concat(lib,libname.so)                                 @@\
        LinkBuildLibrary($@)                                            @@\
+       (cd $(BUILDLIBDIR) && $(LN) $@ Concat(lib,libname.so))          @@\
                                                                        @@\
 clean::                                                                        @@\
-       $(RM) Concat(lib,libname.so.rev)
+       $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
 
 #endif /* SharedLibraryTarget */