blob: 3e92e1312ede1816319280a8f5ff32ad4527d896 [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 \
Brian16c503f2007-05-09 16:22:53 -060010 if [ -d $$dir ] ; then \
11 (cd $$dir && $(MAKE)) || exit 1 ; \
12 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000013 done
14
José Fonseca9df478d2008-02-18 16:47:35 +090015all: default
16
Brian Paulde0ee312004-03-26 15:19:11 +000017
Brian Paul6d50d912004-07-01 15:32:51 +000018doxygen:
Dan Nicholsoncba14d82008-05-06 12:29:53 -070019 cd doxygen && $(MAKE)
Brian Paul6d50d912004-07-01 15:32:51 +000020
Brian Paulde0ee312004-03-26 15:19:11 +000021clean:
Dan Nicholsona6464b32008-05-07 11:35:23 -070022 -@touch $(TOP)/configs/current
23 -@for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060024 if [ -d $$dir ] ; then \
25 (cd $$dir && $(MAKE) clean) ; \
26 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000027 done
Dan Nicholsona6464b32008-05-07 11:35:23 -070028 -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
Brian Paulde0ee312004-03-26 15:19:11 +000029
30
Dan Nicholsona6464b32008-05-07 11:35:23 -070031realclean: clean
Brian Paulde0ee312004-03-26 15:19:11 +000032 -rm -rf lib*
33 -rm -f $(TOP)/configs/current
Dan Nicholsondca1b792007-10-23 09:25:58 -070034 -rm -f $(TOP)/configs/autoconf
35 -rm -rf autom4te.cache
Dan Nicholsonc5e2b852008-05-06 14:00:43 -070036 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
37 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
Keith Whitwellae68c322004-12-15 11:03:41 +000038
Brian Paulde0ee312004-03-26 15:19:11 +000039
Brian Paul666702b2009-04-16 09:31:45 -060040distclean: realclean
41
42
Brian Paulde0ee312004-03-26 15:19:11 +000043install:
Brian Paul0e794a12006-06-22 22:50:48 +000044 @for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060045 if [ -d $$dir ] ; then \
46 (cd $$dir && $(MAKE) install) || exit 1 ; \
47 fi \
Brian Paul0e794a12006-06-22 22:50:48 +000048 done
Brian Paul81ca6162005-01-03 15:35:00 +000049
Brian16c503f2007-05-09 16:22:53 -060050
Brian Paul666702b2009-04-16 09:31:45 -060051.PHONY: default doxygen clean realclean distclean install linux-directfb-install
Dan Nicholson50f7e6f2008-05-06 11:52:34 -070052
Brian Paulde0ee312004-03-26 15:19:11 +000053# If there's no current configuration file
54$(TOP)/configs/current:
55 @echo
56 @echo
57 @echo "Please choose a configuration from the following list:"
Dan Nicholson38c5b142008-05-06 15:46:40 -070058 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
Brian Paulde0ee312004-03-26 15:19:11 +000059 @echo
60 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
Dan Nicholson38c5b142008-05-06 15:46:40 -070061 @echo
62 @echo "Or, run './configure' then 'make'"
63 @echo "See './configure --help' for details"
64 @echo
Brian Paulde0ee312004-03-26 15:19:11 +000065 @echo "(ignore the following error message)"
66 @exit 1
67
68
69# Rules to set/install a specific build configuration
70aix \
Karl Schultza16bdb52004-10-01 13:33:26 +000071aix-64 \
Brian Paul294d9ab2006-04-13 03:00:14 +000072aix-64-static \
Brian Paulde0ee312004-03-26 15:19:11 +000073aix-gcc \
Brian Paul6d50d912004-07-01 15:32:51 +000074aix-static \
Dan Nicholsondca1b792007-10-23 09:25:58 -070075autoconf \
Brian792b8822007-08-02 20:26:49 -060076bluegene-osmesa \
Briana5467fb2007-09-20 15:11:14 -060077bluegene-xlc-osmesa \
Philippe Houdoin92ec9972004-08-14 10:10:42 +000078beos \
Alex Neundorfcae5b7f2007-10-24 16:31:22 -060079catamount-osmesa-pgi \
Brian Paulde0ee312004-03-26 15:19:11 +000080darwin \
Jeremy Huddleston7c7fece2008-03-10 15:13:28 -070081darwin-fat-32bit \
82darwin-fat-all \
Brian Paulde0ee312004-03-26 15:19:11 +000083freebsd \
Eric Anholtcc182212004-10-28 00:19:21 +000084freebsd-dri \
Eric Anholtf054fa82005-05-28 20:17:06 +000085freebsd-dri-amd64 \
Eric Anholtcc182212004-10-28 00:19:21 +000086freebsd-dri-x86 \
Brian Paulde0ee312004-03-26 15:19:11 +000087hpux10 \
88hpux10-gcc \
Brian Paulff7d3bb2004-03-30 14:56:47 +000089hpux10-static \
Karl Schultz786eef22004-10-01 20:19:16 +000090hpux11-32 \
Brian Paulde0ee312004-03-26 15:19:11 +000091hpux11-32-static \
92hpux11-32-static-nothreads \
Karl Schultz786eef22004-10-01 20:19:16 +000093hpux11-64 \
Brian Paulde0ee312004-03-26 15:19:11 +000094hpux11-64-static \
Brian Paul294d9ab2006-04-13 03:00:14 +000095hpux11-ia64 \
96hpux11-ia64-static \
Brian Paulde0ee312004-03-26 15:19:11 +000097hpux9 \
98hpux9-gcc \
99irix6-64 \
100irix6-64-static \
101irix6-n32 \
102irix6-n32-static \
103irix6-o32 \
104irix6-o32-static \
105linux \
Keith Whitwell211d7ab2009-11-04 13:03:35 +0000106linux-i965 \
Brian Paulde0ee312004-03-26 15:19:11 +0000107linux-alpha \
108linux-alpha-static \
Brian88b715b2007-12-02 15:23:51 -0700109linux-cell \
Brian Paulab93aa72008-09-03 09:08:19 -0600110linux-cell-debug \
Brian Paulde0ee312004-03-26 15:19:11 +0000111linux-debug \
Brian Paul81ca6162005-01-03 15:35:00 +0000112linux-directfb \
Keith Whitwelle61df582004-04-14 12:44:07 +0000113linux-dri \
Brian15b3bd12007-02-23 11:58:46 -0700114linux-dri-debug \
Dave Airlie898c03a2004-05-03 11:30:37 +0000115linux-dri-x86 \
Keith Whitwell69ab4fe2004-04-30 08:29:04 +0000116linux-dri-x86-64 \
Ian Romanick447cdd52004-10-13 19:56:15 +0000117linux-dri-ppc \
Jeremy Kolb97a30232006-02-19 22:30:46 +0000118linux-dri-xcb \
Jakob Bornecrantz9395fb62008-05-22 16:24:51 +0200119linux-egl \
Ian Romanickdc6e2c72005-07-29 17:25:50 +0000120linux-indirect \
Keith Whitwella5cb1aa2005-04-29 17:31:10 +0000121linux-fbdev \
Daniel Borcad3746ca2004-04-07 06:37:50 +0000122linux-glide \
Brian Paul294d9ab2006-04-13 03:00:14 +0000123linux-ia64-icc \
124linux-ia64-icc-static \
Brian Paulde0ee312004-03-26 15:19:11 +0000125linux-icc \
126linux-icc-static \
Zack Rusinb04430e2007-10-22 11:00:28 -0400127linux-llvm \
Brian Paul6a7b6a52009-12-18 11:17:06 -0700128linux-llvm-debug \
Chia-I Wu97ea8e92009-11-06 16:27:19 +0800129linux-opengl-es \
Brian Paul525eb0b2006-07-04 16:49:58 +0000130linux-osmesa \
Brian Pauldf37cde2009-05-18 08:46:17 -0600131linux-osmesa-static \
Brian Paulde0ee312004-03-26 15:19:11 +0000132linux-osmesa16 \
133linux-osmesa16-static \
134linux-osmesa32 \
135linux-ppc \
136linux-ppc-static \
José Fonseca83a674a2007-09-19 23:43:36 +0100137linux-profile \
Brian Paulde0ee312004-03-26 15:19:11 +0000138linux-solo \
Dave Airliee520b722004-09-07 00:41:40 +0000139linux-solo-x86 \
Brian Pauladcb2282004-04-19 22:23:10 +0000140linux-solo-ia64 \
Brian Paulde0ee312004-03-26 15:19:11 +0000141linux-sparc \
142linux-sparc5 \
143linux-static \
144linux-ultrasparc \
Keith Whitwell6fb23562004-04-14 21:19:34 +0000145linux-tcc \
Brian Paulde0ee312004-03-26 15:19:11 +0000146linux-x86 \
Keith Whitwelle61df582004-04-14 12:44:07 +0000147linux-x86-debug \
Brian Paul7644bfb2005-03-03 01:44:42 +0000148linux-x86-32 \
Brian Paulde0ee312004-03-26 15:19:11 +0000149linux-x86-64 \
Brian Paul42fa8122005-05-07 16:59:58 +0000150linux-x86-64-debug \
José Fonseca59424e22007-09-28 17:17:11 +0000151linux-x86-64-profile \
Brian Paulde0ee312004-03-26 15:19:11 +0000152linux-x86-64-static \
Daniel Borcad3746ca2004-04-07 06:37:50 +0000153linux-x86-glide \
José Fonseca59424e22007-09-28 17:17:11 +0000154linux-x86-profile \
Brian Paulde0ee312004-03-26 15:19:11 +0000155linux-x86-static \
156netbsd \
157openbsd \
158osf1 \
Brian Paul294d9ab2006-04-13 03:00:14 +0000159osf1-static \
Brian Paulde0ee312004-03-26 15:19:11 +0000160solaris-x86 \
161solaris-x86-gcc \
Brian Paulc717ffa2006-05-17 22:51:44 +0000162solaris-x86-gcc-static \
Brian Paulde0ee312004-03-26 15:19:11 +0000163sunos4 \
164sunos4-gcc \
165sunos4-static \
166sunos5 \
167sunos5-gcc \
Brian Paul9073c402006-04-07 15:16:46 +0000168sunos5-64-gcc \
Brian Paulde0ee312004-03-26 15:19:11 +0000169sunos5-smp \
Brian Paul294d9ab2006-04-13 03:00:14 +0000170sunos5-v8 \
171sunos5-v8-static \
172sunos5-v9 \
173sunos5-v9-static \
Brian2c0b3d82007-07-31 09:32:10 -0600174sunos5-v9-cc-g++ \
Brian Paulde0ee312004-03-26 15:19:11 +0000175ultrix-gcc:
José Fonsecac3168e02010-02-14 13:15:49 +0000176 @ if test -f configs/current -o -L configs/current; then \
177 if ! cmp configs/$@ configs/current > /dev/null; then \
178 echo "Please run 'make realclean' before changing configs" ; \
179 exit 1 ; \
180 fi ; \
181 else \
182 cd configs && rm -f current && ln -s $@ current ; \
Brian Paul31635422006-08-03 16:58:06 +0000183 fi
Eric Anholt2fb5d152004-06-01 00:06:14 +0000184 $(MAKE) default
Brian Paulde0ee312004-03-26 15:19:11 +0000185
186
187# Rules for making release tarballs
188
Ian Romanickbf75ee92009-12-16 09:15:09 -0800189VERSION=7.7
Brian Paul681a13e2009-02-05 08:39:10 -0700190DIRECTORY = Mesa-$(VERSION)
191LIB_NAME = MesaLib-$(VERSION)
192DEMO_NAME = MesaDemos-$(VERSION)
193GLUT_NAME = MesaGLUT-$(VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +0000194
Brian Pauldff11bb2005-07-21 18:44:52 +0000195MAIN_FILES = \
Brian Paulde0ee312004-03-26 15:19:11 +0000196 $(DIRECTORY)/Makefile* \
Dan Nicholson72796232007-12-05 17:23:00 -0800197 $(DIRECTORY)/configure \
198 $(DIRECTORY)/configure.ac \
Dan Nicholsond368eed2008-05-05 18:24:21 -0700199 $(DIRECTORY)/acinclude.m4 \
Dan Nicholson72796232007-12-05 17:23:00 -0800200 $(DIRECTORY)/aclocal.m4 \
Dan Nicholson72796232007-12-05 17:23:00 -0800201 $(DIRECTORY)/bin/config.guess \
202 $(DIRECTORY)/bin/config.sub \
203 $(DIRECTORY)/bin/install-sh \
Brian Paulde0ee312004-03-26 15:19:11 +0000204 $(DIRECTORY)/bin/mklib \
Brian Paul73dd09f2006-10-22 22:37:30 +0000205 $(DIRECTORY)/bin/minstall \
Dan Nicholsonfbb96a02008-06-10 06:06:40 -0700206 $(DIRECTORY)/bin/version.mk \
Brian Paulde0ee312004-03-26 15:19:11 +0000207 $(DIRECTORY)/configs/[a-z]* \
208 $(DIRECTORY)/docs/*.html \
209 $(DIRECTORY)/docs/COPYING \
Brian Paulde0ee312004-03-26 15:19:11 +0000210 $(DIRECTORY)/docs/README.* \
211 $(DIRECTORY)/docs/RELNOTES* \
Brian Paulde0ee312004-03-26 15:19:11 +0000212 $(DIRECTORY)/docs/*.spec \
213 $(DIRECTORY)/include/GL/internal/glcore.h \
Brian Paul63dffa42005-08-08 21:30:12 +0000214 $(DIRECTORY)/include/GL/dmesa.h \
Brian Paulde0ee312004-03-26 15:19:11 +0000215 $(DIRECTORY)/include/GL/ggimesa.h \
216 $(DIRECTORY)/include/GL/gl.h \
217 $(DIRECTORY)/include/GL/glext.h \
218 $(DIRECTORY)/include/GL/gl_mangle.h \
219 $(DIRECTORY)/include/GL/glu.h \
220 $(DIRECTORY)/include/GL/glu_mangle.h \
221 $(DIRECTORY)/include/GL/glx.h \
222 $(DIRECTORY)/include/GL/glxext.h \
223 $(DIRECTORY)/include/GL/glx_mangle.h \
Brian Paul159ca322006-03-30 14:27:25 +0000224 $(DIRECTORY)/include/GL/glfbdev.h \
Brian Paulde0ee312004-03-26 15:19:11 +0000225 $(DIRECTORY)/include/GL/mesa_wgl.h \
226 $(DIRECTORY)/include/GL/mglmesa.h \
227 $(DIRECTORY)/include/GL/osmesa.h \
228 $(DIRECTORY)/include/GL/svgamesa.h \
Brian Paulde0ee312004-03-26 15:19:11 +0000229 $(DIRECTORY)/include/GL/vms_x_fix.h \
Brian Paul3ba370a2009-03-05 08:33:50 -0700230 $(DIRECTORY)/include/GL/wglext.h \
Brian Paulde0ee312004-03-26 15:19:11 +0000231 $(DIRECTORY)/include/GL/wmesa.h \
michal068596c2009-12-10 01:03:15 +0100232 $(DIRECTORY)/src/glsl/Makefile \
Brian Paulc9a210f2010-01-07 08:42:43 -0700233 $(DIRECTORY)/src/glsl/Makefile.template \
michal068596c2009-12-10 01:03:15 +0100234 $(DIRECTORY)/src/glsl/*/Makefile \
235 $(DIRECTORY)/src/glsl/*/SConscript \
236 $(DIRECTORY)/src/glsl/*/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000237 $(DIRECTORY)/src/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000238 $(DIRECTORY)/src/mesa/Makefile* \
Brian Paul7fcf4c62009-02-24 14:27:43 -0700239 $(DIRECTORY)/src/mesa/sources.mak \
Brian Paulde0ee312004-03-26 15:19:11 +0000240 $(DIRECTORY)/src/mesa/descrip.mms \
Brianf3419d52007-09-13 09:27:10 -0600241 $(DIRECTORY)/src/mesa/gl.pc.in \
Brian Paul1598be52009-01-12 07:55:14 -0700242 $(DIRECTORY)/src/mesa/osmesa.pc.in \
Brian Paulde0ee312004-03-26 15:19:11 +0000243 $(DIRECTORY)/src/mesa/depend \
244 $(DIRECTORY)/src/mesa/main/*.[chS] \
Brian Paulde0ee312004-03-26 15:19:11 +0000245 $(DIRECTORY)/src/mesa/main/descrip.mms \
246 $(DIRECTORY)/src/mesa/glapi/*.[chS] \
Brian Paulde0ee312004-03-26 15:19:11 +0000247 $(DIRECTORY)/src/mesa/math/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000248 $(DIRECTORY)/src/mesa/math/descrip.mms \
Brian Paul1e2a71c2009-08-24 13:12:04 -0600249 $(DIRECTORY)/src/mesa/shader/*.[chly] \
250 $(DIRECTORY)/src/mesa/shader/Makefile \
Karl Schultzd48ef3e2004-08-14 21:42:50 +0000251 $(DIRECTORY)/src/mesa/shader/descrip.mms \
Karl Schultz5b10d712005-06-03 15:24:55 +0000252 $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
253 $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
254 $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
Brian04c401c2007-05-02 08:29:14 -0600255 $(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
256 $(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
257 $(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000258 $(DIRECTORY)/src/mesa/swrast/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000259 $(DIRECTORY)/src/mesa/swrast/descrip.mms \
260 $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000261 $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
Richard Hughese9c614a2007-04-07 08:39:24 -0600262 $(DIRECTORY)/src/mesa/vbo/*.[chS] \
263 $(DIRECTORY)/src/mesa/vbo/descrip.mms \
Brian Paul02ca8fe2004-08-13 20:58:59 +0000264 $(DIRECTORY)/src/mesa/tnl/*.[chS] \
Brian Paulde0ee312004-03-26 15:19:11 +0000265 $(DIRECTORY)/src/mesa/tnl/descrip.mms \
266 $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
267 $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
268 $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
Brian Paul44029f12008-07-08 16:16:57 -0600269 $(DIRECTORY)/src/mesa/drivers/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000270 $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
Brian Paul244af162004-08-14 21:12:37 +0000271 $(DIRECTORY)/src/mesa/drivers/beos/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000272 $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
273 $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
Karl Schultz5b10d712005-06-03 15:24:55 +0000274 $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
275 $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000276 $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
Brian Paule4d9cc92008-07-08 16:28:33 -0600277 $(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000278 $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
279 $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000280 $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
281 $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
282 $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
283 $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
284 $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
285 $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
286 $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
Brian Paul7d3feef2008-07-08 16:26:06 -0600287 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000288 $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
289 $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
290 $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
Brian Paulde0ee312004-03-26 15:19:11 +0000291 $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
292 $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
293 $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
294 $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
Brian Paul7d3feef2008-07-08 16:26:06 -0600295 $(DIRECTORY)/src/mesa/drivers/x11/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000296 $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
297 $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
Brian Paul835a9fe2008-10-28 18:27:21 -0600298 $(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
299 $(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
Brian Paul03f52fe2005-07-01 01:55:30 +0000300 $(DIRECTORY)/src/mesa/ppc/*.[ch] \
Brian Paulde0ee312004-03-26 15:19:11 +0000301 $(DIRECTORY)/src/mesa/sparc/*.[chS] \
302 $(DIRECTORY)/src/mesa/x86/Makefile \
303 $(DIRECTORY)/src/mesa/x86/*.[ch] \
304 $(DIRECTORY)/src/mesa/x86/*.S \
Brian Paul03f52fe2005-07-01 01:55:30 +0000305 $(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
306 $(DIRECTORY)/src/mesa/x86-64/*.[chS] \
307 $(DIRECTORY)/src/mesa/x86-64/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000308 $(DIRECTORY)/progs/Makefile \
309 $(DIRECTORY)/progs/util/README \
310 $(DIRECTORY)/progs/util/*.[ch] \
311 $(DIRECTORY)/progs/util/sampleMakefile \
Brian Pauldace4e32009-01-20 09:13:06 -0700312 $(DIRECTORY)/windows/VC8/
Brianb1b154c2007-04-24 08:58:12 -0600313
Chia-I Wubfa66bd2009-09-21 17:57:57 +0800314ES_FILES = \
Brian Paul8e6337f2009-02-24 17:21:45 -0700315 $(DIRECTORY)/include/GLES/*.h \
316 $(DIRECTORY)/include/GLES2/*.h \
George Sapountzis295a0252010-02-22 22:27:49 +0200317 $(DIRECTORY)/src/mesa/glapi/gen/*.xml \
318 $(DIRECTORY)/src/mesa/glapi/gen/*.py \
319 $(DIRECTORY)/src/mesa/glapi/gen/*.dtd \
Chia-I Wubfa66bd2009-09-21 17:57:57 +0800320 $(DIRECTORY)/src/mesa/es/glapi/Makefile \
321 $(DIRECTORY)/src/mesa/es/glapi/*.xml \
322 $(DIRECTORY)/src/mesa/es/glapi/*.py \
323 $(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \
324 $(DIRECTORY)/src/mesa/es/main/*.[ch] \
Chia-I Wu976c8582009-12-23 11:18:48 +0800325 $(DIRECTORY)/src/mesa/es/main/*.xml \
Chia-I Wubfa66bd2009-09-21 17:57:57 +0800326 $(DIRECTORY)/src/mesa/es/main/*.py \
Chia-I Wu976c8582009-12-23 11:18:48 +0800327 $(DIRECTORY)/src/mesa/es/main/*.dtd \
Chia-I Wubfa66bd2009-09-21 17:57:57 +0800328 $(DIRECTORY)/src/mesa/es/Makefile \
329 $(DIRECTORY)/src/mesa/es/sources.mak \
330
331EGL_FILES = \
332 $(DIRECTORY)/include/EGL/*.h \
Brian Paul9dfc1b62009-02-24 15:00:14 -0700333 $(DIRECTORY)/src/egl/Makefile \
334 $(DIRECTORY)/src/egl/*/Makefile \
335 $(DIRECTORY)/src/egl/*/*.[ch] \
336 $(DIRECTORY)/src/egl/*/*/Makefile \
337 $(DIRECTORY)/src/egl/*/*/*.[ch] \
338
339GALLIUM_FILES = \
340 $(DIRECTORY)/src/mesa/state_tracker/*[ch] \
341 $(DIRECTORY)/src/gallium/Makefile \
342 $(DIRECTORY)/src/gallium/Makefile.template \
343 $(DIRECTORY)/src/gallium/SConscript \
344 $(DIRECTORY)/src/gallium/*/Makefile \
345 $(DIRECTORY)/src/gallium/*/SConscript \
346 $(DIRECTORY)/src/gallium/*/*/Makefile \
347 $(DIRECTORY)/src/gallium/*/*/Makefile.template \
348 $(DIRECTORY)/src/gallium/*/*/SConscript \
349 $(DIRECTORY)/src/gallium/*/*/*.[ch] \
350 $(DIRECTORY)/src/gallium/*/*/*.py \
Brian Paul2b692cd2009-09-09 12:01:28 -0600351 $(DIRECTORY)/src/gallium/*/*/*.csv \
Brian Paul9dfc1b62009-02-24 15:00:14 -0700352 $(DIRECTORY)/src/gallium/*/*/*/Makefile \
353 $(DIRECTORY)/src/gallium/*/*/*/SConscript \
354 $(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
355 $(DIRECTORY)/src/gallium/*/*/*/*.py \
Brian Paul31865902009-05-09 16:21:16 -0600356 $(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
Brian Paul9dfc1b62009-02-24 15:00:14 -0700357 $(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
358
Brian Paulde0ee312004-03-26 15:19:11 +0000359
Brian Paul3e2419a2005-07-22 15:52:46 +0000360DRI_FILES = \
Brian Paul73020032005-10-17 22:38:44 +0000361 $(DIRECTORY)/include/GL/internal/dri_interface.h \
Brian Paula8ee35c2009-01-06 07:35:45 -0700362 $(DIRECTORY)/include/GL/internal/glcore.h \
Brian Paul73020032005-10-17 22:38:44 +0000363 $(DIRECTORY)/include/GL/internal/sarea.h \
Brian Paul3e2419a2005-07-22 15:52:46 +0000364 $(DIRECTORY)/src/glx/Makefile \
Kristian Høgsberg6e8897f2010-02-09 09:58:36 -0500365 $(DIRECTORY)/src/glx/Makefile \
366 $(DIRECTORY)/src/glx/*.[ch] \
Brian Paul3e2419a2005-07-22 15:52:46 +0000367 $(DIRECTORY)/src/mesa/drivers/dri/Makefile \
368 $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
Dan Nicholsonf6da1452008-06-12 06:46:32 -0700369 $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
Brian Paul3e2419a2005-07-22 15:52:46 +0000370 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
371 $(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
Brian Paul1e71d6a2005-08-22 14:27:13 +0000372 $(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
Thierry Vignaud2674d1b2009-08-14 08:16:35 -0600373 $(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
Brian Paul3e2419a2005-07-22 15:52:46 +0000374 $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
Thierry Vignaud2674d1b2009-08-14 08:16:35 -0600375 $(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
Brian Paul3e2419a2005-07-22 15:52:46 +0000376 $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
377 $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
Brian Paulde0ee312004-03-26 15:19:11 +0000378
Brian Paul3e2419a2005-07-22 15:52:46 +0000379SGI_GLU_FILES = \
380 $(DIRECTORY)/src/glu/Makefile \
Brianf3419d52007-09-13 09:27:10 -0600381 $(DIRECTORY)/src/glu/glu.pc.in \
Brian Paul3e2419a2005-07-22 15:52:46 +0000382 $(DIRECTORY)/src/glu/sgi/Makefile \
Zhang76fb8082007-07-21 11:28:06 -0600383 $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
Brian Paul3e2419a2005-07-22 15:52:46 +0000384 $(DIRECTORY)/src/glu/sgi/Makefile.win \
Brian Paul3e2419a2005-07-22 15:52:46 +0000385 $(DIRECTORY)/src/glu/sgi/glu.def \
386 $(DIRECTORY)/src/glu/sgi/dummy.cc \
Brian Paul5d762e12008-08-16 10:09:38 -0600387 $(DIRECTORY)/src/glu/sgi/glu.exports \
388 $(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
Brian Paul3e2419a2005-07-22 15:52:46 +0000389 $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
390 $(DIRECTORY)/src/glu/sgi/include/gluos.h \
391 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
392 $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
393 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
394 $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
395 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
396 $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
397 $(DIRECTORY)/src/glu/sgi/libtess/README \
398 $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
399 $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
400 $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
Brian Paul8e73b142005-01-03 15:36:27 +0000401
Brian Paul3e2419a2005-07-22 15:52:46 +0000402MESA_GLU_FILES = \
403 $(DIRECTORY)/src/glu/mesa/README[12] \
404 $(DIRECTORY)/src/glu/mesa/Makefile* \
405 $(DIRECTORY)/src/glu/mesa/descrip.mms \
406 $(DIRECTORY)/src/glu/mesa/mms_depend \
407 $(DIRECTORY)/src/glu/mesa/*.def \
408 $(DIRECTORY)/src/glu/mesa/depend \
409 $(DIRECTORY)/src/glu/mesa/*.[ch]
Brian Paul8e73b142005-01-03 15:36:27 +0000410
Brian Paul3e2419a2005-07-22 15:52:46 +0000411GLW_FILES = \
412 $(DIRECTORY)/src/glw/*.[ch] \
413 $(DIRECTORY)/src/glw/Makefile* \
414 $(DIRECTORY)/src/glw/README \
Brianb87ce5b2007-11-12 07:51:28 -0700415 $(DIRECTORY)/src/glw/glw.pc.in \
Brian Paul3e2419a2005-07-22 15:52:46 +0000416 $(DIRECTORY)/src/glw/depend
417
Brian Paulb9e2e322009-07-22 12:34:07 -0600418GLEW_FILES = \
Brian Paulc57d81d2009-07-23 20:20:39 -0600419 $(DIRECTORY)/include/GL/glew.h \
420 $(DIRECTORY)/include/GL/glxew.h \
421 $(DIRECTORY)/include/GL/wglew.h \
Brian Paulb9e2e322009-07-22 12:34:07 -0600422 $(DIRECTORY)/src/glew/*.c \
423 $(DIRECTORY)/src/glew/Makefile \
424 $(DIRECTORY)/src/glew/SConscript \
425 $(DIRECTORY)/src/glew/LICENSE.txt
426
Brian Paul80cef692005-09-10 16:54:05 +0000427DEMO_FILES = \
Brian Paulb9e2e322009-07-22 12:34:07 -0600428 $(GLEW_FILES) \
Brian Paul244af162004-08-14 21:12:37 +0000429 $(DIRECTORY)/progs/beos/*.cpp \
430 $(DIRECTORY)/progs/beos/Makefile \
Brian Paulde0ee312004-03-26 15:19:11 +0000431 $(DIRECTORY)/progs/images/*.rgb \
432 $(DIRECTORY)/progs/images/*.rgba \
433 $(DIRECTORY)/progs/demos/Makefile* \
434 $(DIRECTORY)/progs/demos/descrip.mms \
435 $(DIRECTORY)/progs/demos/*.[ch] \
436 $(DIRECTORY)/progs/demos/*.cxx \
437 $(DIRECTORY)/progs/demos/*.dat \
438 $(DIRECTORY)/progs/demos/README \
Brian22b0b2f2007-07-03 15:46:38 -0600439 $(DIRECTORY)/progs/fbdev/Makefile \
440 $(DIRECTORY)/progs/fbdev/glfbdevtest.c \
Brian Paul0b1de632009-10-01 13:11:13 -0600441 $(DIRECTORY)/progs/objviewer/*.[ch] \
442 $(DIRECTORY)/progs/objviewer/*.obj \
443 $(DIRECTORY)/progs/objviewer/*.mtl \
444 $(DIRECTORY)/progs/objviewer/*.rgb \
445 $(DIRECTORY)/progs/objviewer/Makefile \
446 $(DIRECTORY)/progs/objviewer/README.txt \
Brian Paulbcf4ae72005-11-02 21:01:26 +0000447 $(DIRECTORY)/progs/osdemos/Makefile \
448 $(DIRECTORY)/progs/osdemos/*.c \
Brian Paulde0ee312004-03-26 15:19:11 +0000449 $(DIRECTORY)/progs/xdemos/Makefile* \
Brian Paulde0ee312004-03-26 15:19:11 +0000450 $(DIRECTORY)/progs/xdemos/*.[chf] \
451 $(DIRECTORY)/progs/redbook/Makefile* \
452 $(DIRECTORY)/progs/redbook/README \
453 $(DIRECTORY)/progs/redbook/*.[ch] \
454 $(DIRECTORY)/progs/samples/Makefile* \
455 $(DIRECTORY)/progs/samples/README \
456 $(DIRECTORY)/progs/samples/*.c \
Briand9443c22007-04-18 08:52:18 -0600457 $(DIRECTORY)/progs/glsl/Makefile* \
458 $(DIRECTORY)/progs/glsl/*.c \
Brian Paul7970b2a2008-08-16 09:39:10 -0600459 $(DIRECTORY)/progs/glsl/*.frag \
460 $(DIRECTORY)/progs/glsl/*.vert \
Brian Paul82370342009-08-13 15:06:28 -0600461 $(DIRECTORY)/progs/glsl/*.shtest \
Brian Paulde0ee312004-03-26 15:19:11 +0000462 $(DIRECTORY)/progs/windml/Makefile.ugl \
463 $(DIRECTORY)/progs/windml/*.c \
464 $(DIRECTORY)/progs/windml/*.bmp \
Brian Paulcba614b2009-11-19 09:00:14 -0700465 $(DIRECTORY)/progs/ggi/*.c
Brian Paulde0ee312004-03-26 15:19:11 +0000466
Brian Paul3e2419a2005-07-22 15:52:46 +0000467GLUT_FILES = \
468 $(DIRECTORY)/include/GL/glut.h \
469 $(DIRECTORY)/include/GL/glutf90.h \
470 $(DIRECTORY)/src/glut/glx/Makefile* \
471 $(DIRECTORY)/src/glut/glx/depend \
Brianf3419d52007-09-13 09:27:10 -0600472 $(DIRECTORY)/src/glut/glx/glut.pc.in \
Brian Paul3e2419a2005-07-22 15:52:46 +0000473 $(DIRECTORY)/src/glut/glx/*def \
Brian Paul3e2419a2005-07-22 15:52:46 +0000474 $(DIRECTORY)/src/glut/glx/*.[ch] \
475 $(DIRECTORY)/src/glut/beos/*.[ch] \
476 $(DIRECTORY)/src/glut/beos/*.cpp \
477 $(DIRECTORY)/src/glut/beos/Makefile \
478 $(DIRECTORY)/src/glut/dos/*.[ch] \
Brian Paul3e2419a2005-07-22 15:52:46 +0000479 $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
480 $(DIRECTORY)/src/glut/ggi/*.[ch] \
Brian Paul80cef692005-09-10 16:54:05 +0000481 $(DIRECTORY)/src/glut/ggi/Makefile \
Brian Paul667dd3c2006-07-31 14:25:53 +0000482 $(DIRECTORY)/src/glut/fbdev/Makefile \
Brian Pauld21ccb42006-08-23 19:46:17 +0000483 $(DIRECTORY)/src/glut/fbdev/*[ch] \
Brian Paul83304322006-08-24 17:01:35 +0000484 $(DIRECTORY)/src/glut/mini/*[ch] \
Brian4875b402008-01-23 16:03:19 -0700485 $(DIRECTORY)/src/glut/mini/glut.pc.in \
Briane90dd4b2007-10-23 08:22:21 -0600486 $(DIRECTORY)/src/glut/directfb/Makefile \
487 $(DIRECTORY)/src/glut/directfb/NOTES \
Brian Paulcba614b2009-11-19 09:00:14 -0700488 $(DIRECTORY)/src/glut/directfb/*[ch]
Brian Paulde0ee312004-03-26 15:19:11 +0000489
Brian Paul3e2419a2005-07-22 15:52:46 +0000490DEPEND_FILES = \
491 $(TOP)/src/mesa/depend \
Kristian Høgsberg6e8897f2010-02-09 09:58:36 -0500492 $(TOP)/src/glx/depend \
Brian Paul3e2419a2005-07-22 15:52:46 +0000493 $(TOP)/src/glw/depend \
494 $(TOP)/src/glut/glx/depend \
495 $(TOP)/src/glu/sgi/depend
Brian Paul281f8552004-09-09 18:17:36 +0000496
497
Brian Paul9dfc1b62009-02-24 15:00:14 -0700498LIB_FILES = \
499 $(MAIN_FILES) \
Chia-I Wubfa66bd2009-09-21 17:57:57 +0800500 $(ES_FILES) \
Brian Paul9dfc1b62009-02-24 15:00:14 -0700501 $(EGL_FILES) \
502 $(GALLIUM_FILES) \
503 $(DRI_FILES) \
504 $(SGI_GLU_FILES) \
505 $(GLW_FILES)
Brian Paul3e2419a2005-07-22 15:52:46 +0000506
Brian Pauldff11bb2005-07-21 18:44:52 +0000507
Brian Paul281f8552004-09-09 18:17:36 +0000508# Everything for new a Mesa release:
Dan Nicholson72796232007-12-05 17:23:00 -0800509tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
510 lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
Brian Paul281f8552004-09-09 18:17:36 +0000511
512
Dan Nicholson72796232007-12-05 17:23:00 -0800513# Helper for autoconf builds
514ACLOCAL = aclocal
515ACLOCAL_FLAGS =
516AUTOCONF = autoconf
517AC_FLAGS =
Dan Nicholsond368eed2008-05-05 18:24:21 -0700518aclocal.m4: configure.ac acinclude.m4
Dan Nicholson72796232007-12-05 17:23:00 -0800519 $(ACLOCAL) $(ACLOCAL_FLAGS)
Dan Nicholsond368eed2008-05-05 18:24:21 -0700520configure: configure.ac aclocal.m4 acinclude.m4
Dan Nicholson72796232007-12-05 17:23:00 -0800521 $(AUTOCONF) $(AC_FLAGS)
522
Brian Paul3e2419a2005-07-22 15:52:46 +0000523rm_depend:
524 @for dep in $(DEPEND_FILES) ; do \
525 rm -f $$dep ; \
526 touch $$dep ; \
527 done
528
Brian Paul24e2f612009-10-14 10:56:29 -0600529rm_config:
530 rm -f configs/current
531 rm -f configs/autoconf
532
533lib_gz: rm_config
Brian Paulde0ee312004-03-26 15:19:11 +0000534 cd .. ; \
Brian Pauldff11bb2005-07-21 18:44:52 +0000535 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000536 gzip $(LIB_NAME).tar ; \
537 mv $(LIB_NAME).tar.gz $(DIRECTORY)
538
539demo_gz:
540 cd .. ; \
Brian Paul3e2419a2005-07-22 15:52:46 +0000541 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000542 gzip $(DEMO_NAME).tar ; \
543 mv $(DEMO_NAME).tar.gz $(DIRECTORY)
544
Brian Paul80cef692005-09-10 16:54:05 +0000545glut_gz:
546 cd .. ; \
547 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
548 gzip $(GLUT_NAME).tar ; \
549 mv $(GLUT_NAME).tar.gz $(DIRECTORY)
550
Brian Paul24e2f612009-10-14 10:56:29 -0600551lib_bz2: rm_config
Brian Paulde0ee312004-03-26 15:19:11 +0000552 cd .. ; \
Brian Pauldff11bb2005-07-21 18:44:52 +0000553 tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000554 bzip2 $(LIB_NAME).tar ; \
555 mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
556
557demo_bz2:
558 cd .. ; \
Brian Paul3e2419a2005-07-22 15:52:46 +0000559 tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000560 bzip2 $(DEMO_NAME).tar ; \
561 mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
562
Brian Paul80cef692005-09-10 16:54:05 +0000563glut_bz2:
564 cd .. ; \
565 tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
566 bzip2 $(GLUT_NAME).tar ; \
567 mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
568
Brian Paul24e2f612009-10-14 10:56:29 -0600569lib_zip: rm_config
Brian Paul3e2419a2005-07-22 15:52:46 +0000570 rm -f $(LIB_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000571 cd .. ; \
Brian Pauldff11bb2005-07-21 18:44:52 +0000572 zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000573 mv $(LIB_NAME).zip $(DIRECTORY)
574
575demo_zip:
Brian Paul3e2419a2005-07-22 15:52:46 +0000576 rm -f $(DEMO_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000577 cd .. ; \
Brian Paul3e2419a2005-07-22 15:52:46 +0000578 zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000579 mv $(DEMO_NAME).zip $(DIRECTORY)
580
Brian Paul80cef692005-09-10 16:54:05 +0000581glut_zip:
582 rm -f $(GLUT_NAME).zip ; \
583 cd .. ; \
584 zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
585 mv $(GLUT_NAME).zip $(DIRECTORY)
586
Brian Paulde0ee312004-03-26 15:19:11 +0000587md5:
588 @-md5sum $(LIB_NAME).tar.gz
589 @-md5sum $(LIB_NAME).tar.bz2
590 @-md5sum $(LIB_NAME).zip
591 @-md5sum $(DEMO_NAME).tar.gz
592 @-md5sum $(DEMO_NAME).tar.bz2
593 @-md5sum $(DEMO_NAME).zip
Brian Paul80cef692005-09-10 16:54:05 +0000594 @-md5sum $(GLUT_NAME).tar.gz
595 @-md5sum $(GLUT_NAME).tar.bz2
596 @-md5sum $(GLUT_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700597
Brian Paul24e2f612009-10-14 10:56:29 -0600598.PHONY: tarballs rm_depend rm_config md5 \
599 lib_gz demo_gz glut_gz \
600 lib_bz2 demo_bz2 glut_bz2 \
601 lib_zip demo_zip glut_zip