Makefile 15.3 KB
Newer Older
Brian Paul's avatar
Brian Paul committed
1 2 3 4
# Top-level Mesa makefile

TOP = .

5
SUBDIRS = src
Brian Paul's avatar
Brian Paul committed
6 7


8 9
# The git command below generates an empty string when we're not
# building in a GIT tree (i.e., building from a release tarball).
Brian Paul's avatar
Brian Paul committed
10
default: $(TOP)/configs/current
11
	@$(TOP)/bin/extract_git_sha1
Brian Paul's avatar
Brian Paul committed
12
	@for dir in $(SUBDIRS) ; do \
13 14 15
		if [ -d $$dir ] ; then \
			(cd $$dir && $(MAKE)) || exit 1 ; \
		fi \
Brian Paul's avatar
Brian Paul committed
16 17
	done

18 19
all: default

Brian Paul's avatar
Brian Paul committed
20

21
doxygen:
22
	cd doxygen && $(MAKE)
23

Brian Paul's avatar
Brian Paul committed
24
clean:
Dan Nicholson's avatar
Dan Nicholson committed
25 26
	-@touch $(TOP)/configs/current
	-@for dir in $(SUBDIRS) ; do \
27 28 29
		if [ -d $$dir ] ; then \
			(cd $$dir && $(MAKE) clean) ; \
		fi \
Brian Paul's avatar
Brian Paul committed
30
	done
Dan Nicholson's avatar
Dan Nicholson committed
31
	-@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
Brian Paul's avatar
Brian Paul committed
32 33


Dan Nicholson's avatar
Dan Nicholson committed
34
realclean: clean
Brian Paul's avatar
Brian Paul committed
35 36
	-rm -rf lib*
	-rm -f $(TOP)/configs/current
37 38
	-rm -f $(TOP)/configs/autoconf
	-rm -rf autom4te.cache
39 40
	-find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
	  -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
41

Brian Paul's avatar
Brian Paul committed
42

43 44 45
distclean: realclean


Brian Paul's avatar
Brian Paul committed
46
install:
47
	@for dir in $(SUBDIRS) ; do \
48 49 50
		if [ -d $$dir ] ; then \
			(cd $$dir && $(MAKE) install) || exit 1 ; \
		fi \
51
	done
52

53

54
.PHONY: default doxygen clean realclean distclean install
55

Brian Paul's avatar
Brian Paul committed
56 57 58 59 60
# If there's no current configuration file
$(TOP)/configs/current:
	@echo
	@echo
	@echo "Please choose a configuration from the following list:"
61
	@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
Brian Paul's avatar
Brian Paul committed
62 63
	@echo
	@echo "Then type 'make <config>' (ex: 'make linux-x86')"
64 65 66 67
	@echo
	@echo "Or, run './configure' then 'make'"
	@echo "See './configure --help' for details"
	@echo
Brian Paul's avatar
Brian Paul committed
68 69 70 71 72 73
	@echo "(ignore the following error message)"
	@exit 1


