blob: 864ee980b779dfdba04d4a2628f755a90f90c3e3 [file] [log] [blame]
Brian Paulde0ee312004-03-26 15:19:11 +00001# Top-level Mesa makefile
2
3TOP = .
4
5SUBDIRS = src progs
6
7
8default: $(TOP)/configs/current
9 @for dir in $(SUBDIRS) ; do \
Eric Anholt2fb5d152004-06-01 00:06:14 +000010 (cd $$dir ; $(MAKE)) || exit 1 ; \
Brian Paulde0ee312004-03-26 15:19:11 +000011 done
12
13
Brian Paul6d50d912004-07-01 15:32:51 +000014doxygen:
15 (cd doxygen ; make) ; \
16
Brian Paulde0ee312004-03-26 15:19:11 +000017clean:
18 @for dir in $(SUBDIRS) ; do \
Eric Anholt2fb5d152004-06-01 00:06:14 +000019 (cd $$dir ; $(MAKE) clean) ; \
Brian Paulde0ee312004-03-26 15:19:11 +000020 done
21
22
Brian Paul46727c72004-03-26 20:31:05 +000023realclean:
24 touch $(TOP)/configs/current
Eric Anholt2fb5d152004-06-01 00:06:14 +000025 $(MAKE) clean
Brian Paulde0ee312004-03-26 15:19:11 +000026 -rm -rf lib*
27 -rm -f $(TOP)/configs/current
28
29
30install:
31 @echo "Installing"
32 $(TOP)/bin/installmesa
33
34# If there's no current configuration file
35$(TOP)/configs/current:
36 @echo
37 @echo
38 @echo "Please choose a configuration from the following list:"
Brian Paul22388c12004-03-26 15:31:44 +000039 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS"
Brian Paulde0ee312004-03-26 15:19:11 +000040 @echo
41 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
42 @echo "(ignore the following error message)"
43 @exit 1
44
45
46# Rules to set/install a specific build configuration
47aix \
Karl Schultza16bdb52004-10-01 13:33:26 +000048aix-64 \
Brian Paulde0ee312004-03-26 15:19:11 +000049aix-gcc \
Brian Paul6d50d912004-07-01 15:32:51 +000050aix-static \
Philippe Houdoin92ec9972004-08-14 10:10:42 +000051beos \
Brian Paulde0ee312004-03-26 15:19:11 +000052darwin \
53darwin-static \
54freebsd \
55hpux10 \
56hpux10-gcc \
Brian Paulff7d3bb2004-03-30 14:56:47 +000057hpux10-static \
Karl Schultz786eef22004-10-01 20:19:16 +000058hpux11-32 \
Brian Paulde0ee312004-03-26 15:19:11 +000059hpux11-32-static \
60hpux11-32-static-nothreads \
Karl Schultz786eef22004-10-01 20:19:16 +000061hpux11-64 \
Brian Paulde0ee312004-03-26 15:19:11 +000062hpux11-64-static \
63hpux9 \
64hpux9-gcc \
65irix6-64 \
66irix6-64-static \
67irix6-n32 \
68irix6-n32-static \
69irix6-o32 \
70irix6-o32-static \
71linux \
72linux-alpha \
73linux-alpha-static \
74linux-debug \
Keith Whitwelle61df582004-04-14 12:44:07 +000075linux-dri \
Dave Airlie898c03a2004-05-03 11:30:37 +000076linux-dri-x86 \
Keith Whitwell69ab4fe2004-04-30 08:29:04 +000077linux-dri-x86-64 \
Ian Romanick447cdd52004-10-13 19:56:15 +000078linux-dri-ppc \
Daniel Borcad3746ca2004-04-07 06:37:50 +000079linux-glide \
Brian Paulde0ee312004-03-26 15:19:11 +000080linux-icc \
81linux-icc-static \
82linux-osmesa16 \
83linux-osmesa16-static \
84linux-osmesa32 \
85linux-ppc \
86linux-ppc-static \
87linux-solo \
Dave Airliee520b722004-09-07 00:41:40 +000088linux-solo-x86 \
Brian Pauladcb2282004-04-19 22:23:10 +000089linux-solo-ia64 \
Brian Paulde0ee312004-03-26 15:19:11 +000090linux-sparc \
91linux-sparc5 \
92linux-static \
93linux-ultrasparc \
Keith Whitwell6fb23562004-04-14 21:19:34 +000094linux-tcc \
Brian Paulde0ee312004-03-26 15:19:11 +000095linux-x86 \
Keith Whitwelle61df582004-04-14 12:44:07 +000096linux-x86-debug \
Brian Paulde0ee312004-03-26 15:19:11 +000097linux-x86-64 \
98linux-x86-64-static \
Daniel Borcad3746ca2004-04-07 06:37:50 +000099linux-x86-glide \
Brian Paulde0ee312004-03-26 15:19:11 +0000100linux-x86-static \
101netbsd \
102openbsd \
103osf1 \
104solaris-x86 \
105solaris-x86-gcc \
106sunos4 \
107sunos4-gcc \
108sunos4-static \
109sunos5 \
110sunos5-gcc \
111sunos5-smp \
112ultrix-gcc:
Keith Whitwelle61df582004-04-14 12:44:07 +0000113 (cd configs && rm -f current && ln -s $@ current)
Eric Anholt2fb5d152004-06-01 00:06:14 +0000114 $(MAKE) default
Brian Paulde0ee312004-03-26 15:19:11 +0000115
116
117# Rules for making release tarballs
118
Brian Paula5bc6422004-08-27 15:31:20 +0000119DIRECTORY = Mesa-6.2
120LIB_NAME = MesaLib-6.2
121DEMO_NAME = MesaDemos-6.2
Brian Paulde0ee312004-03-26 15:19:11 +0000122
123LIB_FILES = \
124 $(DIRECTORY)/Makefile* \
125 $(DIRECTORY)/descrip.mms \
126 $(DIRECTORY)/mms-config. \
127 $(DIRECTORY)/Mesa.dsw \
128 $(DIRECTORY)/bin/mklib \
Brian Paula5bc6422004-08-27 15:31:20 +0000129 $(DIRECTORY)/bin/installmesa \
Brian Paulde0ee312004-03-26 15:19:11 +0000130 $(DIRECTORY)/configs/[a-z]* \
131 $(DIRECTORY)/docs/*.html \
132 $(DIRECTORY)/docs/COPYING \
133 $(DIRECTORY)/docs/INSTALL.GNU \
134 $(DIRECTORY)/docs/README.* \
135 $(DIRECTORY)/docs/RELNOTES* \
136 $(DIRECTORY)/docs/VERSIONS \
137 $(DIRECTORY)/docs/*.spec \
138 $(DIRECTORY)/include/GL/internal/glcore.h \
139 $(DIRECTORY)/include/GL/dmesa.h \
140 $(DIRECTORY)/include/GL/amesa.h \
141 $(DIRECTORY)/include/GL/fxmesa.h \
142 $(DIRECTORY)/include/GL/ggimesa.h \
143 $(DIRECTORY)/include/GL/gl.h \
144 $(DIRECTORY)/include/GL/glext.h \
145 $(DIRECTORY)/include/GL/gl_mangle.h \
146 $(DIRECTORY)/include/GL/glu.h \
147 $(DIRECTORY)/include/GL/glu_mangle.h \
148 $(DIRECTORY)/include/GL/glx.h \
149 $(DIRECTORY)/include/GL/glxext.h \
150 $(DIRECTORY)/include/GL/glx_mangle.h \
151 $(DIRECTORY)/include/GL/mesa_wgl.h \
152 $(DIRECTORY)/include/GL/mglmesa.h \
153 $(DIRECTORY)/include/GL/osmesa.h \
154 $(DIRECTORY)/include/GL/svgamesa.h \
155 $(DIRECTORY)/include/GL/ugl*.h \
156 $(DIRECTORY)/include/GL/vms_x_fix.h \
157 $(DIRECTORY)/include/GL/wmesa.h \
158 $(DIRECTORY)/include/GL/xmesa.h \
159 $(DIRECTORY)/include/GL/xmesa_x.h \
160 $(DIRECTORY)/include/GL/xmesa_xf86.h \
161 $(DIRECTORY)/src/Makefile \
162 $(DIRECTORY)/src/descrip.mms \
163 $(DIRECTORY)/src/mesa/Makefile* \
164 $(DIRECTORY)/src/mesa/sources \
165 $(DIRECTORY)/src/mesa/descrip.mms \
166 $(DIRECTORY)/src/mesa/depend \
167 $(DIRECTORY)/src/mesa/main/*.[chS] \
168 $(DIRECTORY)/src/mesa/main/main.dsp \
169 $(DIRECTORY)/src/mesa/main/descrip.mms \
170 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
171 $(DIRECTORY)/src/mesa/glapi/glapi.dsp \
172 $(DIRECTORY)/src/mesa/glapi/descrip.mms \
173 $(DIRECTORY)/src/mesa/array_cache/*.[ch] \
174 $(DIRECTORY)/src/mesa/array_cache/array_cache.dsp \
175 $(DIRECTORY)/src/mesa/array_cache/descrip.mms \
176 $(DIRECTORY)/src/mesa/math/*.[ch] \
177 $(DIRECTORY)/src/mesa/math/math.dsp \
178 $(DIRECTORY)/src/mesa/math/descrip.mms \
Brian Paul02ca8fe2004-08-13 20:58:59 +0000179 $(DIRECTORY)/src/mesa/shader/*.[ch] \
Brian Paul98ae32c2004-08-14 21:53:14 +0000180 $(DIRECTORY)/src/mesa/shader/shader.dsp \
Karl Schultzd48ef3e2004-08-14 21:42:50 +0000181 $(DIRECTORY)/src/mesa/shader/descrip.mms \
Brian Paulde0ee312004-03-26 15:19:11 +0000182 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
183 $(DIRECTORY)/src/mesa/swrast/swrast.dsp \
184 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
185 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
186 $(DIRECTORY)/src/mesa/swrast_setup/swrast_setup.dsp \
187 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
Brian Paul02ca8fe2004-08-13 20:58:59 +0000188 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
Brian Paulde0ee312004-03-26 15:19:11 +0000189 $(DIRECTORY)/src/mesa/tnl/tnl.dsp \
190 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
191 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
192 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
193 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
194 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
Brian Paul244af162004-08-14 21:12:37 +0000195 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000196 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
197 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
198 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
199 $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
200 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
201 $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
202 $(DIRECTORY)/src/mesa/drivers/glide/*.def \
203 $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
204 $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
205 $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
206 $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
207 $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
208 $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
209 $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
210 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
211 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
212 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
213 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.dsp \
214 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
215 $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
216 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
217 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
218 $(DIRECTORY)/src/mesa/drivers/windows/*/*.dsp \
219 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
220 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
221 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
222 $(DIRECTORY)/src/mesa/x86/Makefile \
223 $(DIRECTORY)/src/mesa/x86/*.[ch] \
224 $(DIRECTORY)/src/mesa/x86/*.S \
225 $(DIRECTORY)/src/glu/Makefile \
226 $(DIRECTORY)/src/glu/descrip.mms \
227 $(DIRECTORY)/src/glu/sgi/Makefile \
228 $(DIRECTORY)/src/glu/sgi/Makefile.win \
229 $(DIRECTORY)/src/glu/sgi/Makefile.DJ \
230 $(DIRECTORY)/src/glu/sgi/cc*.txt \
231 $(DIRECTORY)/src/glu/sgi/glu.def \
232 $(DIRECTORY)/src/glu/sgi/glu.dsp \
233 $(DIRECTORY)/src/glu/sgi/dummy.cc \
234 $(DIRECTORY)/src/glu/sgi/descrip.mms \
235 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
236 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
237 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
238 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
239 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
240 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
241 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
242 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
243 $(DIRECTORY)/src/glu/sgi/libtess/README \
244 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
245 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
246 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \
247 $(DIRECTORY)/src/glu/mesa/README[12] \
248 $(DIRECTORY)/src/glu/mesa/Makefile* \
249 $(DIRECTORY)/src/glu/mesa/descrip.mms \
250 $(DIRECTORY)/src/glu/mesa/mms_depend \
251 $(DIRECTORY)/src/glu/mesa/*.def \
252 $(DIRECTORY)/src/glu/mesa/depend \
253 $(DIRECTORY)/src/glu/mesa/*.[ch] \
254 $(DIRECTORY)/src/glw/*.[ch] \
255 $(DIRECTORY)/src/glw/Makefile* \
256 $(DIRECTORY)/src/glw/README \
Brian Paul9debd562004-08-22 17:41:44 +0000257 $(DIRECTORY)/src/glw/depend \
Brian Paulde0ee312004-03-26 15:19:11 +0000258 $(DIRECTORY)/progs/Makefile \
259 $(DIRECTORY)/progs/util/README \
260 $(DIRECTORY)/progs/util/*.[ch] \
261 $(DIRECTORY)/progs/util/sampleMakefile \
262 $(DIRECTORY)/vms/analyze_map.com \
263 $(DIRECTORY)/vms/xlib.opt \
264 $(DIRECTORY)/vms/xlib_share.opt
265
266
267DEMO_FILES = \
268 $(DIRECTORY)/include/GL/glut.h \
269 $(DIRECTORY)/include/GL/glutf90.h \
270 $(DIRECTORY)/src/glut/glx/Makefile* \
271 $(DIRECTORY)/src/glut/glx/depend \
272 $(DIRECTORY)/src/glut/glx/*def \
273 $(DIRECTORY)/src/glut/glx/descrip.mms \
274 $(DIRECTORY)/src/glut/glx/mms_depend \
275 $(DIRECTORY)/src/glut/glx/glut.dsp \
276 $(DIRECTORY)/src/glut/glx/*.[ch] \
Brian Paul244af162004-08-14 21:12:37 +0000277 $(DIRECTORY)/src/glut/beos/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000278 $(DIRECTORY)/src/glut/beos/*.cpp \
Brian Paul244af162004-08-14 21:12:37 +0000279 $(DIRECTORY)/src/glut/beos/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000280 $(DIRECTORY)/src/glut/dos/*.[ch] \
281 $(DIRECTORY)/src/glut/dos/Makefile.DJ \
282 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
Brian Paule54464e2004-09-10 22:13:18 +0000283 $(DIRECTORY)/src/glut/ggi/*.[ch] \
284 $(DIRECTORY)/src/glut/ggi/Makefile \
Brian Paul244af162004-08-14 21:12:37 +0000285 $(DIRECTORY)/progs/beos/*.cpp \
286 $(DIRECTORY)/progs/beos/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000287 $(DIRECTORY)/progs/images/*.rgb \
288 $(DIRECTORY)/progs/images/*.rgba \
289 $(DIRECTORY)/progs/demos/Makefile* \
290 $(DIRECTORY)/progs/demos/descrip.mms \
291 $(DIRECTORY)/progs/demos/*.[ch] \
292 $(DIRECTORY)/progs/demos/*.cxx \
293 $(DIRECTORY)/progs/demos/*.dat \
294 $(DIRECTORY)/progs/demos/README \
295 $(DIRECTORY)/progs/demos/Windows/*.dsp \
296 $(DIRECTORY)/progs/demos/Windows/*.dsw \
297 $(DIRECTORY)/progs/xdemos/Makefile* \
298 $(DIRECTORY)/progs/xdemos/descrip.mms \
299 $(DIRECTORY)/progs/xdemos/*.[chf] \
300 $(DIRECTORY)/progs/redbook/Makefile* \
301 $(DIRECTORY)/progs/redbook/README \
302 $(DIRECTORY)/progs/redbook/*.[ch] \
303 $(DIRECTORY)/progs/samples/Makefile* \
304 $(DIRECTORY)/progs/samples/README \
305 $(DIRECTORY)/progs/samples/*.c \
306 $(DIRECTORY)/progs/windml/Makefile.ugl \
307 $(DIRECTORY)/progs/windml/*.c \
308 $(DIRECTORY)/progs/windml/*.bmp \
309 $(DIRECTORY)/progs/ggi/*.c
310
311
Brian Paul281f8552004-09-09 18:17:36 +0000312DRI_FILES = \
313 $(DIRECTORY)/src/glx/Makefile \
314 $(DIRECTORY)/src/glx/mini/*.[ch] \
315 $(DIRECTORY)/src/glx/mini/example.miniglx.conf \
316 $(DIRECTORY)/src/glx/mini/NOTES \
317 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
318 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
319 $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
320 $(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
321 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
322 $(DIRECTORY)/src/mesa/drivers/dri/*/depend \
323 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
324 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
325 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
326
327
328# Everything for new a Mesa release:
329tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
330
331
Brian Paulde0ee312004-03-26 15:19:11 +0000332lib_gz:
333 rm -f configs/current ; \
334 cd .. ; \
335 tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
336 gzip $(LIB_NAME).tar ; \
337 mv $(LIB_NAME).tar.gz $(DIRECTORY)
338
339demo_gz:
340 cd .. ; \
341 tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
342 gzip $(DEMO_NAME).tar ; \
343 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
344
345lib_bz2:
346 rm -f configs/current ; \
347 cd .. ; \
348 tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
349 bzip2 $(LIB_NAME).tar ; \
350 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
351
352demo_bz2:
353 cd .. ; \
354 tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
355 bzip2 $(DEMO_NAME).tar ; \
356 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
357
358lib_zip:
359 rm -f configs/current ; \
360 -rm $(LIB_NAME).zip ; \
361 cd .. ; \
362 zip -r $(LIB_NAME).zip $(LIB_FILES) ; \
363 mv $(LIB_NAME).zip $(DIRECTORY)
364
365demo_zip:
366 -rm $(DEMO_NAME).zip ; \
367 cd .. ; \
368 zip -r $(DEMO_NAME).zip $(DEMO_FILES) ; \
369 mv $(DEMO_NAME).zip $(DIRECTORY)
370
371md5:
372 @-md5sum $(LIB_NAME).tar.gz
373 @-md5sum $(LIB_NAME).tar.bz2
374 @-md5sum $(LIB_NAME).zip
375 @-md5sum $(DEMO_NAME).tar.gz
376 @-md5sum $(DEMO_NAME).tar.bz2
377 @-md5sum $(DEMO_NAME).zip