1 XCOMM $XConsortium: necLib.rules /main/4 1996/09/28 16:11:42 rws $
4 * NECOS shared library rules
7 #ifndef HasSharedLibraries
8 #define HasSharedLibraries YES
10 #ifndef SharedDataSeparation
11 #define SharedDataSeparation YES
16 #ifndef SharedLibraryDef
17 #define SharedLibraryDef
19 #ifndef ShLibIncludeFile
20 #define ShLibIncludeFile <necLib.tmpl>
22 #ifndef SharedLibraryLoadFlags
23 #define SharedLibraryLoadFlags
25 #ifndef PositionIndependentCFlags
26 #define PositionIndependentCFlags
30 #ifndef SeparateSharedCompile
31 #define SeparateSharedCompile NO
34 #define SharedLibObjCompile(options) $(_NULLCMD_)
37 * InstallSharedLibrary - generate rules to install the shared library.
39 #ifndef InstallSharedLibrary
40 #define InstallSharedLibrary(libname,rev,dest) @@\
41 install:: Concat(lib,libname.so.rev) @@\
42 MakeDir($(DESTDIR)dest) @@\
43 $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
44 cd $(DESTDIR)/dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@\
46 #endif /* InstallSharedLibrary */
49 * InstallSharedLibraryData - generate rules to install the shared library data
51 #ifndef InstallSharedLibraryData
52 #define InstallSharedLibraryData(libname,rev,dest) @@\
53 install:: Concat(lib,libname.sa.rev) @@\
54 MakeDir($(DESTDIR)dest) @@\
55 $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
56 RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
58 #endif /* InstallSharedLibraryData */
61 * SharedLibraryTarget - generate rules to create a shared library;
62 * build it into a different name so that we do not hose people by having
63 * the library gone for long periods.
65 #ifndef SharedLibraryTarget
66 #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
67 AllTarget(Concat(lib,libname.so.rev)) @@\
69 Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
71 $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist @@\
75 AllTarget(Concat(lib,libname.so)) @@\
77 Concat(lib,libname.so): Concat(lib,libname.so.rev) @@\
80 LinkBuildLibrary($@) @@\
81 LinkBuildLibrary(Concat(lib,libname.so)) @@\
84 $(RM) Concat(lib,libname.so.rev)
86 #endif /* SharedLibraryTarget */
89 * SharedLibraryDataTarget - generate rules to create shlib data file;
91 #ifndef SharedLibraryDataTarget
92 #define SharedLibraryDataTarget(libname,rev,salist) @@\
93 AllTarget(Concat(lib,libname.sa.rev)) @@\
95 Concat(lib,libname.sa.rev): salist $(EXTRALIBRARYDEPS) @@\
101 $(RM) Concat(lib,libname.sa.rev)
103 #endif /* SharedLibraryDataTarget */