blob: 008ac71290252c19819d04da4b6b7a0b32b244ff [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
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
Ian Romanick2e8c8662012-05-23 15:23:22 -070029 $(MAKE) -C src/glx/tests check
Paul Berry659cded2011-07-05 11:52:06 -070030
Eric Anholt07abd912012-05-14 18:38:54 -070031clean-local:
32 -@touch $(top_builddir)/configs/current
Dan Nicholsona6464b32008-05-07 11:35:23 -070033 -@for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060034 if [ -d $$dir ] ; then \
35 (cd $$dir && $(MAKE) clean) ; \
36 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000037 done
Eric Anholt07abd912012-05-14 18:38:54 -070038 -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
Brian Paulde0ee312004-03-26 15:19:11 +000039
40
Eric Anholt07abd912012-05-14 18:38:54 -070041
42distclean-local:
Brian Paulde0ee312004-03-26 15:19:11 +000043 -rm -rf lib*
Eric Anholt07abd912012-05-14 18:38:54 -070044 -rm -f $(top_builddir)/configs/current
45 -rm -f $(top_builddir)/configs/autoconf
Dan Nicholsonc5e2b852008-05-06 14:00:43 -070046 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
47 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
Keith Whitwellae68c322004-12-15 11:03:41 +000048
Eric Anholt07abd912012-05-14 18:38:54 -070049.PHONY: doxygen
Brian Paulde0ee312004-03-26 15:19:11 +000050
Brian Paulde0ee312004-03-26 15:19:11 +000051# Rules for making release tarballs
52
Ian Romanick46883e02012-02-10 15:34:08 -080053PACKAGE_VERSION=8.1-devel
José Fonseca9a7f84d2011-07-14 17:28:52 +010054PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
55PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +000056
José Fonseca9a7f84d2011-07-14 17:28:52 +010057EXTRA_FILES = \
58 aclocal.m4 \
59 configure \
60 src/glsl/glsl_parser.cpp \
61 src/glsl/glsl_parser.h \
62 src/glsl/glsl_lexer.cpp \
63 src/glsl/glcpp/glcpp-lex.c \
64 src/glsl/glcpp/glcpp-parse.c \
65 src/glsl/glcpp/glcpp-parse.h \
Jakob Bornecrantz56d05a82012-03-20 13:24:50 +000066 src/mesa/main/api_exec_es1.c \
67 src/mesa/main/api_exec_es1_dispatch.h \
68 src/mesa/main/api_exec_es1_remap_helper.h \
69 src/mesa/main/api_exec_es2.c \
70 src/mesa/main/api_exec_es2_dispatch.h \
71 src/mesa/main/api_exec_es2_remap_helper.h \
José Fonseca9a7f84d2011-07-14 17:28:52 +010072 src/mesa/program/lex.yy.c \
73 src/mesa/program/program_parse.tab.c \
74 src/mesa/program/program_parse.tab.h
Chia-I Wu238f7822010-05-07 22:09:45 +080075
José Fonseca9a7f84d2011-07-14 17:28:52 +010076IGNORE_FILES = \
77 -x autogen.sh
Brian Paulde0ee312004-03-26 15:19:11 +000078
Brian Pauldff11bb2005-07-21 18:44:52 +000079
Ian Romanick654adaa2011-02-11 16:44:11 -080080parsers: configure
Eric Anholt07abd912012-05-14 18:38:54 -070081 -@touch $(top_builddir)/configs/current
Ian Romanick654adaa2011-02-11 16:44:11 -080082 $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
83 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
José Fonseca864eb842011-07-14 17:33:30 +010084 $(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 -080085
Brian Paul281f8552004-09-09 18:17:36 +000086# Everything for new a Mesa release:
José Fonseca9a7f84d2011-07-14 17:28:52 +010087ARCHIVES = $(PACKAGE_NAME).tar.gz \
88 $(PACKAGE_NAME).tar.bz2 \
Eric Anholt07abd912012-05-14 18:38:54 -070089 $(PACKAGE_NAME).zip
Brian Paul281f8552004-09-09 18:17:36 +000090
Ian Romanick654adaa2011-02-11 16:44:11 -080091tarballs: md5
José Fonseca9a7f84d2011-07-14 17:28:52 +010092 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
Brian Paul281f8552004-09-09 18:17:36 +000093
José Fonseca9a7f84d2011-07-14 17:28:52 +010094manifest.txt: .git
95 ( \
96 ls -1 $(EXTRA_FILES) ; \
97 git ls-files $(IGNORE_FILES) \
98 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
Brian Paul24e2f612009-10-14 10:56:29 -060099
José Fonseca9a7f84d2011-07-14 17:28:52 +0100100../$(PACKAGE_DIR):
101 ln -s $(PWD) $@
Brian Paulde0ee312004-03-26 15:19:11 +0000102
José Fonseca9a7f84d2011-07-14 17:28:52 +0100103$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
104 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
Brian Paul80cef692005-09-10 16:54:05 +0000105
José Fonseca9a7f84d2011-07-14 17:28:52 +0100106$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
107 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
Brian Paulde0ee312004-03-26 15:19:11 +0000108
José Fonseca9a7f84d2011-07-14 17:28:52 +0100109$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
110 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
Brian Paul80cef692005-09-10 16:54:05 +0000111
José Fonseca9a7f84d2011-07-14 17:28:52 +0100112$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
113 rm -f $(PACKAGE_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000114 cd .. ; \
José Fonseca9a7f84d2011-07-14 17:28:52 +0100115 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
116 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
Brian Paul80cef692005-09-10 16:54:05 +0000117
Ian Romanick10342842011-02-11 16:27:22 -0800118md5: $(ARCHIVES)
José Fonseca9a7f84d2011-07-14 17:28:52 +0100119 @-md5sum $(PACKAGE_NAME).tar.gz
120 @-md5sum $(PACKAGE_NAME).tar.bz2
121 @-md5sum $(PACKAGE_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700122
Eric Anholt07abd912012-05-14 18:38:54 -0700123.PHONY: tarballs md5