# Rules to set/install a specific build configuration
aix \
Karl Schultz's avatar
Karl Schultz committed
74
aix-64 \
Brian Paul's avatar
Brian Paul committed
75
aix-64-static \
Brian Paul's avatar
Brian Paul committed
76
aix-gcc \
77
aix-static \
78
autoconf \
Brian's avatar
Brian committed
79
bluegene-osmesa \
Brian's avatar
Brian committed
80
bluegene-xlc-osmesa \
81
beos \
82
catamount-osmesa-pgi \
Brian Paul's avatar
Brian Paul committed
83
darwin \
84 85
darwin-fat-32bit \
darwin-fat-all \
Brian Paul's avatar
Brian Paul committed
86
freebsd \
87
freebsd-dri \
88
freebsd-dri-amd64 \
89
freebsd-dri-x86 \
Brian Paul's avatar
Brian Paul committed
90 91
hpux10 \
hpux10-gcc \
Brian Paul's avatar
Brian Paul committed
92
hpux10-static \
Karl Schultz's avatar
Karl Schultz committed
93
hpux11-32 \
Brian Paul's avatar
Brian Paul committed
94 95
hpux11-32-static \
hpux11-32-static-nothreads \
Karl Schultz's avatar
Karl Schultz committed
96
hpux11-64 \
Brian Paul's avatar
Brian Paul committed
97
hpux11-64-static \
Brian Paul's avatar
Brian Paul committed
98 99
hpux11-ia64 \
hpux11-ia64-static \
Brian Paul's avatar
Brian Paul committed
100 101 102 103 104 105 106 107 108
hpux9 \
hpux9-gcc \
irix6-64 \
irix6-64-static \
irix6-n32 \
irix6-n32-static \
irix6-o32 \
irix6-o32-static \
linux \
109
linux-i965 \
Brian Paul's avatar
Brian Paul committed
110 111
linux-alpha \
linux-alpha-static \
Brian's avatar
Brian committed
112
linux-cell \
113
linux-cell-debug \
Brian Paul's avatar
Brian Paul committed
114
linux-debug \
115
linux-dri \
Brian's avatar
Brian committed
116
linux-dri-debug \
Dave Airlie's avatar
Dave Airlie committed
117
linux-dri-x86 \
118
linux-dri-x86-64 \
119
linux-dri-ppc \
120
linux-dri-xcb \
121
linux-egl \
122
linux-indirect \
Keith Whitwell's avatar
Keith Whitwell committed
123
linux-fbdev \
Brian Paul's avatar
Brian Paul committed
124 125
linux-ia64-icc \
linux-ia64-icc-static \
Brian Paul's avatar
Brian Paul committed
126 127
linux-icc \
linux-icc-static \
128
linux-llvm \
129
linux-llvm-debug \
Chia-I Wu's avatar
Chia-I Wu committed
130
linux-opengl-es \
Brian Paul's avatar
Brian Paul committed
131
linux-osmesa \
132
linux-osmesa-static \
Brian Paul's avatar
Brian Paul committed
133 134 135 136 137
linux-osmesa16 \
linux-osmesa16-static \
linux-osmesa32 \
linux-ppc \
linux-ppc-static \
José Fonseca's avatar
José Fonseca committed
138
linux-profile \
Brian Paul's avatar
Brian Paul committed
139 140 141 142
linux-sparc \
linux-sparc5 \
linux-static \
linux-ultrasparc \
143
linux-tcc \
Brian Paul's avatar
Brian Paul committed
144
linux-x86 \
145
linux-x86-debug \
146
linux-x86-32 \
Brian Paul's avatar
Brian Paul committed
147
linux-x86-64 \
148
linux-x86-64-debug \
149
linux-x86-64-profile \
Brian Paul's avatar
Brian Paul committed
150
linux-x86-64-static \
151
linux-x86-profile \
Brian Paul's avatar
Brian Paul committed
152 153 154 155
linux-x86-static \
netbsd \
openbsd \
osf1 \
Brian Paul's avatar
Brian Paul committed
156
osf1-static \
Brian Paul's avatar
Brian Paul committed
157 158
solaris-x86 \
solaris-x86-gcc \
Brian Paul's avatar
Brian Paul committed
159
solaris-x86-gcc-static \
Brian Paul's avatar
Brian Paul committed
160 161 162 163 164
sunos4 \
sunos4-gcc \
sunos4-static \
sunos5 \
sunos5-gcc \
Brian Paul's avatar
Brian Paul committed
165
sunos5-64-gcc \
Brian Paul's avatar
Brian Paul committed
166
sunos5-smp \
Brian Paul's avatar
Brian Paul committed
167 168 169 170
sunos5-v8 \
sunos5-v8-static \
sunos5-v9 \
sunos5-v9-static \
Brian's avatar
Brian committed
171
sunos5-v9-cc-g++ \
Brian Paul's avatar
Brian Paul committed
172
ultrix-gcc:
173 174 175 176 177 178 179
	@ if test -f configs/current -o -L configs/current; then \
		if ! cmp configs/$@ configs/current > /dev/null; then \
			echo "Please run 'make realclean' before changing configs" ; \
			exit 1 ; \
		fi ; \
	else \
		cd configs && rm -f current && ln -s $@ current ; \
180
	fi
181
	$(MAKE) default
Brian Paul's avatar
Brian Paul committed
182 183 184 185


# Rules for making release tarballs

186
VERSION=7.12-devel
187 188 189
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
GLUT_NAME = MesaGLUT-$(VERSION)
Brian Paul's avatar
Brian Paul committed
190

