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 GLUT_NAME = MesaGLUT-$(VERSION)
188 # This is part of MAIN_FILES
190 $(DIRECTORY)/src/mesa/main/*.xml \
191 $(DIRECTORY)/src/mesa/main/*.py \
192 $(DIRECTORY)/src/mesa/main/*.dtd
195 $(DIRECTORY)/Makefile* \
196 $(DIRECTORY)/configure \
197 $(DIRECTORY)/configure.ac \
198 $(DIRECTORY)/acinclude.m4 \
199 $(DIRECTORY)/aclocal.m4 \
200 $(DIRECTORY)/bin/config.guess \
201 $(DIRECTORY)/bin/config.sub \
202 $(DIRECTORY)/bin/install-sh \
203 $(DIRECTORY)/bin/mklib \
204 $(DIRECTORY)/bin/minstall \
205 $(DIRECTORY)/bin/version.mk \
206 $(DIRECTORY)/configs/[a-z]* \
207 $(DIRECTORY)/docs/*.html \
208 $(DIRECTORY)/docs/COPYING \
209 $(DIRECTORY)/docs/README.* \
210 $(DIRECTORY)/docs/RELNOTES* \
211 $(DIRECTORY)/docs/*.spec \
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/osmesa.h \
223 $(DIRECTORY)/include/GL/vms_x_fix.h \
224 $(DIRECTORY)/include/GL/wglext.h \
225 $(DIRECTORY)/include/GL/wmesa.h \
226 $(DIRECTORY)/src/glsl/Makefile \
227 $(DIRECTORY)/src/glsl/Makefile.template \
228 $(DIRECTORY)/src/glsl/SConscript \
229 $(DIRECTORY)/src/glsl/*.[ch] \
230 $(DIRECTORY)/src/glsl/*.[cly]pp \
231 $(DIRECTORY)/src/glsl/README \
232 $(DIRECTORY)/src/glsl/glcpp/*.[chly] \
233 $(DIRECTORY)/src/glsl/glcpp/README \
234 $(DIRECTORY)/src/glsl/builtins \
235 $(DIRECTORY)/src/Makefile \
236 $(DIRECTORY)/src/mesa/Makefile* \
237 $(DIRECTORY)/src/mesa/sources.mak \
238 $(DIRECTORY)/src/mesa/descrip.mms \
239 $(DIRECTORY)/src/mesa/gl.pc.in \
240 $(DIRECTORY)/src/mesa/osmesa.pc.in \
241 $(DIRECTORY)/src/mesa/depend \
243 $(DIRECTORY)/src/mesa/main/*.[chS] \
244 $(DIRECTORY)/src/mesa/main/descrip.mms \
245 $(DIRECTORY)/src/mesa/math/*.[ch] \
246 $(DIRECTORY)/src/mesa/math/descrip.mms \
247 $(DIRECTORY)/src/mesa/program/*.[chly] \
248 $(DIRECTORY)/src/mesa/program/*.cpp \
249 $(DIRECTORY)/src/mesa/program/Makefile \
250 $(DIRECTORY)/src/mesa/program/descrip.mms \
251 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
252 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
253 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
254 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
255 $(DIRECTORY)/src/mesa/vbo/*.[chS] \
256 $(DIRECTORY)/src/mesa/vbo/descrip.mms \
257 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
258 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
259 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
260 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
261 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
262 $(DIRECTORY)/src/mesa/drivers/Makefile \
263 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
264 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
265 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
266 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
267 $(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
268 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
269 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
270 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
271 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
272 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
273 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
274 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
275 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
276 $(DIRECTORY)/src/mesa/drivers/x11/Makefile \
277 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
278 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
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
289 $(DIRECTORY)/include/GLES/*.h \
290 $(DIRECTORY)/include/GLES2/*.h \
291 $(DIRECTORY)/include/VG/*.h \
292 $(DIRECTORY)/src/mapi/es?api/Makefile \
293 $(DIRECTORY)/src/mapi/es?api/*.pc.in \
294 $(DIRECTORY)/src/mapi/glapi/gen/Makefile \
295 $(DIRECTORY)/src/mapi/glapi/gen/*.xml \
296 $(DIRECTORY)/src/mapi/glapi/gen/*.py \
297 $(DIRECTORY)/src/mapi/glapi/gen/*.dtd \
298 $(DIRECTORY)/src/mapi/glapi/gen-es/Makefile \
299 $(DIRECTORY)/src/mapi/glapi/gen-es/*.xml \
300 $(DIRECTORY)/src/mapi/glapi/gen-es/*.py \
301 $(DIRECTORY)/src/mapi/glapi/Makefile \
302 $(DIRECTORY)/src/mapi/glapi/SConscript \
303 $(DIRECTORY)/src/mapi/glapi/sources.mak \
304 $(DIRECTORY)/src/mapi/glapi/*.[chS] \
305 $(DIRECTORY)/src/mapi/mapi/mapi_abi.py \
306 $(DIRECTORY)/src/mapi/mapi/sources.mak \
307 $(DIRECTORY)/src/mapi/mapi/*.[ch] \
308 $(DIRECTORY)/src/mapi/vgapi/Makefile \
309 $(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
310 $(DIRECTORY)/src/mapi/vgapi/vg.pc.in
313 $(DIRECTORY)/include/KHR/*.h \
314 $(DIRECTORY)/include/EGL/*.h \
315 $(DIRECTORY)/src/egl/Makefile \
316 $(DIRECTORY)/src/egl/*/Makefile \
317 $(DIRECTORY)/src/egl/*/Makefile.template \
318 $(DIRECTORY)/src/egl/*/*.[ch] \
319 $(DIRECTORY)/src/egl/*/*/Makefile \
320 $(DIRECTORY)/src/egl/*/*/*.[ch] \
321 $(DIRECTORY)/src/egl/main/*.pc.in \
322 $(DIRECTORY)/src/egl/main/*.def
325 $(DIRECTORY)/src/mesa/state_tracker/*[ch] \
326 $(DIRECTORY)/src/gallium/Makefile \
327 $(DIRECTORY)/src/gallium/Makefile.template \
328 $(DIRECTORY)/src/gallium/SConscript \
329 $(DIRECTORY)/src/gallium/targets/Makefile.dri \
330 $(DIRECTORY)/src/gallium/targets/Makefile.xorg \
331 $(DIRECTORY)/src/gallium/targets/SConscript.dri \
332 $(DIRECTORY)/src/gallium/*/Makefile \
333 $(DIRECTORY)/src/gallium/*/SConscript \
334 $(DIRECTORY)/src/gallium/*/*/Makefile \
335 $(DIRECTORY)/src/gallium/*/*/SConscript \
336 $(DIRECTORY)/src/gallium/*/*/*.[ch] \
337 $(DIRECTORY)/src/gallium/auxiliary/gallivm/*.cpp \
338 $(DIRECTORY)/src/gallium/*/*/*.py \
339 $(DIRECTORY)/src/gallium/*/*/*.csv \
340 $(DIRECTORY)/src/gallium/*/*/*/Makefile \
341 $(DIRECTORY)/src/gallium/*/*/*/SConscript \
342 $(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
343 $(DIRECTORY)/src/gallium/*/*/*/*.py
347 $(DIRECTORY)/include/GL/internal/dri_interface.h \
348 $(DIRECTORY)/include/GL/internal/sarea.h \
349 $(DIRECTORY)/src/glx/Makefile \
350 $(DIRECTORY)/src/glx/*.[ch] \
351 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
352 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
353 $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
354 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
355 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
356 $(DIRECTORY)/src/mesa/drivers/dri/*/*.cpp \
357 $(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
358 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
359 $(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
360 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile
363 $(DIRECTORY)/src/glu/Makefile \
364 $(DIRECTORY)/src/glu/glu.pc.in \
365 $(DIRECTORY)/src/glu/sgi/Makefile \
366 $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
367 $(DIRECTORY)/src/glu/sgi/Makefile.win \
368 $(DIRECTORY)/src/glu/sgi/glu.def \
369 $(DIRECTORY)/src/glu/sgi/dummy.cc \
370 $(DIRECTORY)/src/glu/sgi/glu.exports \
371 $(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
372 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
373 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
374 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
375 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
376 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
377 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
378 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
379 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
380 $(DIRECTORY)/src/glu/sgi/libtess/README \
381 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
382 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
383 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
386 $(DIRECTORY)/src/glw/*.[ch] \
387 $(DIRECTORY)/src/glw/Makefile* \
388 $(DIRECTORY)/src/glw/README \
389 $(DIRECTORY)/src/glw/glw.pc.in \
390 $(DIRECTORY)/src/glw/depend
393 $(DIRECTORY)/include/GL/glut.h \
394 $(DIRECTORY)/include/GL/glutf90.h \
395 $(DIRECTORY)/src/glut/glx/Makefile* \
396 $(DIRECTORY)/src/glut/glx/depend \
397 $(DIRECTORY)/src/glut/glx/glut.pc.in \
398 $(DIRECTORY)/src/glut/glx/*def \
399 $(DIRECTORY)/src/glut/glx/*.[ch] \
400 $(DIRECTORY)/src/glut/beos/*.[ch] \
401 $(DIRECTORY)/src/glut/beos/*.cpp \
402 $(DIRECTORY)/src/glut/beos/Makefile
405 $(TOP)/src/mesa/depend \
406 $(TOP)/src/glx/depend \
407 $(TOP)/src/glw/depend \
408 $(TOP)/src/glut/glx/depend \
409 $(TOP)/src/glu/sgi/depend
423 # Everything for new a Mesa release:
424 ARCHIVES = $(LIB_NAME).tar.gz \
425 $(LIB_NAME).tar.bz2 \
427 $(GLUT_NAME).tar.gz \
428 $(GLUT_NAME).tar.bz2 \
431 tarballs: rm_depend configure aclocal.m4 md5
432 rm -f ../$(LIB_NAME).tar
434 # Helper for autoconf builds
439 aclocal.m4: configure.ac acinclude.m4
440 $(ACLOCAL) $(ACLOCAL_FLAGS)
441 configure: configure.ac aclocal.m4 acinclude.m4
442 $(AUTOCONF) $(AC_FLAGS)
445 @for dep in $(DEPEND_FILES) ; do \
451 rm -f configs/current
452 rm -f configs/autoconf
454 $(LIB_NAME).tar: rm_config
455 cd .. ; tar -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
457 $(LIB_NAME).tar.gz: $(LIB_NAME).tar
458 gzip --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.gz
461 cd .. ; tar -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
463 $(GLUT_NAME).tar.gz: $(GLUT_NAME).tar
464 gzip --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.gz
466 $(LIB_NAME).tar.bz2: $(LIB_NAME).tar
467 bzip2 --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.bz2
469 $(GLUT_NAME).tar.bz2: $(GLUT_NAME).tar
470 bzip2 --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.bz2
472 $(LIB_NAME).zip: rm_config
473 rm -f $(LIB_NAME).zip ; \
475 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
476 mv $(LIB_NAME).zip $(DIRECTORY)
479 rm -f $(GLUT_NAME).zip ; \
481 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
482 mv $(GLUT_NAME).zip $(DIRECTORY)
485 @-md5sum $(LIB_NAME).tar.gz
486 @-md5sum $(LIB_NAME).tar.bz2
487 @-md5sum $(LIB_NAME).zip
488 @-md5sum $(GLUT_NAME).tar.gz
489 @-md5sum $(GLUT_NAME).tar.bz2
490 @-md5sum $(GLUT_NAME).zip
492 .PHONY: tarballs rm_depend rm_config md5