1 # Top-level Mesa makefile
8 default: $(TOP)/configs/current
9 @for dir in $(SUBDIRS) ; do \
10 if [ -d $$dir ] ; then \
11 (cd $$dir && $(MAKE)) || exit 1 ; \
22 -@touch $(TOP)/configs/current
23 -@for dir in $(SUBDIRS) ; do \
24 if [ -d $$dir ] ; then \
25 (cd $$dir && $(MAKE) clean) ; \
28 -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
33 -rm -f $(TOP)/configs/current
34 -rm -f $(TOP)/configs/autoconf
35 -rm -rf autom4te.cache
36 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
37 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
44 @for dir in $(SUBDIRS) ; do \
45 if [ -d $$dir ] ; then \
46 (cd $$dir && $(MAKE) install) || exit 1 ; \
51 .PHONY: default doxygen clean realclean distclean install linux-directfb-install
53 # If there's no current configuration file
54 $(TOP)/configs/current:
57 @echo "Please choose a configuration from the following list:"
58 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
60 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
62 @echo "Or, run './configure' then 'make'"
63 @echo "See './configure --help' for details"
65 @echo "(ignore the following error message)"
69 # Rules to set/install a specific build configuration
79 catamount-osmesa-pgi \
84 darwin-static-x86ppc \
94 hpux11-32-static-nothreads \
125 linux-ia64-icc-static \
130 linux-osmesa-static \
132 linux-osmesa16-static \
150 linux-x86-64-profile \
151 linux-x86-64-static \
161 solaris-x86-gcc-static \
175 @ if test -f configs/current || test -L configs/current ; then \
176 echo "Please run 'make realclean' before changing configs" ; \
179 (cd configs && rm -f current && ln -s $@ current)
183 # Rules for making release tarballs
186 DIRECTORY = Mesa-$(VERSION)
187 LIB_NAME = MesaLib-$(VERSION)
188 DEMO_NAME = MesaDemos-$(VERSION)
189 GLUT_NAME = MesaGLUT-$(VERSION)
192 $(DIRECTORY)/Makefile* \
193 $(DIRECTORY)/configure \
194 $(DIRECTORY)/configure.ac \
195 $(DIRECTORY)/acinclude.m4 \
196 $(DIRECTORY)/aclocal.m4 \
197 $(DIRECTORY)/bin/config.guess \
198 $(DIRECTORY)/bin/config.sub \
199 $(DIRECTORY)/bin/install-sh \
200 $(DIRECTORY)/bin/mklib \
201 $(DIRECTORY)/bin/minstall \
202 $(DIRECTORY)/bin/version.mk \
203 $(DIRECTORY)/configs/[a-z]* \
204 $(DIRECTORY)/docs/*.html \
205 $(DIRECTORY)/docs/COPYING \
206 $(DIRECTORY)/docs/README.* \
207 $(DIRECTORY)/docs/RELNOTES* \
208 $(DIRECTORY)/docs/*.spec \
209 $(DIRECTORY)/include/GL/internal/glcore.h \
210 $(DIRECTORY)/include/GL/dmesa.h \
211 $(DIRECTORY)/include/GL/ggimesa.h \
212 $(DIRECTORY)/include/GL/gl.h \
213 $(DIRECTORY)/include/GL/glext.h \
214 $(DIRECTORY)/include/GL/gl_mangle.h \
215 $(DIRECTORY)/include/GL/glu.h \
216 $(DIRECTORY)/include/GL/glu_mangle.h \
217 $(DIRECTORY)/include/GL/glx.h \
218 $(DIRECTORY)/include/GL/glxext.h \
219 $(DIRECTORY)/include/GL/glx_mangle.h \
220 $(DIRECTORY)/include/GL/glfbdev.h \
221 $(DIRECTORY)/include/GL/mesa_wgl.h \
222 $(DIRECTORY)/include/GL/mglmesa.h \
223 $(DIRECTORY)/include/GL/osmesa.h \
224 $(DIRECTORY)/include/GL/svgamesa.h \
225 $(DIRECTORY)/include/GL/vms_x_fix.h \
226 $(DIRECTORY)/include/GL/wglext.h \
227 $(DIRECTORY)/include/GL/wmesa.h \
228 $(DIRECTORY)/src/Makefile \
229 $(DIRECTORY)/src/mesa/Makefile* \
230 $(DIRECTORY)/src/mesa/sources.mak \
231 $(DIRECTORY)/src/mesa/descrip.mms \
232 $(DIRECTORY)/src/mesa/gl.pc.in \
233 $(DIRECTORY)/src/mesa/osmesa.pc.in \
234 $(DIRECTORY)/src/mesa/depend \
235 $(DIRECTORY)/src/mesa/main/*.[chS] \
236 $(DIRECTORY)/src/mesa/main/descrip.mms \
237 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
238 $(DIRECTORY)/src/mesa/math/*.[ch] \
239 $(DIRECTORY)/src/mesa/math/descrip.mms \
240 $(DIRECTORY)/src/mesa/shader/*.[chly] \
241 $(DIRECTORY)/src/mesa/shader/Makefile \
242 $(DIRECTORY)/src/mesa/shader/descrip.mms \
243 $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
244 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
245 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
246 $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
247 $(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
248 $(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
249 $(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
250 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
251 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
252 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
253 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
254 $(DIRECTORY)/src/mesa/vbo/*.[chS] \
255 $(DIRECTORY)/src/mesa/vbo/descrip.mms \
256 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
257 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
258 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
259 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
260 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
261 $(DIRECTORY)/src/mesa/drivers/Makefile \
262 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
263 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
264 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
265 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
266 $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
267 $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
268 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
269 $(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
270 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
271 $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
272 $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
273 $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
274 $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
275 $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
276 $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
277 $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
278 $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
279 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
280 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
281 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
282 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
283 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
284 $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
285 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
286 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
287 $(DIRECTORY)/src/mesa/drivers/x11/Makefile \
288 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
289 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
290 $(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
291 $(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
292 $(DIRECTORY)/src/mesa/ppc/*.[ch] \
293 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
294 $(DIRECTORY)/src/mesa/x86/Makefile \
295 $(DIRECTORY)/src/mesa/x86/*.[ch] \
296 $(DIRECTORY)/src/mesa/x86/*.S \
297 $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
298 $(DIRECTORY)/src/mesa/x86-64/*.[chS] \
299 $(DIRECTORY)/src/mesa/x86-64/Makefile \
300 $(DIRECTORY)/progs/Makefile \
301 $(DIRECTORY)/progs/util/README \
302 $(DIRECTORY)/progs/util/*.[ch] \
303 $(DIRECTORY)/progs/util/sampleMakefile \
304 $(DIRECTORY)/windows/VC8/
307 $(DIRECTORY)/include/EGL/*.h \
308 $(DIRECTORY)/include/GLES/*.h \
309 $(DIRECTORY)/include/GLES2/*.h \
310 $(DIRECTORY)/src/egl/Makefile \
311 $(DIRECTORY)/src/egl/*/Makefile \
312 $(DIRECTORY)/src/egl/*/*.[ch] \
313 $(DIRECTORY)/src/egl/*/*/Makefile \
314 $(DIRECTORY)/src/egl/*/*/*.[ch] \
317 $(DIRECTORY)/src/mesa/state_tracker/*[ch] \
318 $(DIRECTORY)/src/gallium/Makefile \
319 $(DIRECTORY)/src/gallium/Makefile.template \
320 $(DIRECTORY)/src/gallium/SConscript \
321 $(DIRECTORY)/src/gallium/*/Makefile \
322 $(DIRECTORY)/src/gallium/*/SConscript \
323 $(DIRECTORY)/src/gallium/*/*/Makefile \
324 $(DIRECTORY)/src/gallium/*/*/Makefile.template \
325 $(DIRECTORY)/src/gallium/*/*/SConscript \
326 $(DIRECTORY)/src/gallium/*/*/*.[ch] \
327 $(DIRECTORY)/src/gallium/*/*/*.py \
328 $(DIRECTORY)/src/gallium/*/*/*.csv \
329 $(DIRECTORY)/src/gallium/*/*/*/Makefile \
330 $(DIRECTORY)/src/gallium/*/*/*/SConscript \
331 $(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
332 $(DIRECTORY)/src/gallium/*/*/*/*.py \
333 $(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
334 $(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
338 $(DIRECTORY)/include/GL/internal/dri_interface.h \
339 $(DIRECTORY)/include/GL/internal/glcore.h \
340 $(DIRECTORY)/include/GL/internal/sarea.h \
341 $(DIRECTORY)/src/glx/Makefile \
342 $(DIRECTORY)/src/glx/x11/Makefile \
343 $(DIRECTORY)/src/glx/x11/*.[ch] \
344 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
345 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
346 $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
347 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
348 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
349 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
350 $(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
351 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
352 $(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
353 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
354 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
357 $(DIRECTORY)/src/glu/Makefile \
358 $(DIRECTORY)/src/glu/glu.pc.in \
359 $(DIRECTORY)/src/glu/sgi/Makefile \
360 $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
361 $(DIRECTORY)/src/glu/sgi/Makefile.win \
362 $(DIRECTORY)/src/glu/sgi/glu.def \
363 $(DIRECTORY)/src/glu/sgi/dummy.cc \
364 $(DIRECTORY)/src/glu/sgi/glu.exports \
365 $(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
366 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
367 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
368 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
369 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
370 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
371 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
372 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
373 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
374 $(DIRECTORY)/src/glu/sgi/libtess/README \
375 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
376 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
377 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
380 $(DIRECTORY)/src/glu/mesa/README[12] \
381 $(DIRECTORY)/src/glu/mesa/Makefile* \
382 $(DIRECTORY)/src/glu/mesa/descrip.mms \
383 $(DIRECTORY)/src/glu/mesa/mms_depend \
384 $(DIRECTORY)/src/glu/mesa/*.def \
385 $(DIRECTORY)/src/glu/mesa/depend \
386 $(DIRECTORY)/src/glu/mesa/*.[ch]
389 $(DIRECTORY)/src/glw/*.[ch] \
390 $(DIRECTORY)/src/glw/Makefile* \
391 $(DIRECTORY)/src/glw/README \
392 $(DIRECTORY)/src/glw/glw.pc.in \
393 $(DIRECTORY)/src/glw/depend
396 $(DIRECTORY)/include/GL/glew.h \
397 $(DIRECTORY)/include/GL/glxew.h \
398 $(DIRECTORY)/include/GL/wglew.h \
399 $(DIRECTORY)/src/glew/*.c \
400 $(DIRECTORY)/src/glew/Makefile \
401 $(DIRECTORY)/src/glew/SConscript \
402 $(DIRECTORY)/src/glew/LICENSE.txt
406 $(DIRECTORY)/progs/beos/*.cpp \
407 $(DIRECTORY)/progs/beos/Makefile \
408 $(DIRECTORY)/progs/images/*.rgb \
409 $(DIRECTORY)/progs/images/*.rgba \
410 $(DIRECTORY)/progs/demos/Makefile* \
411 $(DIRECTORY)/progs/demos/descrip.mms \
412 $(DIRECTORY)/progs/demos/*.[ch] \
413 $(DIRECTORY)/progs/demos/*.cxx \
414 $(DIRECTORY)/progs/demos/*.dat \
415 $(DIRECTORY)/progs/demos/README \
416 $(DIRECTORY)/progs/fbdev/Makefile \
417 $(DIRECTORY)/progs/fbdev/glfbdevtest.c \
418 $(DIRECTORY)/progs/objviewer/*.[ch] \
419 $(DIRECTORY)/progs/objviewer/*.obj \
420 $(DIRECTORY)/progs/objviewer/*.mtl \
421 $(DIRECTORY)/progs/objviewer/*.rgb \
422 $(DIRECTORY)/progs/objviewer/Makefile \
423 $(DIRECTORY)/progs/objviewer/README.txt \
424 $(DIRECTORY)/progs/osdemos/Makefile \
425 $(DIRECTORY)/progs/osdemos/*.c \
426 $(DIRECTORY)/progs/xdemos/Makefile* \
427 $(DIRECTORY)/progs/xdemos/*.[chf] \
428 $(DIRECTORY)/progs/redbook/Makefile* \
429 $(DIRECTORY)/progs/redbook/README \
430 $(DIRECTORY)/progs/redbook/*.[ch] \
431 $(DIRECTORY)/progs/samples/Makefile* \
432 $(DIRECTORY)/progs/samples/README \
433 $(DIRECTORY)/progs/samples/*.c \
434 $(DIRECTORY)/progs/glsl/Makefile* \
435 $(DIRECTORY)/progs/glsl/*.c \
436 $(DIRECTORY)/progs/glsl/*.frag \
437 $(DIRECTORY)/progs/glsl/*.vert \
438 $(DIRECTORY)/progs/glsl/*.shtest \
439 $(DIRECTORY)/progs/windml/Makefile.ugl \
440 $(DIRECTORY)/progs/windml/*.c \
441 $(DIRECTORY)/progs/windml/*.bmp \
442 $(DIRECTORY)/progs/ggi/*.c \
443 $(DIRECTORY)/windows/VC7/progs/progs.sln
446 $(DIRECTORY)/include/GL/glut.h \
447 $(DIRECTORY)/include/GL/glutf90.h \
448 $(DIRECTORY)/src/glut/glx/Makefile* \
449 $(DIRECTORY)/src/glut/glx/depend \
450 $(DIRECTORY)/src/glut/glx/glut.pc.in \
451 $(DIRECTORY)/src/glut/glx/*def \
452 $(DIRECTORY)/src/glut/glx/*.[ch] \
453 $(DIRECTORY)/src/glut/beos/*.[ch] \
454 $(DIRECTORY)/src/glut/beos/*.cpp \
455 $(DIRECTORY)/src/glut/beos/Makefile \
456 $(DIRECTORY)/src/glut/dos/*.[ch] \
457 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
458 $(DIRECTORY)/src/glut/ggi/*.[ch] \
459 $(DIRECTORY)/src/glut/ggi/Makefile \
460 $(DIRECTORY)/src/glut/fbdev/Makefile \
461 $(DIRECTORY)/src/glut/fbdev/*[ch] \
462 $(DIRECTORY)/src/glut/mini/*[ch] \
463 $(DIRECTORY)/src/glut/mini/glut.pc.in \
464 $(DIRECTORY)/src/glut/directfb/Makefile \
465 $(DIRECTORY)/src/glut/directfb/NOTES \
466 $(DIRECTORY)/src/glut/directfb/*[ch] \
467 $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
468 $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
471 $(TOP)/src/mesa/depend \
472 $(TOP)/src/glx/x11/depend \
473 $(TOP)/src/glw/depend \
474 $(TOP)/src/glut/glx/depend \
475 $(TOP)/src/glu/sgi/depend
487 # Everything for new a Mesa release:
488 tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
489 lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
492 # Helper for autoconf builds
497 aclocal.m4: configure.ac acinclude.m4
498 $(ACLOCAL) $(ACLOCAL_FLAGS)
499 configure: configure.ac aclocal.m4 acinclude.m4
500 $(AUTOCONF) $(AC_FLAGS)
503 @for dep in $(DEPEND_FILES) ; do \
509 rm -f configs/current
510 rm -f configs/autoconf
514 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
515 gzip $(LIB_NAME).tar ; \
516 mv $(LIB_NAME).tar.gz $(DIRECTORY)
520 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
521 gzip $(DEMO_NAME).tar ; \
522 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
526 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
527 gzip $(GLUT_NAME).tar ; \
528 mv $(GLUT_NAME).tar.gz $(DIRECTORY)
532 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
533 bzip2 $(LIB_NAME).tar ; \
534 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
538 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
539 bzip2 $(DEMO_NAME).tar ; \
540 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
544 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
545 bzip2 $(GLUT_NAME).tar ; \
546 mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
549 rm -f $(LIB_NAME).zip ; \
551 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
552 mv $(LIB_NAME).zip $(DIRECTORY)
555 rm -f $(DEMO_NAME).zip ; \
557 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
558 mv $(DEMO_NAME).zip $(DIRECTORY)
561 rm -f $(GLUT_NAME).zip ; \
563 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
564 mv $(GLUT_NAME).zip $(DIRECTORY)
567 @-md5sum $(LIB_NAME).tar.gz
568 @-md5sum $(LIB_NAME).tar.bz2
569 @-md5sum $(LIB_NAME).zip
570 @-md5sum $(DEMO_NAME).tar.gz
571 @-md5sum $(DEMO_NAME).tar.bz2
572 @-md5sum $(DEMO_NAME).zip
573 @-md5sum $(GLUT_NAME).tar.gz
574 @-md5sum $(GLUT_NAME).tar.bz2
575 @-md5sum $(GLUT_NAME).zip
577 .PHONY: tarballs rm_depend rm_config md5 \
578 lib_gz demo_gz glut_gz \
579 lib_bz2 demo_bz2 glut_bz2 \
580 lib_zip demo_zip glut_zip