191 192 193 194 195 196
# This is part of MAIN_FILES
MAIN_ES_FILES = \
	$(DIRECTORY)/src/mesa/main/*.xml				\
	$(DIRECTORY)/src/mesa/main/*.py					\
	$(DIRECTORY)/src/mesa/main/*.dtd

197
MAIN_FILES = \
Brian Paul's avatar
Brian Paul committed
198
	$(DIRECTORY)/Makefile*						\
199 200
	$(DIRECTORY)/configure						\
	$(DIRECTORY)/configure.ac					\
201
	$(DIRECTORY)/acinclude.m4					\
202
	$(DIRECTORY)/aclocal.m4						\
203 204 205
	$(DIRECTORY)/SConstruct						\
	$(DIRECTORY)/common.py						\
	$(DIRECTORY)/scons/*py						\
206 207
	$(DIRECTORY)/bin/config.guess					\
	$(DIRECTORY)/bin/config.sub					\
208
	$(DIRECTORY)/bin/extract_git_sha1				\
209
	$(DIRECTORY)/bin/install-sh					\
Brian Paul's avatar
Brian Paul committed
210
	$(DIRECTORY)/bin/mklib						\
211
	$(DIRECTORY)/bin/minstall					\
212
	$(DIRECTORY)/bin/version.mk					\
Brian Paul's avatar
Brian Paul committed
213 214 215 216 217 218 219 220 221 222 223 224 225 226
	$(DIRECTORY)/configs/[a-z]*					\
	$(DIRECTORY)/docs/*.html					\
	$(DIRECTORY)/docs/COPYING					\
	$(DIRECTORY)/docs/README.*					\
	$(DIRECTORY)/docs/RELNOTES*					\
	$(DIRECTORY)/docs/*.spec					\
	$(DIRECTORY)/include/GL/gl.h					\
	$(DIRECTORY)/include/GL/glext.h					\
	$(DIRECTORY)/include/GL/gl_mangle.h				\
	$(DIRECTORY)/include/GL/glu.h					\
	$(DIRECTORY)/include/GL/glu_mangle.h				\
	$(DIRECTORY)/include/GL/glx.h					\
	$(DIRECTORY)/include/GL/glxext.h				\
	$(DIRECTORY)/include/GL/glx_mangle.h				\
Brian Paul's avatar
Brian Paul committed
227
	$(DIRECTORY)/include/GL/glfbdev.h				\
Brian Paul's avatar
Brian Paul committed
228 229 230
	$(DIRECTORY)/include/GL/mesa_wgl.h				\
	$(DIRECTORY)/include/GL/osmesa.h				\
	$(DIRECTORY)/include/GL/vms_x_fix.h				\
231
	$(DIRECTORY)/include/GL/wglext.h				\
Brian Paul's avatar
Brian Paul committed
232
	$(DIRECTORY)/include/GL/wmesa.h					\
Benjamin Franzke's avatar
Benjamin Franzke committed
233
	$(DIRECTORY)/include/pci_ids/*.h				\
234
	$(DIRECTORY)/include/c99/*.h					\
235 236
	$(DIRECTORY)/src/getopt/SConscript				\
	$(DIRECTORY)/src/getopt/getopt*.[ch]				\
michal's avatar
michal committed
237
	$(DIRECTORY)/src/glsl/Makefile					\
238
	$(DIRECTORY)/src/glsl/Makefile.template				\
239
	$(DIRECTORY)/src/glsl/SConscript				\
240
	$(DIRECTORY)/src/glsl/*.[ch]					\
241 242
	$(DIRECTORY)/src/glsl/*.ll					\
	$(DIRECTORY)/src/glsl/*.yy					\
243 244
	$(DIRECTORY)/src/glsl/*.[cly]pp					\
	$(DIRECTORY)/src/glsl/README					\
245
	$(DIRECTORY)/src/glsl/glcpp/*.[chly]				\
246
	$(DIRECTORY)/src/glsl/glcpp/README				\
sg35zh's avatar
sg35zh committed
247
	$(DIRECTORY)/src/glsl/builtins					\
Brian Paul's avatar
Brian Paul committed
248
	$(DIRECTORY)/src/Makefile					\
249
	$(DIRECTORY)/src/SConscript					\
Brian Paul's avatar
Brian Paul committed
250
	$(DIRECTORY)/src/mesa/Makefile*					\
251
	$(DIRECTORY)/src/mesa/SConscript				\
252
	$(DIRECTORY)/src/mesa/sources.mak				\
Brian Paul's avatar
Brian Paul committed
253
	$(DIRECTORY)/src/mesa/descrip.mms				\
Brian's avatar
Brian committed
254
	$(DIRECTORY)/src/mesa/gl.pc.in					\
255
	$(DIRECTORY)/src/mesa/osmesa.pc.in				\
Brian Paul's avatar
Brian Paul committed
256
	$(DIRECTORY)/src/mesa/depend					\
257
	$(MAIN_ES_FILES)						\
Brian Paul's avatar
Brian Paul committed
258
	$(DIRECTORY)/src/mesa/main/*.[chS]				\
259
	$(DIRECTORY)/src/mesa/main/*.cpp				\
Brian Paul's avatar
Brian Paul committed
260 261 262
	$(DIRECTORY)/src/mesa/main/descrip.mms				\
	$(DIRECTORY)/src/mesa/math/*.[ch]				\
	$(DIRECTORY)/src/mesa/math/descrip.mms				\
263
	$(DIRECTORY)/src/mesa/program/*.[chly]				\
264
	$(DIRECTORY)/src/mesa/program/*.cpp				\
265
	$(DIRECTORY)/src/mesa/program/descrip.mms			\
Brian Paul's avatar
Brian Paul committed
266 267 268 269
	$(DIRECTORY)/src/mesa/swrast/*.[ch]				\
	$(DIRECTORY)/src/mesa/swrast/descrip.mms			\
	$(DIRECTORY)/src/mesa/swrast_setup/*.[ch]			\
	$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms			\
270 271
	$(DIRECTORY)/src/mesa/vbo/*.[chS]				\
	$(DIRECTORY)/src/mesa/vbo/descrip.mms				\
272
	$(DIRECTORY)/src/mesa/tnl/*.[chS]				\
Brian Paul's avatar
Brian Paul committed
273 274 275 276
	$(DIRECTORY)/src/mesa/tnl/descrip.mms				\
	$(DIRECTORY)/src/mesa/tnl_dd/*.[ch]				\
	$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch]				\
	$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm			\
277
	$(DIRECTORY)/src/mesa/drivers/Makefile				\
Brian Paul's avatar
Brian Paul committed
278
	$(DIRECTORY)/src/mesa/drivers/beos/*.cpp			\
279
	$(DIRECTORY)/src/mesa/drivers/beos/Makefile			\
Brian Paul's avatar
Brian Paul committed
280 281
	$(DIRECTORY)/src/mesa/drivers/common/*.[ch]			\
	$(DIRECTORY)/src/mesa/drivers/common/descrip.mms		\
Brian Paul's avatar
Brian Paul committed
282
	$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile			\
Brian Paul's avatar
Brian Paul committed
283
	$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c			\
284
	$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile			\
Brian Paul's avatar
Brian Paul committed
285 286 287 288
	$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win		\
	$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms		\
	$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def			\
	$(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch]			\
289 290 291
	$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/*.[ch]		\
	$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/Makefile	\
	$(DIRECTORY)/src/mesa/drivers/dri/r300/compiler/SConscript	\
Brian Paul's avatar
Brian Paul committed
292 293
	$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch]			\
	$(DIRECTORY)/src/mesa/drivers/windows/*/*.def			\
