1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.16 2000/03/02 16:07:30 martin Exp $
#include <Threads.tmpl>
#define IHaveSubdirs
#define PassCDebugFlags
#define DoNormalLib NormalLibGlx
#define DoSharedLib SharedLibGlx
#define DoExtraLib SharedLibGlx
#define DoDebugLib DebugLibGlx
#define DoProfileLib ProfileLibGlx
LIBNAME = GL
SOREV = $(SOGLREV)
#ifdef SharedGLReqs
REQUIREDLIBS = SharedGLReqs
#endif
#if 0
LOWSRC = lowpc.c
LOWOBJ = lowpc.o
HISRC = highpc.c
HIOBJ = highpc.o
#endif
GLXOBJS = glx/?*.o
GLXUOBJS = glx/unshared/?*.o
GLXDOBJS = glx/debugger/?*.o
GLXPOBJS = glx/profiled/?*.o
GLXDONES = glx/DONE
#if BuildXF86DRI
DRIOBJS = dri/XF86dri.o dri/dri_glx.o
DRIUOBJS = dri/unshared/XF86dri.o dri/unshared/dri_glx.o
DRIDOBJS = dri/debugger/XF86dri.o dri/debugger/dri_glx.o
DRIPOBJS = dri/profiled/XF86dri.o dri/profiled/dri_glx.o
DRIDONES = dri/DONE
DRMOBJS = dri/drm/?*.o
DRMUOBJS = dri/drm/unshared/?*.o
DRMDOBJS = dri/drm/debugger/?*.o
DRMPOBJS = dri/drm/profiled/?*.o
DRMDONES = dri/drm/DONE
MESAOBJS = mesa/src/?*.o mesa/src/X86/?*.o
MESAUOBJS = mesa/src/unshared/?*.o mesa/src/X86/unshared/?*.o
MESADOBJS = mesa/src/debugger/?*.o mesa/src/X86/debugger/?*.o
MESAPOBJS = mesa/src/profiled/?*.o mesa/src/X86/profiled/?*.o
MESADONES = mesa/src/DONE mesa/src/X86/DONE
DRIMESAOBJS = mesa/dri/?*.o
DRIMESAUOBJS = mesa/dri/unshared/?*.o
DRIMESADOBJS = mesa/dri/debugger/?*.o
DRIMESAPOBJS = mesa/dri/profiled/?*.o
DRIMESADONES = mesa/dri/DONE
COMMONOBJS = mesa/src/drv/common/?*.o
COMMONUOBJS = mesa/src/drv/common/unshared/?*.o
COMMONDOBJS = mesa/src/drv/common/debugger/?*.o
COMMONPOBJS = mesa/src/drv/common/profiled/?*.o
COMMONDONES = mesa/src/drv/common/DONE
#if GlxUseSGISI
XCOMM nothing
#elif GlxBuiltInGamma
GAMMAOBJS = mesa/src/drv/gamma/?*.o
GAMMAUOBJS = mesa/src/drv/gamma/unshared/?*.o
GAMMADOBJS = mesa/src/drv/gamma/debugger/?*.o
GAMMAPOBJS = mesa/src/drv/gamma/profiled/?*.o
GAMMADONES = mesa/src/drv/gamma/DONE
DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS)
DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS)
DRVDONES = $(GAMMADONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES)
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#elif GlxBuiltInTdfx
TDFXOBJS = mesa/src/drv/tdfx/?*.o
TDFXUOBJS = mesa/src/drv/tdfx/unshared/?*.o
TDFXDOBJS = mesa/src/drv/tdfx/debugger/?*.o
TDFXPOBJS = mesa/src/drv/tdfx/profiled/?*.o
TDFXDONES = mesa/src/drv/tdfx/DONE
DRVOBJS = $(TDFXOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS)
DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS)
DRVDONES = $(TDFXDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES)
REQUIREDLIBS += -lglide3x
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#elif GlxBuiltInI810
I810OBJS = mesa/src/drv/i810/?*.o
I810UOBJS = mesa/src/drv/i810/unshared/?*.o
I810DOBJS = mesa/src/drv/i810/debugger/?*.o
I810POBJS = mesa/src/drv/i810/profiled/?*.o
I810DONES = mesa/src/drv/i810/DONE
DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS)
DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS)
DRVDONES = $(I810DONES) $(COMMONDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES)
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#elif GlxBuiltInMga
MGAOBJS = mesa/src/drv/mga/?*.o
MGAUOBJS = mesa/src/drv/mga/unshared/?*.o
MGADOBJS = mesa/src/drv/mga/debugger/?*.o
MGAPOBJS = mesa/src/drv/mga/profiled/?*.o
MGADONES = mesa/src/drv/mga/DONE
DRVOBJS = $(MGAOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS)
DRVUOBJS = $(MGAUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(MGADOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(MGAPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS)
DRVDONES = $(MGADONES) $(COMMONDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES)
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#elif GlxBuiltInR128
R128OBJS = mesa/src/drv/r128/?*.o
R128UOBJS = mesa/src/drv/r128/unshared/?*.o
R128DOBJS = mesa/src/drv/r128/debugger/?*.o
R128POBJS = mesa/src/drv/r128/profiled/?*.o
R128DONES = mesa/src/drv/r128/DONE
DRVOBJS = $(R128OBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS)
DRVUOBJS = $(R128UOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(R128DOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(R128POBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS)
DRVDONES = $(R128DONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES)
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#elif GlxBuiltInMesa
#ifndef GlxDriverUsesMesa
DRVOBJS = mesa/src/?*.o
DRVUOBJS = mesa/src/unshared/?*.o
DRVDOBJS = mesa/src/debugger/?*.o
DRVPOBJS = mesa/src/profiled/?*.o
DRVDONES = mesa/src/DONE
GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src
#endif
#else
XCOMM No built-in drivers. This is the usual case.
GLXSUBDIRS = glx dri
#endif
#else
XCOMM BuildXF86DRI was not defined. Just build an indirect-only libGL.
GLXSUBDIRS = glx
#endif
#if BuildXF86DRI
SUBDIRS = $(GLXSUBDIRS)
OTHERSUBDIRS = mesa/dri mesa/include/GL mesa/src
#else
SUBDIRS = glx
#endif
MakeSubdirs($(SUBDIRS))
MakefileSubdirs($(OTHERSUBDIRS))
DependSubdirs($(SUBDIRS) $(OTHERSUBDIRS))
#ifdef OS2Architecture
OBJS = $(LIBNAME).a
#else
OBJS = $(LOWOBJ) $(GLXOBJS) $(DRIOBJS) $(DRVOBJS) $(HIOBJ)
#endif
#if HasSharedLibraries
#if 1
UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS)
#else
UOBJS = $(OBJS)
#endif
#else
UOBJS = $(OBJS)
#endif
DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS)
POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS)
DONES = $(GLXDONES) $(DRIDONES) $(DRVDONES)
#if 0
SubdirLibraryRule(highpc.o lowpc.o)
NormalLintTarget(highpc.c lowpc.c)
#endif
#if LocalThreads
THREADOBJS = $(THREADS_LIBS)
#endif
#include <Library.tmpl>
#undef _LinkBuildLibrary
#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
#if NormalLibGlx
NormalDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(UOBJS))
InstallLibrary($(LIBNAME),$(USRLIBDIR))
#endif
#if SharedLibGlx
SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(GLXSUBDIRS) $(DONES),$(OBJS) $(THREADOBJS),.,.)
InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
#if LinkGLToUsrLib && AlternateUsrLibDir
install::
$(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so
$(LN) $(SHLIBDIR)/lib$(LIBNAME).so $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so
$(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1
$(LN) $(SHLIBDIR)/lib$(LIBNAME).so.1 $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1
#endif
#endif
#if DebugLibGlx
DebuggedDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(DOBJS))
InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
#endif
#if ProfileLibGlx
ProfiledDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(POBJS))
InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
#endif
XCOMM libGL has now been made, continue with building the drivers.
#if BuildXF86DRI && !GlxBuiltInGamma && !GlxBuiltInTdfx && !GlxBuiltInI810 && !GlxBuiltInMga && !GlxBuiltInMesa
DRIVERSUBDIRS = mesa/dri mesa/include/GL mesa/src
MakeSubdirs($(DRIVERSUBDIRS))
DependSubdirs($(DRIVERSUBDIRS))
InstallSubdirs($(DRIVERSUBDIRS))
#endif
|