blob: f72fa40a5b7ef6603823021802ddb3cbf142ff47 [file] [log] [blame]
Eric Anholt07abd912012-05-14 18:38:54 -07001# Copyright © 2012 Intel Corporation
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7# and/or sell copies of the Software, and to permit persons to whom the
8# Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20# IN THE SOFTWARE.
Brian Paulde0ee312004-03-26 15:19:11 +000021
Ian Romanick2e8c8662012-05-23 15:23:22 -070022SUBDIRS = src
Brian Paulde0ee312004-03-26 15:19:11 +000023
Matt Turnercc18cc22012-09-18 20:21:47 -070024ACLOCAL_AMFLAGS = -I m4
25
Brian Paul6d50d912004-07-01 15:32:51 +000026doxygen:
Dan Nicholsoncba14d82008-05-06 12:29:53 -070027 cd doxygen && $(MAKE)
Brian Paul6d50d912004-07-01 15:32:51 +000028
Eric Anholt07abd912012-05-14 18:38:54 -070029check-local:
Ian Romanicka29ad2b2012-05-29 11:28:11 -070030 $(MAKE) -C src/mapi/glapi/tests check
Ian Romanick45d3d0a2012-08-01 14:48:27 -070031 $(MAKE) -C src/mapi/shared-glapi/tests check
Ian Romanick8fecdcc2012-05-25 08:26:33 -070032 $(MAKE) -C src/mesa/main/tests check
Eric Anholt07abd912012-05-14 18:38:54 -070033 $(MAKE) -C src/glsl/tests check
Ian Romanick2e8c8662012-05-23 15:23:22 -070034 $(MAKE) -C src/glx/tests check
Paul Berry659cded2011-07-05 11:52:06 -070035
Eric Anholt07abd912012-05-14 18:38:54 -070036clean-local:
37 -@touch $(top_builddir)/configs/current
Dan Nicholsona6464b32008-05-07 11:35:23 -070038 -@for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060039 if [ -d $$dir ] ; then \
40 (cd $$dir && $(MAKE) clean) ; \
41 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000042 done
Eric Anholt07abd912012-05-14 18:38:54 -070043 -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
Brian Paulde0ee312004-03-26 15:19:11 +000044
45
Eric Anholt07abd912012-05-14 18:38:54 -070046
47distclean-local:
Brian Paulde0ee312004-03-26 15:19:11 +000048 -rm -rf lib*
Eric Anholt07abd912012-05-14 18:38:54 -070049 -rm -f $(top_builddir)/configs/current
Dan Nicholsonc5e2b852008-05-06 14:00:43 -070050 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
51 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
Keith Whitwellae68c322004-12-15 11:03:41 +000052
Eric Anholt07abd912012-05-14 18:38:54 -070053.PHONY: doxygen
Brian Paulde0ee312004-03-26 15:19:11 +000054
Brian Paulde0ee312004-03-26 15:19:11 +000055# Rules for making release tarballs
56
Ian Romanickc4f392a2012-11-08 10:47:44 -080057PACKAGE_VERSION=9.0.1
José Fonseca9a7f84d2011-07-14 17:28:52 +010058PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
59PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +000060
José Fonseca9a7f84d2011-07-14 17:28:52 +010061EXTRA_FILES = \
62 aclocal.m4 \
63 configure \
Andreas Bolld4540c52012-11-14 21:43:31 +010064 bin/ar-lib \
65 bin/compile \
Andreas Bolld0533022012-11-14 21:34:44 +010066 bin/config.sub \
67 bin/config.guess \
Andreas Bolld4540c52012-11-14 21:43:31 +010068 bin/depcomp \
Matt Turner4be397e2012-10-23 10:57:15 -070069 bin/install-sh \
Andreas Bolld4540c52012-11-14 21:43:31 +010070 bin/ltmain.sh \
71 bin/missing \
72 bin/ylwrap \
Jon TURNEY68e04cc2012-06-28 23:15:48 +010073 src/glsl/glsl_parser.cc \
José Fonseca9a7f84d2011-07-14 17:28:52 +010074 src/glsl/glsl_parser.h \
Jon TURNEY68e04cc2012-06-28 23:15:48 +010075 src/glsl/glsl_lexer.cc \
José Fonseca9a7f84d2011-07-14 17:28:52 +010076 src/glsl/glcpp/glcpp-lex.c \
77 src/glsl/glcpp/glcpp-parse.c \
78 src/glsl/glcpp/glcpp-parse.h \
Jakob Bornecrantz56d05a82012-03-20 13:24:50 +000079 src/mesa/main/api_exec_es1.c \
80 src/mesa/main/api_exec_es1_dispatch.h \
81 src/mesa/main/api_exec_es1_remap_helper.h \
82 src/mesa/main/api_exec_es2.c \
83 src/mesa/main/api_exec_es2_dispatch.h \
84 src/mesa/main/api_exec_es2_remap_helper.h \
José Fonseca9a7f84d2011-07-14 17:28:52 +010085 src/mesa/program/lex.yy.c \
86 src/mesa/program/program_parse.tab.c \
Andreas Bollfcb9f252012-11-14 21:39:15 +010087 src/mesa/program/program_parse.tab.h \
88 src/gallium/drivers/r600/Makefile.in \
89 src/gallium/drivers/r300/Makefile.in \
90 src/gallium/drivers/Makefile.in \
91 src/gallium/Makefile.in \
92 src/gallium/auxiliary/pipe-loader/Makefile.in \
93 src/gallium/targets/opencl/Makefile.in \
94 src/gallium/state_trackers/clover/Makefile.in \
95 src/mapi/glapi/tests/Makefile.in \
96 src/mapi/glapi/Makefile.in \
97 src/mapi/glapi/gen/Makefile.in \
98 src/mapi/es1api/Makefile.in \
99 src/mapi/shared-glapi/tests/Makefile.in \
100 src/mapi/shared-glapi/Makefile.in \
101 src/mapi/vgapi/Makefile.in \
102 src/mapi/es2api/Makefile.in \
103 src/glsl/tests/Makefile.in \
104 src/glsl/glcpp/Makefile.in \
105 src/glsl/Makefile.in \
106 src/gtest/Makefile.in \
107 src/egl/drivers/Makefile.in \
108 src/egl/drivers/glx/Makefile.in \
109 src/egl/drivers/dri2/Makefile.in \
110 src/egl/Makefile.in \
111 src/egl/main/Makefile.in \
112 src/egl/wayland/Makefile.in \
113 src/egl/wayland/wayland-drm/Makefile.in \
114 src/egl/wayland/wayland-egl/Makefile.in \
115 src/Makefile.in \
116 src/glx/tests/Makefile.in \
117 src/glx/Makefile.in \
118 src/gbm/Makefile.in \
119 src/mesa/drivers/Makefile.in \
120 src/mesa/drivers/dri/common/Makefile.in \
121 src/mesa/drivers/dri/i965/Makefile.in \
122 src/mesa/drivers/dri/r200/Makefile.in \
123 src/mesa/drivers/dri/Makefile.in \
124 src/mesa/drivers/dri/radeon/Makefile.in \
125 src/mesa/drivers/dri/swrast/Makefile.in \
126 src/mesa/drivers/dri/nouveau/Makefile.in \
127 src/mesa/drivers/dri/i915/Makefile.in \
128 src/mesa/drivers/osmesa/Makefile.in \
129 src/mesa/drivers/x11/Makefile.in \
130 src/mesa/Makefile.in \
131 src/mesa/libdricore/Makefile.in \
132 src/mesa/x86-64/Makefile.in \
133 src/mesa/main/tests/Makefile.in \
134 src/mesa/x86/Makefile.in \
135 Makefile.in
136
Chia-I Wu238f7822010-05-07 22:09:45 +0800137
José Fonseca9a7f84d2011-07-14 17:28:52 +0100138IGNORE_FILES = \
139 -x autogen.sh
Brian Paulde0ee312004-03-26 15:19:11 +0000140
Brian Pauldff11bb2005-07-21 18:44:52 +0000141
Ian Romanick654adaa2011-02-11 16:44:11 -0800142parsers: configure
Eric Anholt07abd912012-05-14 18:38:54 -0700143 -@touch $(top_builddir)/configs/current
Jon TURNEY68e04cc2012-06-28 23:15:48 +0100144 $(MAKE) -C src/glsl glsl_parser.cc glsl_parser.h glsl_lexer.cc
Ian Romanick654adaa2011-02-11 16:44:11 -0800145 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
José Fonseca864eb842011-07-14 17:33:30 +0100146 $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
Ian Romanick654adaa2011-02-11 16:44:11 -0800147
Brian Paul281f8552004-09-09 18:17:36 +0000148# Everything for new a Mesa release:
José Fonseca9a7f84d2011-07-14 17:28:52 +0100149ARCHIVES = $(PACKAGE_NAME).tar.gz \
150 $(PACKAGE_NAME).tar.bz2 \
Eric Anholt07abd912012-05-14 18:38:54 -0700151 $(PACKAGE_NAME).zip
Brian Paul281f8552004-09-09 18:17:36 +0000152
Ian Romanick654adaa2011-02-11 16:44:11 -0800153tarballs: md5
José Fonseca9a7f84d2011-07-14 17:28:52 +0100154 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
Brian Paul281f8552004-09-09 18:17:36 +0000155
José Fonseca9a7f84d2011-07-14 17:28:52 +0100156manifest.txt: .git
157 ( \
158 ls -1 $(EXTRA_FILES) ; \
159 git ls-files $(IGNORE_FILES) \
160 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
Brian Paul24e2f612009-10-14 10:56:29 -0600161
José Fonseca9a7f84d2011-07-14 17:28:52 +0100162../$(PACKAGE_DIR):
163 ln -s $(PWD) $@
Brian Paulde0ee312004-03-26 15:19:11 +0000164
José Fonseca9a7f84d2011-07-14 17:28:52 +0100165$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
166 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
Brian Paul80cef692005-09-10 16:54:05 +0000167
José Fonseca9a7f84d2011-07-14 17:28:52 +0100168$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
169 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
Brian Paulde0ee312004-03-26 15:19:11 +0000170
José Fonseca9a7f84d2011-07-14 17:28:52 +0100171$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
172 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
Brian Paul80cef692005-09-10 16:54:05 +0000173
José Fonseca9a7f84d2011-07-14 17:28:52 +0100174$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
175 rm -f $(PACKAGE_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000176 cd .. ; \
José Fonseca9a7f84d2011-07-14 17:28:52 +0100177 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
178 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
Brian Paul80cef692005-09-10 16:54:05 +0000179
Ian Romanick10342842011-02-11 16:27:22 -0800180md5: $(ARCHIVES)
José Fonseca9a7f84d2011-07-14 17:28:52 +0100181 @-md5sum $(PACKAGE_NAME).tar.gz
182 @-md5sum $(PACKAGE_NAME).tar.bz2
183 @-md5sum $(PACKAGE_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700184
Eric Anholt07abd912012-05-14 18:38:54 -0700185.PHONY: tarballs md5