294
	$(DIRECTORY)/src/mesa/drivers/x11/Makefile			\
Brian Paul's avatar
Brian Paul committed
295 296
	$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms			\
	$(DIRECTORY)/src/mesa/drivers/x11/*.[ch]			\
297
	$(DIRECTORY)/src/mesa/ppc/*.[ch]				\
Brian Paul's avatar
Brian Paul committed
298 299 300 301
	$(DIRECTORY)/src/mesa/sparc/*.[chS]				\
	$(DIRECTORY)/src/mesa/x86/Makefile				\
	$(DIRECTORY)/src/mesa/x86/*.[ch]				\
	$(DIRECTORY)/src/mesa/x86/*.S					\
302 303
	$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch]				\
	$(DIRECTORY)/src/mesa/x86-64/*.[chS]				\
304
	$(DIRECTORY)/src/mesa/x86-64/Makefile
305

306
MAPI_FILES = \
307 308
	$(DIRECTORY)/include/GLES/*.h					\
	$(DIRECTORY)/include/GLES2/*.h					\
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
	$(DIRECTORY)/include/VG/*.h					\
	$(DIRECTORY)/src/mapi/es?api/Makefile				\
	$(DIRECTORY)/src/mapi/es?api/*.pc.in				\
	$(DIRECTORY)/src/mapi/glapi/gen/Makefile			\
	$(DIRECTORY)/src/mapi/glapi/gen/*.xml				\
	$(DIRECTORY)/src/mapi/glapi/gen/*.py				\
	$(DIRECTORY)/src/mapi/glapi/gen/*.dtd				\
	$(DIRECTORY)/src/mapi/glapi/gen-es/Makefile			\
	$(DIRECTORY)/src/mapi/glapi/gen-es/*.xml			\
	$(DIRECTORY)/src/mapi/glapi/gen-es/*.py				\
	$(DIRECTORY)/src/mapi/glapi/Makefile				\
	$(DIRECTORY)/src/mapi/glapi/SConscript				\
	$(DIRECTORY)/src/mapi/glapi/sources.mak				\
	$(DIRECTORY)/src/mapi/glapi/*.[chS]				\
	$(DIRECTORY)/src/mapi/mapi/mapi_abi.py				\
	$(DIRECTORY)/src/mapi/mapi/sources.mak				\
	$(DIRECTORY)/src/mapi/mapi/*.[ch]				\
326
	$(DIRECTORY)/src/mapi/shared-glapi/SConscript			\
sg35zh's avatar
sg35zh committed
327
	$(DIRECTORY)/src/mapi/shared-glapi/Makefile			\
328
	$(DIRECTORY)/src/mapi/vgapi/Makefile				\
329
	$(DIRECTORY)/src/mapi/vgapi/SConscript				\
330
	$(DIRECTORY)/src/mapi/vgapi/vgapi.csv				\
331
	$(DIRECTORY)/src/mapi/vgapi/vg.pc.in
Chia-I Wu's avatar
Chia-I Wu committed
332 333

EGL_FILES = \
334
	$(DIRECTORY)/include/KHR/*.h					\
Chia-I Wu's avatar
Chia-I Wu committed
335
	$(DIRECTORY)/include/EGL/*.h					\
336 337
	$(DIRECTORY)/src/egl/Makefile					\
	$(DIRECTORY)/src/egl/*/Makefile					\
