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
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 \
92 hpux11-32-static-nothreads \
122 linux-ia64-icc-static \
129 linux-osmesa-static \
131 linux-osmesa16-static \
146 linux-x86-64-profile \
147 linux-x86-64-static \
156 solaris-x86-gcc-static \
170 @ if test -f configs/current -o -L configs/current; then \
171 if ! cmp configs/$@ configs/current > /dev/null; then \
172 echo "Please run 'make realclean' before changing configs" ; \
176 cd configs && rm -f current && ln -s $@ current ; \
181 # Rules for making release tarballs
184 DIRECTORY = Mesa-$(VERSION)
185 LIB_NAME = MesaLib-$(VERSION)
186 DEMO_NAME = MesaDemos-$(VERSION)
187 GLUT_NAME = MesaGLUT-$(VERSION)
190 $(DIRECTORY)/Makefile* \
191 $(DIRECTORY)/configure \
192 $(DIRECTORY)/configure.ac \
193 $(DIRECTORY)/acinclude.m4 \
194 $(DIRECTORY)/aclocal.m4 \
195 $(DIRECTORY)/bin/config.guess \
196 $(DIRECTORY)/bin/config.sub \
197 $(DIRECTORY)/bin/install-sh \
198 $(DIRECTORY)/bin/mklib \
199 $(DIRECTORY)/bin/minstall \
200 $(DIRECTORY)/bin/version.mk \
201 $(DIRECTORY)/configs/[a-z]* \
202 $(DIRECTORY)/docs/*.html \
203 $(DIRECTORY)/docs/COPYING \
204 $(DIRECTORY)/docs/README.* \
205 $(DIRECTORY)/docs/RELNOTES* \
206 $(DIRECTORY)/docs/*.spec \
207 $(DIRECTORY)/include/GL/internal/glcore.h \
208 $(DIRECTORY)/include/GL/gl.h \
209 $(DIRECTORY)/include/GL/glext.h \
210 $(DIRECTORY)/include/GL/gl_mangle.h \
211 $(DIRECTORY)/include/GL/glu.h \
212 $(DIRECTORY)/include/GL/glu_mangle.h \
213 $(DIRECTORY)/include/GL/glx.h \
214 $(DIRECTORY)/include/GL/glxext.h \
215 $(DIRECTORY)/include/GL/glx_mangle.h \
216 $(DIRECTORY)/include/GL/glfbdev.h \
217 $(DIRECTORY)/include/GL/mesa_wgl.h \
218 $(DIRECTORY)/include/GL/mglmesa.h \
219 $(DIRECTORY)/include/GL/osmesa.h \
220 $(DIRECTORY)/include/GL/vms_x_fix.h \
221 $(DIRECTORY)/include/GL/wglext.h \
222 $(DIRECTORY)/include/GL/wmesa.h \
223 $(DIRECTORY)/include/VG/*.h \
224 $(DIRECTORY)/include/KHR/*.h \
225 $(DIRECTORY)/src/glsl/Makefile \
226 $(DIRECTORY)/src/glsl/Makefile.template \
227 $(DIRECTORY)/src/glsl/SConscript \
228 $(DIRECTORY)/src/glsl/*/Makefile \
229 $(DIRECTORY)/src/glsl/*/*.[ch] \
230 $(DIRECTORY)/src/Makefile \
231 $(DIRECTORY)/src/mesa/Makefile* \
232 $(DIRECTORY)/src/mesa/sources.mak \
233 $(DIRECTORY)/src/mesa/descrip.mms \
234 $(DIRECTORY)/src/mesa/gl.pc.in \
235 $(DIRECTORY)/src/mesa/osmesa.pc.in \
236 $(DIRECTORY)/src/mesa/depend \
237 $(DIRECTORY)/src/mesa/main/*.[chS] \
238 $(DIRECTORY)/src/mesa/main/descrip.mms \
239 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
240 $(DIRECTORY)/src/mesa/math/*.[ch] \
241 $(DIRECTORY)/src/mesa/math/descrip.mms \
242 $(DIRECTORY)/src/mesa/shader/*.[chly] \
243 $(DIRECTORY)/src/mesa/shader/Makefile \
244 $(DIRECTORY)/src/mesa/shader/descrip.mms \
245 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
246 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
247 $(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
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/fbdev/Makefile \
266 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
267 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
268 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
269 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
270 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
271 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
272 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
273 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
274 $(DIRECTORY)/src/mesa/drivers/x11/Makefile \
275 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
276 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
277 $(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
278 $(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
279 $(DIRECTORY)/src/mesa/ppc/*.[ch] \
280 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
281 $(DIRECTORY)/src/mesa/x86/Makefile \
282 $(DIRECTORY)/src/mesa/x86/*.[ch] \
283 $(DIRECTORY)/src/mesa/x86/*.S \
284 $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
285 $(DIRECTORY)/src/mesa/x86-64/*.[chS] \
286 $(DIRECTORY)/src/mesa/x86-64/Makefile \
287 $(DIRECTORY)/progs/Makefile \
288 $(DIRECTORY)/progs/util/README \
289 $(DIRECTORY)/progs/util/*.[ch] \
290 $(DIRECTORY)/progs/util/sampleMakefile \
291 $(DIRECTORY)/windows/VC8/
294 $(DIRECTORY)/include/GLES/*.h \
295 $(DIRECTORY)/include/GLES2/*.h \
296 $(DIRECTORY)/src/mesa/glapi/gen/*.xml \
297 $(DIRECTORY)/src/mesa/glapi/gen/*.py \
298 $(DIRECTORY)/src/mesa/glapi/gen/*.dtd \
299 $(DIRECTORY)/src/mesa/es/glapi/Makefile \
300 $(DIRECTORY)/src/mesa/es/glapi/*.xml \
301 $(DIRECTORY)/src/mesa/es/glapi/*.py \
302 $(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \
303 $(DIRECTORY)/src/mesa/es/main/*.[ch] \
304 $(DIRECTORY)/src/mesa/es/main/*.xml \
305 $(DIRECTORY)/src/mesa/es/main/*.py \
306 $(DIRECTORY)/src/mesa/es/main/*.dtd \
307 $(DIRECTORY)/src/mesa/es/Makefile \
308 $(DIRECTORY)/src/mesa/es/sources.mak \
311 $(DIRECTORY)/include/EGL/*.h \
312 $(DIRECTORY)/src/egl/Makefile \
313 $(DIRECTORY)/src/egl/*/Makefile \
314 $(DIRECTORY)/src/egl/*/Makefile.template \
315 $(DIRECTORY)/src/egl/*/*.[ch] \
316 $(DIRECTORY)/src/egl/*/*/Makefile \
317 $(DIRECTORY)/src/egl/*/*/*.[ch] \
320 $(DIRECTORY)/src/mesa/state_tracker/*[ch] \
321 $(DIRECTORY)/src/gallium/Makefile \
322 $(DIRECTORY)/src/gallium/Makefile.template \
323 $(DIRECTORY)/src/gallium/SConscript \
324 $(DIRECTORY)/src/gallium/*/Makefile \
325 $(DIRECTORY)/src/gallium/*/SConscript \
326 $(DIRECTORY)/src/gallium/*/*/Makefile \
327 $(DIRECTORY)/src/gallium/*/*/Makefile.template \
328 $(DIRECTORY)/src/gallium/*/*/SConscript \
329 $(DIRECTORY)/src/gallium/*/*/*.[ch] \
330 $(DIRECTORY)/src/gallium/*/*/*.py \
331 $(DIRECTORY)/src/gallium/*/*/*.csv \
332 $(DIRECTORY)/src/gallium/*/*/*/Makefile \
333 $(DIRECTORY)/src/gallium/*/*/*/SConscript \
334 $(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
335 $(DIRECTORY)/src/gallium/*/*/*/*.py \
336 $(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
337 $(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
341 $(DIRECTORY)/include/GL/internal/dri_interface.h \
342 $(DIRECTORY)/include/GL/internal/glcore.h \
343 $(DIRECTORY)/include/GL/internal/sarea.h \
344 $(DIRECTORY)/src/glx/Makefile \
345 $(DIRECTORY)/src/glx/Makefile \
346 $(DIRECTORY)/src/glx/*.[ch] \
347 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
348 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
349 $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
350 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
351 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
352 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
353 $(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
354 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
355 $(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
356 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
357 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
360 $(DIRECTORY)/src/glu/Makefile \
361 $(DIRECTORY)/src/glu/glu.pc.in \
362 $(DIRECTORY)/src/glu/sgi/Makefile \
363 $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
364 $(DIRECTORY)/src/glu/sgi/Makefile.win \
365 $(DIRECTORY)/src/glu/sgi/glu.def \
366 $(DIRECTORY)/src/glu/sgi/dummy.cc \
367 $(DIRECTORY)/src/glu/sgi/glu.exports \
368 $(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
369 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
370 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
371 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
372 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
373 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
374 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
375 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
376 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
377 $(DIRECTORY)/src/glu/sgi/libtess/README \
378 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
379 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
380 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
383 $(DIRECTORY)/src/glw/*.[ch] \
384 $(DIRECTORY)/src/glw/Makefile* \
385 $(DIRECTORY)/src/glw/README \
386 $(DIRECTORY)/src/glw/glw.pc.in \
387 $(DIRECTORY)/src/glw/depend
390 $(DIRECTORY)/include/GL/glew.h \
391 $(DIRECTORY)/include/GL/glxew.h \
392 $(DIRECTORY)/include/GL/wglew.h \
393 $(DIRECTORY)/src/glew/*.c \
394 $(DIRECTORY)/src/glew/Makefile \
395 $(DIRECTORY)/src/glew/SConscript \
396 $(DIRECTORY)/src/glew/LICENSE.txt
400 $(DIRECTORY)/progs/beos/*.cpp \
401 $(DIRECTORY)/progs/beos/Makefile \
402 $(DIRECTORY)/progs/images/*.rgb \
403 $(DIRECTORY)/progs/images/*.rgba \
404 $(DIRECTORY)/progs/demos/Makefile* \
405 $(DIRECTORY)/progs/demos/descrip.mms \
406 $(DIRECTORY)/progs/demos/*.[ch] \
407 $(DIRECTORY)/progs/demos/*.cxx \
408 $(DIRECTORY)/progs/demos/*.dat \
409 $(DIRECTORY)/progs/demos/README \
410 $(DIRECTORY)/progs/fbdev/Makefile \
411 $(DIRECTORY)/progs/fbdev/glfbdevtest.c \
412 $(DIRECTORY)/progs/objviewer/*.[ch] \
413 $(DIRECTORY)/progs/objviewer/*.obj \
414 $(DIRECTORY)/progs/objviewer/*.mtl \
415 $(DIRECTORY)/progs/objviewer/*.rgb \
416 $(DIRECTORY)/progs/objviewer/Makefile \
417 $(DIRECTORY)/progs/objviewer/README.txt \
418 $(DIRECTORY)/progs/osdemos/Makefile \
419 $(DIRECTORY)/progs/osdemos/*.c \
420 $(DIRECTORY)/progs/xdemos/Makefile* \
421 $(DIRECTORY)/progs/xdemos/*.[chf] \
422 $(DIRECTORY)/progs/redbook/Makefile* \
423 $(DIRECTORY)/progs/redbook/README \
424 $(DIRECTORY)/progs/redbook/*.[ch] \
425 $(DIRECTORY)/progs/samples/Makefile* \
426 $(DIRECTORY)/progs/samples/README \
427 $(DIRECTORY)/progs/samples/*.c \
428 $(DIRECTORY)/progs/glsl/Makefile* \
429 $(DIRECTORY)/progs/glsl/*.c \
430 $(DIRECTORY)/progs/glsl/*.frag \
431 $(DIRECTORY)/progs/glsl/*.vert \
432 $(DIRECTORY)/progs/glsl/*.shtest
435 $(DIRECTORY)/include/GL/glut.h \
436 $(DIRECTORY)/include/GL/glutf90.h \
437 $(DIRECTORY)/src/glut/glx/Makefile* \
438 $(DIRECTORY)/src/glut/glx/depend \
439 $(DIRECTORY)/src/glut/glx/glut.pc.in \
440 $(DIRECTORY)/src/glut/glx/*def \
441 $(DIRECTORY)/src/glut/glx/*.[ch] \
442 $(DIRECTORY)/src/glut/beos/*.[ch] \
443 $(DIRECTORY)/src/glut/beos/*.cpp \
444 $(DIRECTORY)/src/glut/beos/Makefile
447 $(TOP)/src/mesa/depend \
448 $(TOP)/src/glx/depend \
449 $(TOP)/src/glw/depend \
450 $(TOP)/src/glut/glx/depend \
451 $(TOP)/src/glu/sgi/depend
464 # Everything for new a Mesa release:
465 tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
466 lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
469 # Helper for autoconf builds
474 aclocal.m4: configure.ac acinclude.m4
475 $(ACLOCAL) $(ACLOCAL_FLAGS)
476 configure: configure.ac aclocal.m4 acinclude.m4
477 $(AUTOCONF) $(AC_FLAGS)
480 @for dep in $(DEPEND_FILES) ; do \
486 rm -f configs/current
487 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)
509 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
510 bzip2 $(LIB_NAME).tar ; \
511 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
515 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
516 bzip2 $(DEMO_NAME).tar ; \
517 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
521 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
522 bzip2 $(GLUT_NAME).tar ; \
523 mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
526 rm -f $(LIB_NAME).zip ; \
528 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
529 mv $(LIB_NAME).zip $(DIRECTORY)
532 rm -f $(DEMO_NAME).zip ; \
534 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
535 mv $(DEMO_NAME).zip $(DIRECTORY)
538 rm -f $(GLUT_NAME).zip ; \
540 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
541 mv $(GLUT_NAME).zip $(DIRECTORY)
544 @-md5sum $(LIB_NAME).tar.gz
545 @-md5sum $(LIB_NAME).tar.bz2
546 @-md5sum $(LIB_NAME).zip
547 @-md5sum $(DEMO_NAME).tar.gz
548 @-md5sum $(DEMO_NAME).tar.bz2
549 @-md5sum $(DEMO_NAME).zip
550 @-md5sum $(GLUT_NAME).tar.gz
551 @-md5sum $(GLUT_NAME).tar.bz2
552 @-md5sum $(GLUT_NAME).zip
554 .PHONY: tarballs rm_depend rm_config md5 \
555 lib_gz demo_gz glut_gz \
556 lib_bz2 demo_bz2 glut_bz2 \
557 lib_zip demo_zip glut_zip