Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 1 | # 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 Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 21 | |
Ian Romanick | 2e8c866 | 2012-05-23 15:23:22 -0700 | [diff] [blame] | 22 | SUBDIRS = src |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 23 | |
Matt Turner | 7da1242 | 2012-09-18 20:21:47 -0700 | [diff] [blame] | 24 | ACLOCAL_AMFLAGS = -I m4 |
| 25 | |
Brian Paul | 6d50d91 | 2004-07-01 15:32:51 +0000 | [diff] [blame] | 26 | doxygen: |
Dan Nicholson | cba14d8 | 2008-05-06 12:29:53 -0700 | [diff] [blame] | 27 | cd doxygen && $(MAKE) |
Brian Paul | 6d50d91 | 2004-07-01 15:32:51 +0000 | [diff] [blame] | 28 | |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 29 | check-local: |
Ian Romanick | a29ad2b | 2012-05-29 11:28:11 -0700 | [diff] [blame] | 30 | $(MAKE) -C src/mapi/glapi/tests check |
Ian Romanick | 45d3d0a | 2012-08-01 14:48:27 -0700 | [diff] [blame] | 31 | $(MAKE) -C src/mapi/shared-glapi/tests check |
Ian Romanick | 8fecdcc | 2012-05-25 08:26:33 -0700 | [diff] [blame] | 32 | $(MAKE) -C src/mesa/main/tests check |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 33 | $(MAKE) -C src/glsl/tests check |
Ian Romanick | 2e8c866 | 2012-05-23 15:23:22 -0700 | [diff] [blame] | 34 | $(MAKE) -C src/glx/tests check |
Paul Berry | 659cded | 2011-07-05 11:52:06 -0700 | [diff] [blame] | 35 | |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 36 | clean-local: |
| 37 | -@touch $(top_builddir)/configs/current |
Dan Nicholson | a6464b3 | 2008-05-07 11:35:23 -0700 | [diff] [blame] | 38 | -@for dir in $(SUBDIRS) ; do \ |
Brian | 16c503f | 2007-05-09 16:22:53 -0600 | [diff] [blame] | 39 | if [ -d $$dir ] ; then \ |
| 40 | (cd $$dir && $(MAKE) clean) ; \ |
| 41 | fi \ |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 42 | done |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 43 | -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 44 | |
| 45 | |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 46 | |
| 47 | distclean-local: |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 48 | -rm -rf lib* |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 49 | -rm -f $(top_builddir)/configs/current |
Dan Nicholson | c5e2b85 | 2008-05-06 14:00:43 -0700 | [diff] [blame] | 50 | -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \ |
| 51 | -name depend -o -name depend.bak ')' -exec rm -f '{}' ';' |
Keith Whitwell | ae68c32 | 2004-12-15 11:03:41 +0000 | [diff] [blame] | 52 | |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 53 | .PHONY: doxygen |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 54 | |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 55 | # Rules for making release tarballs |
| 56 | |
Andreas Boll | e81ee67 | 2012-09-07 23:49:01 +0200 | [diff] [blame] | 57 | PACKAGE_VERSION=9.1-devel |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 58 | PACKAGE_DIR = Mesa-$(PACKAGE_VERSION) |
| 59 | PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 60 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 61 | EXTRA_FILES = \ |
| 62 | aclocal.m4 \ |
| 63 | configure \ |
Andreas Boll | a0a90ea | 2012-11-14 21:34:44 +0100 | [diff] [blame^] | 64 | bin/config.sub \ |
| 65 | bin/config.guess \ |
Matt Turner | ec57fbb | 2012-10-23 10:57:15 -0700 | [diff] [blame] | 66 | bin/install-sh \ |
Jon TURNEY | 68e04cc | 2012-06-28 23:15:48 +0100 | [diff] [blame] | 67 | src/glsl/glsl_parser.cc \ |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 68 | src/glsl/glsl_parser.h \ |
Jon TURNEY | 68e04cc | 2012-06-28 23:15:48 +0100 | [diff] [blame] | 69 | src/glsl/glsl_lexer.cc \ |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 70 | src/glsl/glcpp/glcpp-lex.c \ |
| 71 | src/glsl/glcpp/glcpp-parse.c \ |
| 72 | src/glsl/glcpp/glcpp-parse.h \ |
Jakob Bornecrantz | 56d05a8 | 2012-03-20 13:24:50 +0000 | [diff] [blame] | 73 | src/mesa/main/api_exec_es1.c \ |
| 74 | src/mesa/main/api_exec_es1_dispatch.h \ |
| 75 | src/mesa/main/api_exec_es1_remap_helper.h \ |
| 76 | src/mesa/main/api_exec_es2.c \ |
| 77 | src/mesa/main/api_exec_es2_dispatch.h \ |
| 78 | src/mesa/main/api_exec_es2_remap_helper.h \ |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 79 | src/mesa/program/lex.yy.c \ |
| 80 | src/mesa/program/program_parse.tab.c \ |
| 81 | src/mesa/program/program_parse.tab.h |
Chia-I Wu | 238f782 | 2010-05-07 22:09:45 +0800 | [diff] [blame] | 82 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 83 | IGNORE_FILES = \ |
| 84 | -x autogen.sh |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 85 | |
Brian Paul | dff11bb | 2005-07-21 18:44:52 +0000 | [diff] [blame] | 86 | |
Ian Romanick | 654adaa | 2011-02-11 16:44:11 -0800 | [diff] [blame] | 87 | parsers: configure |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 88 | -@touch $(top_builddir)/configs/current |
Jon TURNEY | 68e04cc | 2012-06-28 23:15:48 +0100 | [diff] [blame] | 89 | $(MAKE) -C src/glsl glsl_parser.cc glsl_parser.h glsl_lexer.cc |
Ian Romanick | 654adaa | 2011-02-11 16:44:11 -0800 | [diff] [blame] | 90 | $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h |
José Fonseca | 864eb84 | 2011-07-14 17:33:30 +0100 | [diff] [blame] | 91 | $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h |
Ian Romanick | 654adaa | 2011-02-11 16:44:11 -0800 | [diff] [blame] | 92 | |
Brian Paul | 281f855 | 2004-09-09 18:17:36 +0000 | [diff] [blame] | 93 | # Everything for new a Mesa release: |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 94 | ARCHIVES = $(PACKAGE_NAME).tar.gz \ |
| 95 | $(PACKAGE_NAME).tar.bz2 \ |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 96 | $(PACKAGE_NAME).zip |
Brian Paul | 281f855 | 2004-09-09 18:17:36 +0000 | [diff] [blame] | 97 | |
Ian Romanick | 654adaa | 2011-02-11 16:44:11 -0800 | [diff] [blame] | 98 | tarballs: md5 |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 99 | rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar |
Brian Paul | 281f855 | 2004-09-09 18:17:36 +0000 | [diff] [blame] | 100 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 101 | manifest.txt: .git |
| 102 | ( \ |
| 103 | ls -1 $(EXTRA_FILES) ; \ |
| 104 | git ls-files $(IGNORE_FILES) \ |
| 105 | ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@ |
Brian Paul | 24e2f61 | 2009-10-14 10:56:29 -0600 | [diff] [blame] | 106 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 107 | ../$(PACKAGE_DIR): |
| 108 | ln -s $(PWD) $@ |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 109 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 110 | $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt |
| 111 | cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt |
Brian Paul | 80cef69 | 2005-09-10 16:54:05 +0000 | [diff] [blame] | 112 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 113 | $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR) |
| 114 | gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 115 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 116 | $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar |
| 117 | bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2 |
Brian Paul | 80cef69 | 2005-09-10 16:54:05 +0000 | [diff] [blame] | 118 | |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 119 | $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt |
| 120 | rm -f $(PACKAGE_NAME).zip ; \ |
Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame] | 121 | cd .. ; \ |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 122 | zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \ |
| 123 | mv $(PACKAGE_NAME).zip $(PACKAGE_DIR) |
Brian Paul | 80cef69 | 2005-09-10 16:54:05 +0000 | [diff] [blame] | 124 | |
Ian Romanick | 1034284 | 2011-02-11 16:27:22 -0800 | [diff] [blame] | 125 | md5: $(ARCHIVES) |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 126 | @-md5sum $(PACKAGE_NAME).tar.gz |
| 127 | @-md5sum $(PACKAGE_NAME).tar.bz2 |
| 128 | @-md5sum $(PACKAGE_NAME).zip |
Dan Nicholson | 50f7e6f | 2008-05-06 11:52:34 -0700 | [diff] [blame] | 129 | |
Eric Anholt | 07abd91 | 2012-05-14 18:38:54 -0700 | [diff] [blame] | 130 | .PHONY: tarballs md5 |