338
	$(DIRECTORY)/src/egl/*/Makefile.template			\
339 340
	$(DIRECTORY)/src/egl/*/*.[ch]					\
	$(DIRECTORY)/src/egl/*/*/Makefile				\
341
	$(DIRECTORY)/src/egl/*/*/*.[ch]					\
342 343
	$(DIRECTORY)/src/egl/wayland/wayland-drm/protocol/*.xml		\
	$(DIRECTORY)/src/egl/wayland/wayland-egl/*.pc.in		\
344
	$(DIRECTORY)/src/egl/main/SConscript				\
345 346
	$(DIRECTORY)/src/egl/main/*.pc.in				\
	$(DIRECTORY)/src/egl/main/*.def
347

348 349 350 351 352 353 354 355 356 357
GBM_FILES = \
	$(DIRECTORY)/src/gbm/Makefile					\
	$(DIRECTORY)/src/gbm/main/*.pc.in				\
	$(DIRECTORY)/src/gbm/main/*.[ch]				\
	$(DIRECTORY)/src/gbm/main/Makefile				\
	$(DIRECTORY)/src/gbm/backends/Makefile				\
	$(DIRECTORY)/src/gbm/backends/Makefile.template			\
	$(DIRECTORY)/src/gbm/backends/*/*.[ch]				\
	$(DIRECTORY)/src/gbm/backends/*/Makefile			\

358 359 360 361 362
GALLIUM_FILES = \
	$(DIRECTORY)/src/mesa/state_tracker/*[ch]			\
	$(DIRECTORY)/src/gallium/Makefile				\
	$(DIRECTORY)/src/gallium/Makefile.template			\
	$(DIRECTORY)/src/gallium/SConscript				\
363
	$(DIRECTORY)/src/gallium/targets/Makefile.dri			\
364 365
	$(DIRECTORY)/src/gallium/targets/Makefile.xorg			\
	$(DIRECTORY)/src/gallium/targets/SConscript.dri			\
366 367 368 369 370
	$(DIRECTORY)/src/gallium/*/Makefile				\
	$(DIRECTORY)/src/gallium/*/SConscript				\
	$(DIRECTORY)/src/gallium/*/*/Makefile				\
	$(DIRECTORY)/src/gallium/*/*/SConscript				\
	$(DIRECTORY)/src/gallium/*/*/*.[ch]				\
