]> git.sesse.net Git - rdpsrv/blob - Xserver/config/cf/bsdLib.rules
Support RDP5 logon packets.
[rdpsrv] / Xserver / config / cf / bsdLib.rules
1 XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $
2
3
4
5
6
7 XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.4.2.1 1997/05/11 05:04:04 dawes Exp $
8 /*
9  * NetBSD/FreeBSD shared library rules
10  */
11
12 #ifndef UseElfFormat
13 #define UseElfFormat NO
14 #endif
15
16 #if !UseElfFormat
17 /* a.out shared libs */
18 #ifndef HasSharedLibraries
19 #define HasSharedLibraries YES
20 #endif
21 #ifndef SharedDataSeparation
22 #define SharedDataSeparation NO
23 #endif
24 #ifndef SharedCodeDef
25 #define SharedCodeDef
26 #endif
27 #ifndef SharedLibraryDef
28 #define SharedLibraryDef -DBSDSHLIB
29 #endif
30 #ifndef ShLibIncludeFile
31 #define ShLibIncludeFile <bsdLib.tmpl>
32 #endif
33 #ifndef SharedLibraryLoadFlags
34 #define SharedLibraryLoadFlags -Bshareable
35 #endif
36 #ifndef PositionIndependentCFlags
37 #define PositionIndependentCFlags -fpic
38 #endif
39
40 /*
41  * InstallSharedLibrary - generate rules to install the shared library.
42  */
43 #ifndef InstallSharedLibrary
44 #define InstallSharedLibrary(libname,rev,dest)                          @@\
45 install:: Concat(lib,libname.so.rev)                                    @@\
46         MakeDir($(DESTDIR)dest)                                         @@\
47         $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest 
48 @@\
49
50 #endif /* InstallSharedLibrary */
51
52 /*
53  * SharedLibraryTarget - generate rules to create a shared library;
54  * build it into a different name so that we do not hose people by having
55  * the library gone for long periods.
56  */
57 #ifndef SharedLibraryTarget
58 #define SharedLibraryTarget(libname,rev,solist,down,up)                 @@\
59 AllTarget(Concat(lib,libname.so.rev))                                   @@\
60                                                                         @@\
61 Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)                 @@\
62         $(RM) $@~                                                       @@\
63         (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
64         $(RM) $@                                                        @@\
65         $(MV) $@~ $@                                                    @@\
66         LinkBuildLibrary($@)                                            @@\
67                                                                         @@\
68 clean::                                                                 @@\
69         $(RM) Concat(lib,libname.so.rev)
70
71 #endif /* SharedLibraryTarget */
72
73 #ifndef SharedDepModuleTarget
74 #define SharedDepModuleTarget(name,deps,solist)                         @@\
75 AllTarget(name)                                                         @@\
76                                                                         @@\
77 name: deps                                                              @@\
78         $(RM) $@~                                                       @@\
79         $(LD) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)             @@\
80         $(RM) $@                                                        @@\
81         $(MV) $@~ $@                                                    @@\
82                                                                         @@\
83 clean::                                                                 @@\
84         $(RM) name
85
86 #endif /* SharedDepModuleTarget */
87
88 /*
89  * SharedLibraryDataTarget - generate rules to create shlib data file;
90  */
91 #ifndef SharedLibraryDataTarget
92 #define SharedLibraryDataTarget(libname,rev,salist)
93 #endif /* SharedLibraryDataTarget */
94
95 #ifndef InstallSharedLibraryData
96 #define InstallSharedLibraryData(libname,rev,dest)
97 #endif /* InstallSharedLibraryData */
98
99 /*
100  * SharedLibReferences - variables for shared libraries
101  */
102 #ifndef SharedLibReferences
103 #define SharedLibReferences(varname,libname,libsource,revname,rev)      @@\
104 revname = rev                                                           @@\
105 Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
106 Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)                @@\
107 LintLibReferences(varname,libname,libsource)
108 #endif
109
110 /*
111  * SharedDSLibReferences - variables for shared libraries
112  */
113 #ifndef SharedDSLibReferences
114 #define SharedDSLibReferences(varname,libname,libsource,revname,rev)    @@\
115 revname = rev                                                           @@\
116 Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
117 Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs)           @@\
118 LintLibReferences(varname,libname,libsource)
119 #endif
120
121 #else /* UseElfFormat */
122
123 /*
124  * NetBSD/FreeBSD (ELF) shared library rules
125  * Cloned from Linux ELF rules, with the following major change:
126  *
127  *      Shared libraries depend on -lc.  Since we don't have to worry
128  *      about libc vs. libg, etc., this is a good idea.  (This is actually
129  *      implied by using $(CC) to build the shared libraries.)
130  */
131
132 #ifndef HasSharedLibraries
133 #define HasSharedLibraries YES
134 #endif
135 #ifndef ForceNormalLib
136 #define ForceNormalLib YES
137 #endif
138
139 #ifndef BaseShLibReqs
140 #define BaseShLibReqs           /* -lc implied by $(CC) */
141 #endif
142
143 #ifndef SharedDataSeparation
144 #define SharedDataSeparation NO
145 #endif
146 #ifndef SharedCodeDef
147 #define SharedCodeDef /**/
148 #endif
149 #ifndef SharedLibraryDef
150 #define SharedLibraryDef /**/
151 #endif
152 #ifndef ShLibIncludeFile
153 #define ShLibIncludeFile <bsdLib.tmpl>
154 #endif
155 #ifndef SharedLibraryLoadFlags
156 #define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR)
157 #endif
158 #ifndef PositionIndependentCFlags
159 #define PositionIndependentCFlags -fPIC
160 #endif
161 #ifndef PositionIndependentCplusplusFlags
162 #define PositionIndependentCplusplusFlags -fPIC
163 #endif
164 #ifndef ExtraLoadFlags
165 #ifdef UseInstalled
166 #define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
167 #else
168 #define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
169 #endif
170 #endif
171
172 /*
173  * InstallSharedLibrary - generate rules to install the shared library.
174  * NOTE: file must be executable, hence "INSTBINFLAGS"
175  */
176 #ifndef InstallSharedLibrary
177 #define InstallSharedLibrary(libname,rev,dest)                          @@\
178 install:: Concat(lib,libname.so.rev)                                    @@\
179         MakeDir($(DESTDIR)dest)                                         @@\
180         $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
181         (T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\
182                 $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T)      @@\
183         (T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.so.*$$/.so/'`;\
184                 $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T)      @@\
185         $(RM) Concat($(DESTDIR)dest/lib,libname.so)                     @@\
186         $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
187 #endif /* InstallSharedLibrary */
188
189 /*
190  * InstallSharedLibraryData - generate rules to install the shared library data
191  */
192 #ifndef InstallSharedLibraryData
193 #define InstallSharedLibraryData(libname,rev,dest)
194 #endif /* InstallSharedLibraryData */
195
196
197 /*
198  * SharedLibraryTarget - generate rules to create a shared library;
199  * build it into a different name so that we do not hose people by having
200  * the library gone for long periods.
201  */
202 #ifndef SharedLibraryTarget
203 #ifdef UseInstalled  
204 #define LinkBuildSonameLibrary(lib) true
205 #else
206 #define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
207         cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
208 #endif
209
210 #define SharedLibraryTarget(libname,rev,solist,down,up)                 @@\
211 AllTarget(Concat(lib,libname.so.rev))                                   @@\
212                                                                         @@\
213 Concat(lib,libname.so.rev):  solist                                     @@\
214         $(RM) $@~                                                       @@\
215         SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; \                      @@\
216                 (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
217                 $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
218                 LinkBuildSonameLibrary($$SONAME)                        @@\
219         $(RM) $@                                                        @@\
220         $(MV) $@~ $@                                                    @@\
221         $(RM) Concat(lib,libname.so)                                    @@\
222         $(LN) $@ Concat(lib,libname.so)                                 @@\
223         LinkBuildLibrary($@)                                            @@\
224         LinkBuildLibrary(Concat(lib,libname.so))                        @@\
225                                                                         @@\
226 clean::                                                                 @@\
227         $(RM) Concat(lib,libname.so.rev)
228
229 #endif /* SharedLibraryTarget */
230
231 /*
232  * SharedLibraryDataTarget - generate rules to create shlib data file;
233  */
234 #ifndef SharedLibraryDataTarget
235 #define SharedLibraryDataTarget(libname,rev,salist)
236 #endif /* SharedLibraryTarget */
237
238 #endif /* UseElfFormat */