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/*.[ch] \
241 $(DIRECTORY)/src/mesa/shader/descrip.mms \
242 $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
243 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
244 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
245 $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
246 $(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
247 $(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
248 $(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
249 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
250 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
251 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
252 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
253 $(DIRECTORY)/src/mesa/vbo/*.[chS] \
254 $(DIRECTORY)/src/mesa/vbo/descrip.mms \
255 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
256 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
257 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
258 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
259 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
260 $(DIRECTORY)/src/mesa/drivers/Makefile \
261 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
262 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
263 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
264 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
265 $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
266 $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
267 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
268 $(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
269 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
270 $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
271 $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
272 $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
273 $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
274 $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
275 $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
276 $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
277 $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
278 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
279 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
280 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
281 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
282 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
283 $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
284 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
285 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
286 $(DIRECTORY)/src/mesa/drivers/x11/Makefile \
287 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
288 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
289 $(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
290 $(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
291 $(DIRECTORY)/src/mesa/ppc/*.[ch] \
292 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
293 $(DIRECTORY)/src/mesa/x86/Makefile \
294 $(DIRECTORY)/src/mesa/x86/*.[ch] \
295 $(DIRECTORY)/src/mesa/x86/*.S \
296 $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
297 $(DIRECTORY)/src/mesa/x86-64/*.[chS] \
298 $(DIRECTORY)/src/mesa/x86-64/Makefile \
299 $(DIRECTORY)/progs/Makefile \
300 $(DIRECTORY)/progs/util/README \
301 $(DIRECTORY)/progs/util/*.[ch] \
302 $(DIRECTORY)/progs/util/sampleMakefile \
303 $(DIRECTORY)/windows/VC8/
306 $(DIRECTORY)/include/EGL/*.h \
307 $(DIRECTORY)/include/GLES/*.h \
308 $(DIRECTORY)/include/GLES2/*.h \
309 $(DIRECTORY)/src/egl/Makefile \
310 $(DIRECTORY)/src/egl/*/Makefile \
311 $(DIRECTORY)/src/egl/*/*.[ch] \
312 $(DIRECTORY)/src/egl/*/*/Makefile \
313 $(DIRECTORY)/src/egl/*/*/*.[ch] \
316 $(DIRECTORY)/src/mesa/state_tracker/*[ch] \
317 $(DIRECTORY)/src/gallium/Makefile \
318 $(DIRECTORY)/src/gallium/Makefile.template \
319 $(DIRECTORY)/src/gallium/SConscript \
320 $(DIRECTORY)/src/gallium/*/Makefile \
321 $(DIRECTORY)/src/gallium/*/SConscript \
322 $(DIRECTORY)/src/gallium/*/*/Makefile \
323 $(DIRECTORY)/src/gallium/*/*/Makefile.template \
324 $(DIRECTORY)/src/gallium/*/*/SConscript \
325 $(DIRECTORY)/src/gallium/*/*/*.[ch] \
326 $(DIRECTORY)/src/gallium/*/*/*.py \
327 $(DIRECTORY)/src/gallium/*/*/*/Makefile \
328 $(DIRECTORY)/src/gallium/*/*/*/SConscript \
329 $(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
330 $(DIRECTORY)/src/gallium/*/*/*/*.py \
331 $(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
332 $(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
336 $(DIRECTORY)/include/GL/internal/dri_interface.h \
337 $(DIRECTORY)/include/GL/internal/glcore.h \
338 $(DIRECTORY)/include/GL/internal/sarea.h \
339 $(DIRECTORY)/src/glx/Makefile \
340 $(DIRECTORY)/src/glx/x11/Makefile \
341 $(DIRECTORY)/src/glx/x11/*.[ch] \
342 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
343 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
344 $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
345 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
346 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
347 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
348 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
349 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
350 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
353 $(DIRECTORY)/src/glu/Makefile \
354 $(DIRECTORY)/src/glu/glu.pc.in \
355 $(DIRECTORY)/src/glu/sgi/Makefile \
356 $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
357 $(DIRECTORY)/src/glu/sgi/Makefile.win \
358 $(DIRECTORY)/src/glu/sgi/glu.def \
359 $(DIRECTORY)/src/glu/sgi/dummy.cc \
360 $(DIRECTORY)/src/glu/sgi/glu.exports \
361 $(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
362 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
363 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
364 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
365 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
366 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
367 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
368 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
369 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
370 $(DIRECTORY)/src/glu/sgi/libtess/README \
371 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
372 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
373 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
376 $(DIRECTORY)/src/glu/mesa/README[12] \
377 $(DIRECTORY)/src/glu/mesa/Makefile* \
378 $(DIRECTORY)/src/glu/mesa/descrip.mms \
379 $(DIRECTORY)/src/glu/mesa/mms_depend \
380 $(DIRECTORY)/src/glu/mesa/*.def \
381 $(DIRECTORY)/src/glu/mesa/depend \
382 $(DIRECTORY)/src/glu/mesa/*.[ch]
385 $(DIRECTORY)/src/glw/*.[ch] \
386 $(DIRECTORY)/src/glw/Makefile* \
387 $(DIRECTORY)/src/glw/README \
388 $(DIRECTORY)/src/glw/glw.pc.in \
389 $(DIRECTORY)/src/glw/depend
392 $(DIRECTORY)/progs/beos/*.cpp \
393 $(DIRECTORY)/progs/beos/Makefile \
394 $(DIRECTORY)/progs/images/*.rgb \
395 $(DIRECTORY)/progs/images/*.rgba \
396 $(DIRECTORY)/progs/demos/Makefile* \
397 $(DIRECTORY)/progs/demos/descrip.mms \
398 $(DIRECTORY)/progs/demos/*.[ch] \
399 $(DIRECTORY)/progs/demos/*.cxx \
400 $(DIRECTORY)/progs/demos/*.dat \
401 $(DIRECTORY)/progs/demos/README \
402 $(DIRECTORY)/progs/fbdev/Makefile \
403 $(DIRECTORY)/progs/fbdev/glfbdevtest.c \
404 $(DIRECTORY)/progs/osdemos/Makefile \
405 $(DIRECTORY)/progs/osdemos/*.c \
406 $(DIRECTORY)/progs/xdemos/Makefile* \
407 $(DIRECTORY)/progs/xdemos/*.[chf] \
408 $(DIRECTORY)/progs/redbook/Makefile* \
409 $(DIRECTORY)/progs/redbook/README \
410 $(DIRECTORY)/progs/redbook/*.[ch] \
411 $(DIRECTORY)/progs/samples/Makefile* \
412 $(DIRECTORY)/progs/samples/README \
413 $(DIRECTORY)/progs/samples/*.c \
414 $(DIRECTORY)/progs/glsl/Makefile* \
415 $(DIRECTORY)/progs/glsl/*.c \
416 $(DIRECTORY)/progs/glsl/*.frag \
417 $(DIRECTORY)/progs/glsl/*.vert \
418 $(DIRECTORY)/progs/windml/Makefile.ugl \
419 $(DIRECTORY)/progs/windml/*.c \
420 $(DIRECTORY)/progs/windml/*.bmp \
421 $(DIRECTORY)/progs/ggi/*.c \
422 $(DIRECTORY)/windows/VC7/progs/progs.sln
425 $(DIRECTORY)/include/GL/glut.h \
426 $(DIRECTORY)/include/GL/glutf90.h \
427 $(DIRECTORY)/src/glut/glx/Makefile* \
428 $(DIRECTORY)/src/glut/glx/depend \
429 $(DIRECTORY)/src/glut/glx/glut.pc.in \
430 $(DIRECTORY)/src/glut/glx/*def \
431 $(DIRECTORY)/src/glut/glx/*.[ch] \
432 $(DIRECTORY)/src/glut/beos/*.[ch] \
433 $(DIRECTORY)/src/glut/beos/*.cpp \
434 $(DIRECTORY)/src/glut/beos/Makefile \
435 $(DIRECTORY)/src/glut/dos/*.[ch] \
436 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
437 $(DIRECTORY)/src/glut/ggi/*.[ch] \
438 $(DIRECTORY)/src/glut/ggi/Makefile \
439 $(DIRECTORY)/src/glut/fbdev/Makefile \
440 $(DIRECTORY)/src/glut/fbdev/*[ch] \
441 $(DIRECTORY)/src/glut/mini/*[ch] \
442 $(DIRECTORY)/src/glut/mini/glut.pc.in \
443 $(DIRECTORY)/src/glut/directfb/Makefile \
444 $(DIRECTORY)/src/glut/directfb/NOTES \
445 $(DIRECTORY)/src/glut/directfb/*[ch] \
446 $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
447 $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
450 $(TOP)/src/mesa/depend \
451 $(TOP)/src/glx/x11/depend \
452 $(TOP)/src/glw/depend \
453 $(TOP)/src/glut/glx/depend \
454 $(TOP)/src/glu/sgi/depend
466 # Everything for new a Mesa release:
467 tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
468 lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
471 # Helper for autoconf builds
476 aclocal.m4: configure.ac acinclude.m4
477 $(ACLOCAL) $(ACLOCAL_FLAGS)
478 configure: configure.ac aclocal.m4 acinclude.m4
479 $(AUTOCONF) $(AC_FLAGS)
482 @for dep in $(DEPEND_FILES) ; do \
488 rm -f configs/current ; \
489 rm -f configs/autoconf ; \
491 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
492 gzip $(LIB_NAME).tar ; \
493 mv $(LIB_NAME).tar.gz $(DIRECTORY)
497 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
498 gzip $(DEMO_NAME).tar ; \
499 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
503 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
504 gzip $(GLUT_NAME).tar ; \
505 mv $(GLUT_NAME).tar.gz $(DIRECTORY)
508 rm -f configs/current ; \
509 rm -f configs/autoconf ; \
511 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
512 bzip2 $(LIB_NAME).tar ; \
513 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
517 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
518 bzip2 $(DEMO_NAME).tar ; \
519 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
523 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
524 bzip2 $(GLUT_NAME).tar ; \
525 mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
528 rm -f configs/current ; \
529 rm -f configs/autoconf ; \
530 rm -f $(LIB_NAME).zip ; \
532 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
533 mv $(LIB_NAME).zip $(DIRECTORY)
536 rm -f $(DEMO_NAME).zip ; \
538 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
539 mv $(DEMO_NAME).zip $(DIRECTORY)
542 rm -f $(GLUT_NAME).zip ; \
544 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
545 mv $(GLUT_NAME).zip $(DIRECTORY)
548 @-md5sum $(LIB_NAME).tar.gz
549 @-md5sum $(LIB_NAME).tar.bz2
550 @-md5sum $(LIB_NAME).zip
551 @-md5sum $(DEMO_NAME).tar.gz
552 @-md5sum $(DEMO_NAME).tar.bz2
553 @-md5sum $(DEMO_NAME).zip
554 @-md5sum $(GLUT_NAME).tar.gz
555 @-md5sum $(GLUT_NAME).tar.bz2
556 @-md5sum $(GLUT_NAME).zip
558 .PHONY: tarballs rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 \
559 glut_bz2 lib_zip demo_zip glut_zip md5