371
	$(DIRECTORY)/src/gallium/auxiliary/gallivm/*.cpp		\
372
	$(DIRECTORY)/src/gallium/*/*/*.py				\
373
	$(DIRECTORY)/src/gallium/*/*/*.csv				\
374 375 376
	$(DIRECTORY)/src/gallium/*/*/*/Makefile				\
	$(DIRECTORY)/src/gallium/*/*/*/SConscript			\
	$(DIRECTORY)/src/gallium/*/*/*/*.[ch]				\
377
	$(DIRECTORY)/src/gallium/*/*/*/*.py
378

379 380
APPLE_DRI_FILES = \
	$(DIRECTORY)/src/glx/apple/Makefile 				\
381
	$(DIRECTORY)/src/glx/apple/*.[ch]
Brian Paul's avatar
Brian Paul committed
382

383
DRI_FILES = \
384 385
	$(DIRECTORY)/include/GL/internal/dri_interface.h		\
	$(DIRECTORY)/include/GL/internal/sarea.h			\
386
	$(DIRECTORY)/src/glx/Makefile					\
387
	$(DIRECTORY)/src/glx/*.[ch]					\
388
	$(APPLE_DRI_FILES)						\
389
	$(DIRECTORY)/src/mesa/drivers/dri/Makefile*			\
Dan Nicholson's avatar
Dan Nicholson committed
390
	$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in			\
391
	$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po		\
392
	$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS]			\
393
	$(DIRECTORY)/src/mesa/drivers/dri/*/*.cpp			\
394
	$(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS]			\
395
	$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile			\
