Convert libGL and DRI drivers to require libdrm.
[mesa-demos.git] / Makefile
blob81e8cc2f422aa121932866ba30da80427a84aa8d
1 # Top-level Mesa makefile
3 TOP = .
5 SUBDIRS = src progs
8 default: $(TOP)/configs/current
9 @for dir in $(SUBDIRS) ; do \
10 (cd $$dir ; $(MAKE)) || exit 1 ; \
11 done
14 doxygen:
15 (cd doxygen ; make) ; \
17 clean:
18 @for dir in $(SUBDIRS) ; do \
19 (cd $$dir ; $(MAKE) clean) ; \
20 done
23 realclean:
24 touch $(TOP)/configs/current
25 $(MAKE) clean
26 -rm -rf lib*
27 -rm -f $(TOP)/configs/current
28 -rm -f `find . -name \*.o`
29 -rm -f `find . -name \*.a`
30 -rm -f `find . -name \*.so`
31 -rm -f `find . -name depend`
35 install:
36 @echo "Installing"
37 $(TOP)/bin/installmesa $(DESTDIR)
39 # DirectFBGL module installation
40 linux-directfb-install:
41 cd src/mesa/drivers/directfb && $(MAKE) install
43 # If there's no current configuration file
44 $(TOP)/configs/current:
45 @echo
46 @echo
47 @echo "Please choose a configuration from the following list:"
48 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS"
49 @echo
50 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
51 @echo "(ignore the following error message)"
52 @exit 1
55 # Rules to set/install a specific build configuration
56 aix \
57 aix-64 \
58 aix-gcc \
59 aix-static \
60 beos \
61 darwin \
62 darwin-static \
63 freebsd \
64 freebsd-dri \
65 freebsd-dri-amd64 \
66 freebsd-dri-x86 \
67 hpux10 \
68 hpux10-gcc \
69 hpux10-static \
70 hpux11-32 \
71 hpux11-32-static \
72 hpux11-32-static-nothreads \
73 hpux11-64 \
74 hpux11-64-static \
75 hpux9 \
76 hpux9-gcc \
77 irix6-64 \
78 irix6-64-static \
79 irix6-n32 \
80 irix6-n32-static \
81 irix6-o32 \
82 irix6-o32-static \
83 linux \
84 linux-alpha \
85 linux-alpha-static \
86 linux-debug \
87 linux-directfb \
88 linux-dri \
89 linux-dri-x86 \
90 linux-dri-x86-64 \
91 linux-dri-ppc \
92 linux-indirect \
93 linux-fbdev \
94 linux-glide \
95 linux-icc \
96 linux-icc-static \
97 linux-osmesa16 \
98 linux-osmesa16-static \
99 linux-osmesa32 \
100 linux-ppc \
101 linux-ppc-static \
102 linux-solo \
103 linux-solo-x86 \
104 linux-solo-ia64 \
105 linux-sparc \
106 linux-sparc5 \
107 linux-static \
108 linux-ultrasparc \
109 linux-tcc \
110 linux-x86 \
111 linux-x86-debug \
112 linux-x86-32 \
113 linux-x86-64 \
114 linux-x86-64-debug \
115 linux-x86-64-static \
116 linux-x86-xcb \
117 linux-x86-glide \
118 linux-x86-static \
119 netbsd \
120 openbsd \
121 osf1 \
122 solaris-x86 \
123 solaris-x86-gcc \
124 sunos4 \
125 sunos4-gcc \
126 sunos4-static \
127 sunos5 \
128 sunos5-gcc \
129 sunos5-smp \
130 ultrix-gcc:
131 (cd configs && rm -f current && ln -s $@ current)
132 $(MAKE) default
135 # Rules for making release tarballs
137 DIRECTORY = Mesa-6.3.2
138 LIB_NAME = MesaLib-6.3.2
139 DEMO_NAME = MesaDemos-6.3.2
141 MAIN_FILES = \
142 $(DIRECTORY)/Makefile* \
143 $(DIRECTORY)/descrip.mms \
144 $(DIRECTORY)/mms-config. \
145 $(DIRECTORY)/bin/mklib \
146 $(DIRECTORY)/bin/installmesa \
147 $(DIRECTORY)/configs/[a-z]* \
148 $(DIRECTORY)/docs/*.html \
149 $(DIRECTORY)/docs/COPYING \
150 $(DIRECTORY)/docs/README.* \
151 $(DIRECTORY)/docs/RELNOTES* \
152 $(DIRECTORY)/docs/VERSIONS \
153 $(DIRECTORY)/docs/*.spec \
154 $(DIRECTORY)/include/GL/internal/glcore.h \
155 $(DIRECTORY)/include/GL/amesa.h \
156 $(DIRECTORY)/include/GL/dmesa.h \
157 $(DIRECTORY)/include/GL/directfbgl.h \
158 $(DIRECTORY)/include/GL/fxmesa.h \
159 $(DIRECTORY)/include/GL/ggimesa.h \
160 $(DIRECTORY)/include/GL/gl.h \
161 $(DIRECTORY)/include/GL/glext.h \
162 $(DIRECTORY)/include/GL/gl_mangle.h \
163 $(DIRECTORY)/include/GL/glu.h \
164 $(DIRECTORY)/include/GL/glu_mangle.h \
165 $(DIRECTORY)/include/GL/glx.h \
166 $(DIRECTORY)/include/GL/glxext.h \
167 $(DIRECTORY)/include/GL/glx_mangle.h \
168 $(DIRECTORY)/include/GL/mesa_wgl.h \
169 $(DIRECTORY)/include/GL/mglmesa.h \
170 $(DIRECTORY)/include/GL/osmesa.h \
171 $(DIRECTORY)/include/GL/svgamesa.h \
172 $(DIRECTORY)/include/GL/ugl*.h \
173 $(DIRECTORY)/include/GL/vms_x_fix.h \
174 $(DIRECTORY)/include/GL/wmesa.h \
175 $(DIRECTORY)/include/GL/xmesa.h \
176 $(DIRECTORY)/include/GL/xmesa_x.h \
177 $(DIRECTORY)/include/GL/xmesa_xf86.h \
178 $(DIRECTORY)/include/GLView.h \
179 $(DIRECTORY)/src/Makefile \
180 $(DIRECTORY)/src/descrip.mms \
181 $(DIRECTORY)/src/mesa/Makefile* \
182 $(DIRECTORY)/src/mesa/sources \
183 $(DIRECTORY)/src/mesa/descrip.mms \
184 $(DIRECTORY)/src/mesa/depend \
185 $(DIRECTORY)/src/mesa/main/*.[chS] \
186 $(DIRECTORY)/src/mesa/main/descrip.mms \
187 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
188 $(DIRECTORY)/src/mesa/glapi/descrip.mms \
189 $(DIRECTORY)/src/mesa/array_cache/*.[ch] \
190 $(DIRECTORY)/src/mesa/array_cache/descrip.mms \
191 $(DIRECTORY)/src/mesa/math/*.[ch] \
192 $(DIRECTORY)/src/mesa/math/descrip.mms \
193 $(DIRECTORY)/src/mesa/shader/*.[ch] \
194 $(DIRECTORY)/src/mesa/shader/descrip.mms \
195 $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
196 $(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
197 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
198 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
199 $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
200 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
201 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
202 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
203 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
204 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
205 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
206 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
207 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
208 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
209 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
210 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
211 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
212 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
213 $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
214 $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
215 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
216 $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
217 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
218 $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
219 $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
220 $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
221 $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
222 $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
223 $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
224 $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
225 $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
226 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
227 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
228 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
229 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
230 $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
231 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
232 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
233 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
234 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
235 $(DIRECTORY)/src/mesa/ppc/*.[ch] \
236 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
237 $(DIRECTORY)/src/mesa/x86/Makefile \
238 $(DIRECTORY)/src/mesa/x86/*.[ch] \
239 $(DIRECTORY)/src/mesa/x86/*.S \
240 $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
241 $(DIRECTORY)/src/mesa/x86-64/*.[chS] \
242 $(DIRECTORY)/src/mesa/x86-64/Makefile \
243 $(DIRECTORY)/progs/Makefile \
244 $(DIRECTORY)/progs/util/README \
245 $(DIRECTORY)/progs/util/*.[ch] \
246 $(DIRECTORY)/progs/util/sampleMakefile \
247 $(DIRECTORY)/vms/analyze_map.com \
248 $(DIRECTORY)/vms/xlib.opt \
249 $(DIRECTORY)/vms/xlib_share.opt \
250 $(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \
251 $(DIRECTORY)/windows/VC6/mesa/glu/*.txt \
252 $(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \
253 $(DIRECTORY)/windows/VC6/mesa/mesa.dsw \
254 $(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \
255 $(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \
256 $(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \
257 $(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \
258 $(DIRECTORY)/windows/VC7/mesa/mesa.sln \
259 $(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \
260 $(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
262 DRI_FILES = \
263 $(DIRECTORY)/include/GL/internal/*.h \
264 $(DIRECTORY)/src/glx/Makefile \
265 $(DIRECTORY)/src/glx/x11/Makefile \
266 $(DIRECTORY)/src/glx/x11/*.[ch] \
267 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
268 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
269 $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
270 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
271 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
272 $(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
273 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
274 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
275 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
276 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
278 SGI_GLU_FILES = \
279 $(DIRECTORY)/src/glu/Makefile \
280 $(DIRECTORY)/src/glu/descrip.mms \
281 $(DIRECTORY)/src/glu/sgi/Makefile \
282 $(DIRECTORY)/src/glu/sgi/Makefile.win \
283 $(DIRECTORY)/src/glu/sgi/Makefile.DJ \
284 $(DIRECTORY)/src/glu/sgi/glu.def \
285 $(DIRECTORY)/src/glu/sgi/dummy.cc \
286 $(DIRECTORY)/src/glu/sgi/descrip.mms \
287 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
288 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
289 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
290 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
291 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
292 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
293 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
294 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
295 $(DIRECTORY)/src/glu/sgi/libtess/README \
296 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
297 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
298 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
300 MESA_GLU_FILES = \
301 $(DIRECTORY)/src/glu/mesa/README[12] \
302 $(DIRECTORY)/src/glu/mesa/Makefile* \
303 $(DIRECTORY)/src/glu/mesa/descrip.mms \
304 $(DIRECTORY)/src/glu/mesa/mms_depend \
305 $(DIRECTORY)/src/glu/mesa/*.def \
306 $(DIRECTORY)/src/glu/mesa/depend \
307 $(DIRECTORY)/src/glu/mesa/*.[ch]
309 GLW_FILES = \
310 $(DIRECTORY)/src/glw/*.[ch] \
311 $(DIRECTORY)/src/glw/Makefile* \
312 $(DIRECTORY)/src/glw/README \
313 $(DIRECTORY)/src/glw/depend
315 PROG_FILES = \
316 $(DIRECTORY)/progs/beos/*.cpp \
317 $(DIRECTORY)/progs/beos/Makefile \
318 $(DIRECTORY)/progs/images/*.rgb \
319 $(DIRECTORY)/progs/images/*.rgba \
320 $(DIRECTORY)/progs/demos/Makefile* \
321 $(DIRECTORY)/progs/demos/descrip.mms \
322 $(DIRECTORY)/progs/demos/*.[ch] \
323 $(DIRECTORY)/progs/demos/*.cxx \
324 $(DIRECTORY)/progs/demos/*.dat \
325 $(DIRECTORY)/progs/demos/README \
326 $(DIRECTORY)/progs/xdemos/Makefile* \
327 $(DIRECTORY)/progs/xdemos/descrip.mms \
328 $(DIRECTORY)/progs/xdemos/*.[chf] \
329 $(DIRECTORY)/progs/redbook/Makefile* \
330 $(DIRECTORY)/progs/redbook/README \
331 $(DIRECTORY)/progs/redbook/*.[ch] \
332 $(DIRECTORY)/progs/samples/Makefile* \
333 $(DIRECTORY)/progs/samples/README \
334 $(DIRECTORY)/progs/samples/*.c \
335 $(DIRECTORY)/progs/windml/Makefile.ugl \
336 $(DIRECTORY)/progs/windml/*.c \
337 $(DIRECTORY)/progs/windml/*.bmp \
338 $(DIRECTORY)/progs/ggi/*.c \
339 $(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
340 $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
341 $(DIRECTORY)/windows/VC6/progs/progs.dsw \
342 $(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
343 $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj \
344 $(DIRECTORY)/windows/VC7/progs/progs.sln
346 GLUT_FILES = \
347 $(DIRECTORY)/include/GL/glut.h \
348 $(DIRECTORY)/include/GL/glutf90.h \
349 $(DIRECTORY)/src/glut/glx/Makefile* \
350 $(DIRECTORY)/src/glut/glx/depend \
351 $(DIRECTORY)/src/glut/glx/*def \
352 $(DIRECTORY)/src/glut/glx/descrip.mms \
353 $(DIRECTORY)/src/glut/glx/mms_depend \
354 $(DIRECTORY)/src/glut/glx/*.[ch] \
355 $(DIRECTORY)/src/glut/beos/*.[ch] \
356 $(DIRECTORY)/src/glut/beos/*.cpp \
357 $(DIRECTORY)/src/glut/beos/Makefile \
358 $(DIRECTORY)/src/glut/dos/*.[ch] \
359 $(DIRECTORY)/src/glut/dos/Makefile.DJ \
360 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
361 $(DIRECTORY)/src/glut/ggi/*.[ch] \
362 $(DIRECTORY)/src/glut/ggi/Makefile
364 DEPEND_FILES = \
365 $(TOP)/src/mesa/depend \
366 $(TOP)/src/glw/depend \
367 $(TOP)/src/glut/glx/depend \
368 $(TOP)/src/glu/sgi/depend
371 LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
373 DEMO_FILES = $(PROG_FILES) $(GLUT_FILES)
376 # Everything for new a Mesa release:
377 tarballs: rm_depend lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
380 rm_depend:
381 @for dep in $(DEPEND_FILES) ; do \
382 rm -f $$dep ; \
383 touch $$dep ; \
384 done
386 lib_gz:
387 rm -f configs/current ; \
388 cd .. ; \
389 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
390 gzip $(LIB_NAME).tar ; \
391 mv $(LIB_NAME).tar.gz $(DIRECTORY)
393 demo_gz:
394 cd .. ; \
395 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
396 gzip $(DEMO_NAME).tar ; \
397 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
399 lib_bz2:
400 rm -f configs/current ; \
401 cd .. ; \
402 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
403 bzip2 $(LIB_NAME).tar ; \
404 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
406 demo_bz2:
407 cd .. ; \
408 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
409 bzip2 $(DEMO_NAME).tar ; \
410 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
412 lib_zip:
413 rm -f configs/current ; \
414 rm -f $(LIB_NAME).zip ; \
415 cd .. ; \
416 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
417 mv $(LIB_NAME).zip $(DIRECTORY)
419 demo_zip:
420 rm -f $(DEMO_NAME).zip ; \
421 cd .. ; \
422 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
423 mv $(DEMO_NAME).zip $(DIRECTORY)
425 md5:
426 @-md5sum $(LIB_NAME).tar.gz
427 @-md5sum $(LIB_NAME).tar.bz2
428 @-md5sum $(LIB_NAME).zip
429 @-md5sum $(DEMO_NAME).tar.gz
430 @-md5sum $(DEMO_NAME).tar.bz2
431 @-md5sum $(DEMO_NAME).zip