linux.cf: add some gcc system include paths to makedepend. Shaves about 5150 more...
[oweals/cde.git] / cde / config / cf / bsdLib.rules
1 XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $
2
3 /*
4  * NetBSD/FreeBSD shared library rules
5  */
6
7 #ifndef HasSharedLibraries
8 #define HasSharedLibraries YES
9 #endif
10 #ifndef SharedDataSeparation
11 #define SharedDataSeparation NO
12 #endif
13 #ifndef SharedCodeDef
14 #define SharedCodeDef
15 #endif
16 #ifndef SharedLibraryDef
17 #define SharedLibraryDef -DBSDSHLIB
18 #endif
19 #ifndef ShLibIncludeFile
20 #define ShLibIncludeFile <bsdLib.tmpl>
21 #endif
22 #ifndef SharedLibraryLoadFlags
23 #define SharedLibraryLoadFlags -Bshareable
24 #endif
25 #ifndef PositionIndependentCFlags
26 #define PositionIndependentCFlags -fpic
27 #endif
28
29 /*
30  * InstallSharedLibrary - generate rules to install the shared library.
31  */
32 #ifndef InstallSharedLibrary
33 #define InstallSharedLibrary(libname,rev,dest)                          @@\
34 install:: Concat(lib,libname.so.rev)                                    @@\
35         MakeDir($(DESTDIR)dest)                                         @@\
36         $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
37         $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
38
39 #endif /* InstallSharedLibrary */
40
41 /*
42  * SharedLibraryTarget - generate rules to create a shared library;
43  * build it into a different name so that we do not hose people by having
44  * the library gone for long periods.
45  */
46 #ifndef SharedLibraryTarget
47 #define SharedLibraryTarget(libname,rev,solist,down,up)                 @@\
48 AllTarget(Concat(lib,libname.so.rev))                                   @@\
49                                                                         @@\
50 Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)                 @@\
51         $(RM) $@~                                                       @@\
52         (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
53         $(RM) $@                                                        @@\
54         $(MV) $@~ $@                                                    @@\
55         $(RM) Concat(lib,libname.so)                                    @@\
56         $(LN) $@ Concat(lib,libname.so)                                 @@\
57         LinkBuildLibrary($@)                                            @@\
58         LinkBuildLibrary(Concat(lib,libname.so))                        @@\
59                                                                         @@\
60 clean::                                                                 @@\
61         $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
62
63 #endif /* SharedLibraryTarget */
64
65 /*
66  * SharedLibraryDataTarget - generate rules to create shlib data file;
67  */
68 #ifndef SharedLibraryDataTarget
69 #define SharedLibraryDataTarget(libname,rev,salist)
70 #endif /* SharedLibraryDataTarget */
71
72 #ifndef InstallSharedLibraryData
73 #define InstallSharedLibraryData(libname,rev,dest)
74 #endif /* InstallSharedLibraryData */
75
76 /*
77  * SharedLibReferences - variables for shared libraries
78  */
79 #ifndef SharedLibReferences
80 #define SharedLibReferences(varname,libname,libsource,revname,rev)      @@\
81 revname = rev                                                           @@\
82 Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
83 Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)                @@\
84 LintLibReferences(varname,libname,libsource)
85 #endif
86
87 /*
88  * SharedDSLibReferences - variables for shared libraries
89  */
90 #ifndef SharedDSLibReferences
91 #define SharedDSLibReferences(varname,libname,libsource,revname,rev)    @@\
92 revname = rev                                                           @@\
93 Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
94 Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs)           @@\
95 LintLibReferences(varname,libname,libsource)
96 #endif