Fix the default target to remake readtex.o if needed
[mesa-demos.git] / Makefile
blobdd6e04566f18f393bd4e7ccb9c30b832f9480985
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.5
138 LIB_NAME = MesaLib-6.5
139 DEMO_NAME = MesaDemos-6.5
140 GLUT_NAME = MesaGLUT-6.5
142 MAIN_FILES = \
143 $(DIRECTORY)/Makefile* \
144 $(DIRECTORY)/descrip.mms \
145 $(DIRECTORY)/mms-config. \
146 $(DIRECTORY)/bin/mklib \
147 $(DIRECTORY)/bin/installmesa \
148 $(DIRECTORY)/configs/[a-z]* \
149 $(DIRECTORY)/docs/*.html \
150 $(DIRECTORY)/docs/COPYING \
151 $(DIRECTORY)/docs/README.* \
152 $(DIRECTORY)/docs/RELNOTES* \
153 $(DIRECTORY)/docs/VERSIONS \
154 $(DIRECTORY)/docs/*.spec \
155 $(DIRECTORY)/include/GL/internal/glcore.h \
156 $(DIRECTORY)/include/GL/amesa.h \
157 $(DIRECTORY)/include/GL/dmesa.h \
158 $(DIRECTORY)/include/GL/directfbgl.h \
159 $(DIRECTORY)/include/GL/fxmesa.h \
160 $(DIRECTORY)/include/GL/ggimesa.h \
161 $(DIRECTORY)/include/GL/gl.h \
162 $(DIRECTORY)/include/GL/glext.h \
163 $(DIRECTORY)/include/GL/gl_mangle.h \
164 $(DIRECTORY)/include/GL/glu.h \
165 $(DIRECTORY)/include/GL/glu_mangle.h \
166 $(DIRECTORY)/include/GL/glx.h \
167 $(DIRECTORY)/include/GL/glxext.h \
168 $(DIRECTORY)/include/GL/glx_mangle.h \
169 $(DIRECTORY)/include/GL/mesa_wgl.h \
170 $(DIRECTORY)/include/GL/mglmesa.h \
171 $(DIRECTORY)/include/GL/osmesa.h \
172 $(DIRECTORY)/include/GL/svgamesa.h \
173 $(DIRECTORY)/include/GL/ugl*.h \
174 $(DIRECTORY)/include/GL/vms_x_fix.h \
175 $(DIRECTORY)/include/GL/wmesa.h \
176 $(DIRECTORY)/include/GL/xmesa.h \
177 $(DIRECTORY)/include/GL/xmesa_x.h \
178 $(DIRECTORY)/include/GL/xmesa_xf86.h \
179 $(DIRECTORY)/include/GLView.h \
180 $(DIRECTORY)/src/Makefile \
181 $(DIRECTORY)/src/descrip.mms \
182 $(DIRECTORY)/src/mesa/Makefile* \
183 $(DIRECTORY)/src/mesa/sources \
184 $(DIRECTORY)/src/mesa/descrip.mms \
185 $(DIRECTORY)/src/mesa/depend \
186 $(DIRECTORY)/src/mesa/main/*.[chS] \
187 $(DIRECTORY)/src/mesa/main/descrip.mms \
188 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
189 $(DIRECTORY)/src/mesa/glapi/descrip.mms \
190 $(DIRECTORY)/src/mesa/array_cache/*.[ch] \
191 $(DIRECTORY)/src/mesa/array_cache/descrip.mms \
192 $(DIRECTORY)/src/mesa/math/*.[ch] \
193 $(DIRECTORY)/src/mesa/math/descrip.mms \
194 $(DIRECTORY)/src/mesa/shader/*.[ch] \
195 $(DIRECTORY)/src/mesa/shader/descrip.mms \
196 $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
197 $(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
198 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
199 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
200 $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
201 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
202 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
203 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
204 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
205 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
206 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
207 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
208 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
209 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
210 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
211 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
212 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
213 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
214 $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
215 $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
216 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
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/dri_interface.h \
264 $(DIRECTORY)/include/GL/internal/sarea.h \
265 $(DIRECTORY)/src/glx/Makefile \
266 $(DIRECTORY)/src/glx/x11/Makefile \
267 $(DIRECTORY)/src/glx/x11/*.[ch] \
268 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
269 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
270 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
271 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
272 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
273 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
274 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
275 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
277 SGI_GLU_FILES = \
278 $(DIRECTORY)/src/glu/Makefile \
279 $(DIRECTORY)/src/glu/descrip.mms \
280 $(DIRECTORY)/src/glu/sgi/Makefile \
281 $(DIRECTORY)/src/glu/sgi/Makefile.win \
282 $(DIRECTORY)/src/glu/sgi/Makefile.DJ \
283 $(DIRECTORY)/src/glu/sgi/glu.def \
284 $(DIRECTORY)/src/glu/sgi/dummy.cc \
285 $(DIRECTORY)/src/glu/sgi/descrip.mms \
286 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
287 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
288 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
289 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
290 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
291 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
292 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
293 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
294 $(DIRECTORY)/src/glu/sgi/libtess/README \
295 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
296 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
297 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
299 MESA_GLU_FILES = \
300 $(DIRECTORY)/src/glu/mesa/README[12] \
301 $(DIRECTORY)/src/glu/mesa/Makefile* \
302 $(DIRECTORY)/src/glu/mesa/descrip.mms \
303 $(DIRECTORY)/src/glu/mesa/mms_depend \
304 $(DIRECTORY)/src/glu/mesa/*.def \
305 $(DIRECTORY)/src/glu/mesa/depend \
306 $(DIRECTORY)/src/glu/mesa/*.[ch]
308 GLW_FILES = \
309 $(DIRECTORY)/src/glw/*.[ch] \
310 $(DIRECTORY)/src/glw/Makefile* \
311 $(DIRECTORY)/src/glw/README \
312 $(DIRECTORY)/src/glw/depend
314 DEMO_FILES = \
315 $(DIRECTORY)/progs/beos/*.cpp \
316 $(DIRECTORY)/progs/beos/Makefile \
317 $(DIRECTORY)/progs/images/*.rgb \
318 $(DIRECTORY)/progs/images/*.rgba \
319 $(DIRECTORY)/progs/demos/Makefile* \
320 $(DIRECTORY)/progs/demos/descrip.mms \
321 $(DIRECTORY)/progs/demos/*.[ch] \
322 $(DIRECTORY)/progs/demos/*.cxx \
323 $(DIRECTORY)/progs/demos/*.dat \
324 $(DIRECTORY)/progs/demos/README \
325 $(DIRECTORY)/progs/osdemos/Makefile \
326 $(DIRECTORY)/progs/osdemos/*.c \
327 $(DIRECTORY)/progs/xdemos/Makefile* \
328 $(DIRECTORY)/progs/xdemos/descrip.mms \
329 $(DIRECTORY)/progs/xdemos/*.[chf] \
330 $(DIRECTORY)/progs/redbook/Makefile* \
331 $(DIRECTORY)/progs/redbook/README \
332 $(DIRECTORY)/progs/redbook/*.[ch] \
333 $(DIRECTORY)/progs/samples/Makefile* \
334 $(DIRECTORY)/progs/samples/README \
335 $(DIRECTORY)/progs/samples/*.c \
336 $(DIRECTORY)/progs/windml/Makefile.ugl \
337 $(DIRECTORY)/progs/windml/*.c \
338 $(DIRECTORY)/progs/windml/*.bmp \
339 $(DIRECTORY)/progs/ggi/*.c \
340 $(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
341 $(DIRECTORY)/windows/VC6/progs/progs.dsw \
342 $(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
343 $(DIRECTORY)/windows/VC7/progs/progs.sln
345 GLUT_FILES = \
346 $(DIRECTORY)/include/GL/glut.h \
347 $(DIRECTORY)/include/GL/glutf90.h \
348 $(DIRECTORY)/src/glut/glx/Makefile* \
349 $(DIRECTORY)/src/glut/glx/depend \
350 $(DIRECTORY)/src/glut/glx/*def \
351 $(DIRECTORY)/src/glut/glx/descrip.mms \
352 $(DIRECTORY)/src/glut/glx/mms_depend \
353 $(DIRECTORY)/src/glut/glx/*.[ch] \
354 $(DIRECTORY)/src/glut/beos/*.[ch] \
355 $(DIRECTORY)/src/glut/beos/*.cpp \
356 $(DIRECTORY)/src/glut/beos/Makefile \
357 $(DIRECTORY)/src/glut/dos/*.[ch] \
358 $(DIRECTORY)/src/glut/dos/Makefile.DJ \
359 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
360 $(DIRECTORY)/src/glut/ggi/*.[ch] \
361 $(DIRECTORY)/src/glut/ggi/Makefile \
362 $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
363 $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
365 DEPEND_FILES = \
366 $(TOP)/src/mesa/depend \
367 $(TOP)/src/glw/depend \
368 $(TOP)/src/glut/glx/depend \
369 $(TOP)/src/glu/sgi/depend
372 LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
375 # Everything for new a Mesa release:
376 tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
379 rm_depend:
380 @for dep in $(DEPEND_FILES) ; do \
381 rm -f $$dep ; \
382 touch $$dep ; \
383 done
385 lib_gz:
386 rm -f configs/current ; \
387 cd .. ; \
388 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
389 gzip $(LIB_NAME).tar ; \
390 mv $(LIB_NAME).tar.gz $(DIRECTORY)
392 demo_gz:
393 cd .. ; \
394 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
395 gzip $(DEMO_NAME).tar ; \
396 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
398 glut_gz:
399 cd .. ; \
400 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
401 gzip $(GLUT_NAME).tar ; \
402 mv $(GLUT_NAME).tar.gz $(DIRECTORY)
404 lib_bz2:
405 rm -f configs/current ; \
406 cd .. ; \
407 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
408 bzip2 $(LIB_NAME).tar ; \
409 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
411 demo_bz2:
412 cd .. ; \
413 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
414 bzip2 $(DEMO_NAME).tar ; \
415 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
417 glut_bz2:
418 cd .. ; \
419 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
420 bzip2 $(GLUT_NAME).tar ; \
421 mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
423 lib_zip:
424 rm -f configs/current ; \
425 rm -f $(LIB_NAME).zip ; \
426 cd .. ; \
427 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
428 mv $(LIB_NAME).zip $(DIRECTORY)
430 demo_zip:
431 rm -f $(DEMO_NAME).zip ; \
432 cd .. ; \
433 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
434 mv $(DEMO_NAME).zip $(DIRECTORY)
436 glut_zip:
437 rm -f $(GLUT_NAME).zip ; \
438 cd .. ; \
439 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
440 mv $(GLUT_NAME).zip $(DIRECTORY)
442 md5:
443 @-md5sum $(LIB_NAME).tar.gz
444 @-md5sum $(LIB_NAME).tar.bz2
445 @-md5sum $(LIB_NAME).zip
446 @-md5sum $(DEMO_NAME).tar.gz
447 @-md5sum $(DEMO_NAME).tar.bz2
448 @-md5sum $(DEMO_NAME).zip
449 @-md5sum $(GLUT_NAME).tar.gz
450 @-md5sum $(GLUT_NAME).tar.bz2
451 @-md5sum $(GLUT_NAME).zip