396
	$(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile			\
397
	$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile
Brian Paul's avatar
Brian Paul committed
398

399 400
SGI_GLU_FILES = \
	$(DIRECTORY)/src/glu/Makefile					\
Brian's avatar
Brian committed
401
	$(DIRECTORY)/src/glu/glu.pc.in					\
402
	$(DIRECTORY)/src/glu/sgi/Makefile				\
Zhang's avatar
Zhang committed
403
	$(DIRECTORY)/src/glu/sgi/Makefile.mgw				\
404 405 406
	$(DIRECTORY)/src/glu/sgi/Makefile.win				\
	$(DIRECTORY)/src/glu/sgi/glu.def				\
	$(DIRECTORY)/src/glu/sgi/dummy.cc				\
407 408
	$(DIRECTORY)/src/glu/sgi/glu.exports				\
	$(DIRECTORY)/src/glu/sgi/glu.exports.darwin			\
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
	$(DIRECTORY)/src/glu/sgi/mesaglu.opt				\
	$(DIRECTORY)/src/glu/sgi/include/gluos.h			\
	$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h			\
	$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc		\
	$(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h			\
	$(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc		\
	$(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h			\
	$(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc			\
	$(DIRECTORY)/src/glu/sgi/libtess/README				\
	$(DIRECTORY)/src/glu/sgi/libtess/alg-outline			\
	$(DIRECTORY)/src/glu/sgi/libtess/*.[ch]				\
	$(DIRECTORY)/src/glu/sgi/libutil/*.[ch]

GLW_FILES = \
	$(DIRECTORY)/src/glw/*.[ch]			\
	$(DIRECTORY)/src/glw/Makefile*			\
	$(DIRECTORY)/src/glw/README			\
426
	$(DIRECTORY)/src/glw/glw.pc.in			\
427 428 429 430 431 432
	$(DIRECTORY)/src/glw/depend

GLUT_FILES = \
	$(DIRECTORY)/include/GL/glut.h			\
	$(DIRECTORY)/include/GL/glutf90.h		\
	$(DIRECTORY)/src/glut/glx/Makefile*		\
433
	$(DIRECTORY)/src/glut/glx/SConscript		\
434
	$(DIRECTORY)/src/glut/glx/depend		\
Brian's avatar
Brian committed
435
	$(DIRECTORY)/src/glut/glx/glut.pc.in		\
436 437 438 439
	$(DIRECTORY)/src/glut/glx/*def			\
	$(DIRECTORY)/src/glut/glx/*.[ch]		\
	$(DIRECTORY)/src/glut/beos/*.[ch]		\
	$(DIRECTORY)/src/glut/beos/*.cpp		\
440
	$(DIRECTORY)/src/glut/beos/Makefile
441 442 443

DEPEND_FILES = \
	$(TOP)/src/mesa/depend		\
444
	$(TOP)/src/glx/depend		\
445 446 447
	$(TOP)/src/glw/depend		\
	$(TOP)/src/glut/glx/depend	\
	$(TOP)/src/glu/sgi/depend
Brian Paul's avatar
Brian Paul committed
448

449

450 451
LIB_FILES = \
	$(MAIN_FILES)		\
452
	$(MAPI_FILES)		\
Chia-I Wu's avatar
Chia-I Wu committed
453
	$(ES_FILES)		\
454
	$(EGL_FILES)		\
455
	$(GBM_FILES)		\
456 457 458 459
	$(GALLIUM_FILES)	\
	$(DRI_FILES)		\
	$(SGI_GLU_FILES)	\
	$(GLW_FILES)
460

461

462 463 464 465 466 467
parsers: configure
	-@touch $(TOP)/configs/current
	$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
	$(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
	$(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h

468
# Everything for new a Mesa release:
469 470 471 472 473 474
ARCHIVES = $(LIB_NAME).tar.gz \
	$(LIB_NAME).tar.bz2 \
	$(LIB_NAME).zip \
	$(GLUT_NAME).tar.gz \
	$(GLUT_NAME).tar.bz2 \
	$(GLUT_NAME).zip
475

476
tarballs: md5
477
	rm -f ../$(LIB_NAME).tar
478

479 480 481 482 483
# Helper for autoconf builds
ACLOCAL = aclocal
ACLOCAL_FLAGS =
AUTOCONF = autoconf
AC_FLAGS =
484
aclocal.m4: configure.ac acinclude.m4
485
	$(ACLOCAL) $(ACLOCAL_FLAGS)
486
configure: rm_depend configure.ac aclocal.m4 acinclude.m4
487 488
	$(AUTOCONF) $(AC_FLAGS)

489 490 491 492 493
rm_depend:
	@for dep in $(DEPEND_FILES) ; do \
		rm -f $$dep ; \
		touch $$dep ; \
	done
494

495
rm_config: parsers
496 497 498
	rm -f configs/current
	rm -f configs/autoconf

499 500
$(LIB_NAME).tar: rm_config
	cd .. ; tar -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
Brian Paul's avatar
Brian Paul committed
501

502 503
$(LIB_NAME).tar.gz: $(LIB_NAME).tar
	gzip --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.gz
504

505
$(GLUT_NAME).tar: rm_depend
506
	cd .. ; tar -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
Brian Paul's avatar
Brian Paul committed
507

508 509 510 511 512 513 514 515
$(GLUT_NAME).tar.gz: $(GLUT_NAME).tar
	gzip --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.gz

$(LIB_NAME).tar.bz2: $(LIB_NAME).tar
	bzip2 --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.bz2

$(GLUT_NAME).tar.bz2: $(GLUT_NAME).tar
	bzip2 --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.bz2
516

517
$(LIB_NAME).zip: rm_config
518
	rm -f $(LIB_NAME).zip ; \
Brian Paul's avatar
Brian Paul committed
519
	cd .. ; \
520
	zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
Brian Paul's avatar
Brian Paul committed
521 522
	mv $(LIB_NAME).zip $(DIRECTORY)

523
$(GLUT_NAME).zip:
524 525 526 527 528
	rm -f $(GLUT_NAME).zip ; \
	cd .. ; \
	zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
	mv $(GLUT_NAME).zip $(DIRECTORY)

529
md5: $(ARCHIVES)
Brian Paul's avatar
Brian Paul committed
530 531 532
	@-md5sum $(LIB_NAME).tar.gz
	@-md5sum $(LIB_NAME).tar.bz2
	@-md5sum $(LIB_NAME).zip
533 534 535
	@-md5sum $(GLUT_NAME).tar.gz
	@-md5sum $(GLUT_NAME).tar.bz2
	@-md5sum $(GLUT_NAME).zip
536

537
.PHONY: tarballs rm_depend rm_config md5