blob: 59fd9b584936f880867f2dfa47d707b0e258ef24 [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
Eric Anholt07abd912012-05-14 18:38:54 -070022SUBDIRS = src tests
Brian Paulde0ee312004-03-26 15:19:11 +000023
Brian Paul6d50d912004-07-01 15:32:51 +000024doxygen:
Dan Nicholsoncba14d82008-05-06 12:29:53 -070025 cd doxygen && $(MAKE)
Brian Paul6d50d912004-07-01 15:32:51 +000026
Eric Anholt07abd912012-05-14 18:38:54 -070027check-local:
28 $(MAKE) -C src/glsl/tests check
Paul Berry659cded2011-07-05 11:52:06 -070029
Eric Anholt07abd912012-05-14 18:38:54 -070030clean-local:
31 -@touch $(top_builddir)/configs/current
Dan Nicholsona6464b32008-05-07 11:35:23 -070032 -@for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060033 if [ -d $$dir ] ; then \
34 (cd $$dir && $(MAKE) clean) ; \
35 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000036 done
Eric Anholt07abd912012-05-14 18:38:54 -070037 -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
Brian Paulde0ee312004-03-26 15:19:11 +000038
39
Eric Anholt07abd912012-05-14 18:38:54 -070040
41distclean-local:
Brian Paulde0ee312004-03-26 15:19:11 +000042 -rm -rf lib*
Eric Anholt07abd912012-05-14 18:38:54 -070043 -rm -f $(top_builddir)/configs/current
44 -rm -f $(top_builddir)/configs/autoconf
Dan Nicholsonc5e2b852008-05-06 14:00:43 -070045 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
46 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
Keith Whitwellae68c322004-12-15 11:03:41 +000047
Eric Anholt07abd912012-05-14 18:38:54 -070048.PHONY: doxygen
Brian Paulde0ee312004-03-26 15:19:11 +000049
Brian Paulde0ee312004-03-26 15:19:11 +000050# Rules for making release tarballs
51
Ian Romanick46883e02012-02-10 15:34:08 -080052PACKAGE_VERSION=8.1-devel
José Fonseca9a7f84d2011-07-14 17:28:52 +010053PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
54PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +000055
José Fonseca9a7f84d2011-07-14 17:28:52 +010056EXTRA_FILES = \
57 aclocal.m4 \
58 configure \
Jakob Bornecrantz6fe42b62012-01-12 00:36:23 +010059 tests/Makefile.in \
60 tests/glx/Makefile.in \
José Fonseca9a7f84d2011-07-14 17:28:52 +010061 src/glsl/glsl_parser.cpp \
62 src/glsl/glsl_parser.h \
63 src/glsl/glsl_lexer.cpp \
64 src/glsl/glcpp/glcpp-lex.c \
65 src/glsl/glcpp/glcpp-parse.c \
66 src/glsl/glcpp/glcpp-parse.h \
Jakob Bornecrantz56d05a82012-03-20 13:24:50 +000067 src/mesa/main/api_exec_es1.c \
68 src/mesa/main/api_exec_es1_dispatch.h \
69 src/mesa/main/api_exec_es1_remap_helper.h \
70 src/mesa/main/api_exec_es2.c \
71 src/mesa/main/api_exec_es2_dispatch.h \
72 src/mesa/main/api_exec_es2_remap_helper.h \
José Fonseca9a7f84d2011-07-14 17:28:52 +010073 src/mesa/program/lex.yy.c \
74 src/mesa/program/program_parse.tab.c \
75 src/mesa/program/program_parse.tab.h
Chia-I Wu238f7822010-05-07 22:09:45 +080076
José Fonseca9a7f84d2011-07-14 17:28:52 +010077IGNORE_FILES = \
78 -x autogen.sh
Brian Paulde0ee312004-03-26 15:19:11 +000079
Brian Pauldff11bb2005-07-21 18:44:52 +000080
Ian Romanick654adaa2011-02-11 16:44:11 -080081parsers: configure
Eric Anholt07abd912012-05-14 18:38:54 -070082 -@touch $(top_builddir)/configs/current
Ian Romanick654adaa2011-02-11 16:44:11 -080083 $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
84 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
José Fonseca864eb842011-07-14 17:33:30 +010085 $(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 -080086
Brian Paul281f8552004-09-09 18:17:36 +000087# Everything for new a Mesa release:
José Fonseca9a7f84d2011-07-14 17:28:52 +010088ARCHIVES = $(PACKAGE_NAME).tar.gz \
89 $(PACKAGE_NAME).tar.bz2 \
Eric Anholt07abd912012-05-14 18:38:54 -070090 $(PACKAGE_NAME).zip
Brian Paul281f8552004-09-09 18:17:36 +000091
Ian Romanick654adaa2011-02-11 16:44:11 -080092tarballs: md5
José Fonseca9a7f84d2011-07-14 17:28:52 +010093 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
Brian Paul281f8552004-09-09 18:17:36 +000094
José Fonseca9a7f84d2011-07-14 17:28:52 +010095manifest.txt: .git
96 ( \
97 ls -1 $(EXTRA_FILES) ; \
98 git ls-files $(IGNORE_FILES) \
99 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
Brian Paul24e2f612009-10-14 10:56:29 -0600100
José Fonseca9a7f84d2011-07-14 17:28:52 +0100101../$(PACKAGE_DIR):
102 ln -s $(PWD) $@
Brian Paulde0ee312004-03-26 15:19:11 +0000103
José Fonseca9a7f84d2011-07-14 17:28:52 +0100104$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
105 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
Brian Paul80cef692005-09-10 16:54:05 +0000106
José Fonseca9a7f84d2011-07-14 17:28:52 +0100107$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
108 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
Brian Paulde0ee312004-03-26 15:19:11 +0000109
José Fonseca9a7f84d2011-07-14 17:28:52 +0100110$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
111 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
Brian Paul80cef692005-09-10 16:54:05 +0000112
José Fonseca9a7f84d2011-07-14 17:28:52 +0100113$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
114 rm -f $(PACKAGE_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000115 cd .. ; \
José Fonseca9a7f84d2011-07-14 17:28:52 +0100116 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
117 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
Brian Paul80cef692005-09-10 16:54:05 +0000118
Ian Romanick10342842011-02-11 16:27:22 -0800119md5: $(ARCHIVES)
José Fonseca9a7f84d2011-07-14 17:28:52 +0100120 @-md5sum $(PACKAGE_NAME).tar.gz
121 @-md5sum $(PACKAGE_NAME).tar.bz2
122 @-md5sum $(PACKAGE_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700123
Eric Anholt07abd912012-05-14 18:38:54 -0700124.PHONY: tarballs md5