1 XCOMM $XConsortium: osfLib.rules /main/16 1996/09/28 16:11:55 rws $
4 * OSF/1 shared library rules
7 #ifndef HasSharedLibraries
8 #define HasSharedLibraries YES
10 #ifndef SeparateSharedCompile
11 #define SeparateSharedCompile NO
13 #ifndef SharedDataSeparation
14 #define SharedDataSeparation NO
17 #define SharedCodeDef /**/
19 #ifndef SharedLibraryDef
20 #define SharedLibraryDef /**/
22 #ifndef ShLibIncludeFile
23 #define ShLibIncludeFile <osfLib.tmpl>
25 #ifndef SharedLibraryLoadFlags
26 #define SharedLibraryLoadFlags -shared -no_archive
29 #ifndef PositionIndependentCFlags
30 #define PositionIndependentCFlags /**/
34 * InstallSharedLibrary - generate rules to install the shared library.
36 #ifndef InstallSharedLibrary
37 #define InstallSharedLibrary(libname,rev,dest) @@\
38 install:: Concat(lib,libname.so.rev) @@\
39 MakeDir($(DESTDIR)dest) @@\
40 $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
41 $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
42 cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)
44 #endif /* InstallSharedLibrary */
47 * InstallSharedLibraryData - generate rules to install the shared library data
49 #ifndef InstallSharedLibraryData
50 #define InstallSharedLibraryData(libname,rev,dest)
51 #endif /* InstallSharedLibraryData */
53 #ifndef PackageName(libname)
55 #define PackageName(libname) /**/
56 #define Objects(objlist) -all objlist -none
58 #define PackageName(libname) -package libname
59 #define Objects(objlist) objlist
62 #if ThreadedX && ModernOSF1 && OSMajorVersion < 4
63 #define BaseShLibReqs -lc_r -lc
65 #define BaseShLibReqs -lc
69 * SharedLibraryTarget - generate rules to create a shared library;
70 * build it into a different name so that we do not hose people by having
71 * the library gone for long periods.
73 #ifndef SharedLibraryTarget
74 #if SeparateSharedCompile
75 #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
76 AllTarget(Concat(lib,libname.so.rev)) @@\
78 Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
80 (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
81 -soname $@ Objects(solist) \ @@\
82 $(REQUIREDLIBS) BaseShLibReqs) @@\
85 $(RM) Concat(lib,libname.so) @@\
86 $(LN) $@ Concat(lib,libname.so) @@\
87 LinkBuildLibrary($@) @@\
88 LinkBuildLibrary(Concat(lib,libname.so)) @@\
91 $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
93 #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
94 AllTarget(Concat(lib,libname.so.rev)) @@\
96 Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
98 $(LD) -o $@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
99 -soname $@ Objects(solist) \ @@\
100 $(REQUIREDLIBS) BaseShLibReqs @@\
103 $(RM) Concat(lib,libname.so) @@\
104 $(LN) $@ Concat(lib,libname.so) @@\
105 LinkBuildLibrary($@) @@\
106 LinkBuildLibrary(Concat(lib,libname.so)) @@\
109 $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
110 #endif /* SeparateSharedCompile */
111 #endif /* SharedLibraryTarget */
114 * SharedLibraryDataTarget - generate rules to create shlib data file;
116 #ifndef SharedLibraryDataTarget
117 #define SharedLibraryDataTarget(libname,rev,salist)
118 #endif /* SharedLibraryTarget */