blob: e8c7b597c31975d1e9d7e954a186785b5877cf04 [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:
Ian Romanicka29ad2b2012-05-29 11:28:11 -070028 $(MAKE) -C src/mapi/glapi/tests check
Ian Romanick45d3d0a2012-08-01 14:48:27 -070029 $(MAKE) -C src/mapi/shared-glapi/tests check
Ian Romanick8fecdcc2012-05-25 08:26:33 -070030 $(MAKE) -C src/mesa/main/tests check
Eric Anholt07abd912012-05-14 18:38:54 -070031 $(MAKE) -C src/glsl/tests check
Ian Romanick2e8c8662012-05-23 15:23:22 -070032 $(MAKE) -C src/glx/tests check
Paul Berry659cded2011-07-05 11:52:06 -070033
Eric Anholt07abd912012-05-14 18:38:54 -070034clean-local:
35 -@touch $(top_builddir)/configs/current
Dan Nicholsona6464b32008-05-07 11:35:23 -070036 -@for dir in $(SUBDIRS) ; do \
Brian16c503f2007-05-09 16:22:53 -060037 if [ -d $$dir ] ; then \
38 (cd $$dir && $(MAKE) clean) ; \
39 fi \
Brian Paulde0ee312004-03-26 15:19:11 +000040 done
Eric Anholt07abd912012-05-14 18:38:54 -070041 -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
Brian Paulde0ee312004-03-26 15:19:11 +000042
43
Eric Anholt07abd912012-05-14 18:38:54 -070044
45distclean-local:
Brian Paulde0ee312004-03-26 15:19:11 +000046 -rm -rf lib*
Eric Anholt07abd912012-05-14 18:38:54 -070047 -rm -f $(top_builddir)/configs/current
Dan Nicholsonc5e2b852008-05-06 14:00:43 -070048 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
49 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
Keith Whitwellae68c322004-12-15 11:03:41 +000050
Eric Anholt07abd912012-05-14 18:38:54 -070051.PHONY: doxygen
Brian Paulde0ee312004-03-26 15:19:11 +000052
Brian Paulde0ee312004-03-26 15:19:11 +000053# Rules for making release tarballs
54
Ian Romanick46883e02012-02-10 15:34:08 -080055PACKAGE_VERSION=8.1-devel
José Fonseca9a7f84d2011-07-14 17:28:52 +010056PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
57PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +000058
José Fonseca9a7f84d2011-07-14 17:28:52 +010059EXTRA_FILES = \
60 aclocal.m4 \
61 configure \
Jon TURNEY68e04cc2012-06-28 23:15:48 +010062 src/glsl/glsl_parser.cc \
José Fonseca9a7f84d2011-07-14 17:28:52 +010063 src/glsl/glsl_parser.h \
Jon TURNEY68e04cc2012-06-28 23:15:48 +010064 src/glsl/glsl_lexer.cc \
José Fonseca9a7f84d2011-07-14 17:28:52 +010065 src/glsl/glcpp/glcpp-lex.c \
66 src/glsl/glcpp/glcpp-parse.c \
67 src/glsl/glcpp/glcpp-parse.h \
Jakob Bornecrantz56d05a82012-03-20 13:24:50 +000068 src/mesa/main/api_exec_es1.c \
69 src/mesa/main/api_exec_es1_dispatch.h \
70 src/mesa/main/api_exec_es1_remap_helper.h \
71 src/mesa/main/api_exec_es2.c \
72 src/mesa/main/api_exec_es2_dispatch.h \
73 src/mesa/main/api_exec_es2_remap_helper.h \
José Fonseca9a7f84d2011-07-14 17:28:52 +010074 src/mesa/program/lex.yy.c \
75 src/mesa/program/program_parse.tab.c \
76 src/mesa/program/program_parse.tab.h
Chia-I Wu238f7822010-05-07 22:09:45 +080077
José Fonseca9a7f84d2011-07-14 17:28:52 +010078IGNORE_FILES = \
79 -x autogen.sh
Brian Paulde0ee312004-03-26 15:19:11 +000080
Brian Pauldff11bb2005-07-21 18:44:52 +000081
Ian Romanick654adaa2011-02-11 16:44:11 -080082parsers: configure
Eric Anholt07abd912012-05-14 18:38:54 -070083 -@touch $(top_builddir)/configs/current
Jon TURNEY68e04cc2012-06-28 23:15:48 +010084 $(MAKE) -C src/glsl glsl_parser.cc glsl_parser.h glsl_lexer.cc
Ian Romanick654adaa2011-02-11 16:44:11 -080085 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
José Fonseca864eb842011-07-14 17:33:30 +010086 $(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 -080087
Brian Paul281f8552004-09-09 18:17:36 +000088# Everything for new a Mesa release:
José Fonseca9a7f84d2011-07-14 17:28:52 +010089ARCHIVES = $(PACKAGE_NAME).tar.gz \
90 $(PACKAGE_NAME).tar.bz2 \
Eric Anholt07abd912012-05-14 18:38:54 -070091 $(PACKAGE_NAME).zip
Brian Paul281f8552004-09-09 18:17:36 +000092
Ian Romanick654adaa2011-02-11 16:44:11 -080093tarballs: md5
José Fonseca9a7f84d2011-07-14 17:28:52 +010094 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
Brian Paul281f8552004-09-09 18:17:36 +000095
José Fonseca9a7f84d2011-07-14 17:28:52 +010096manifest.txt: .git
97 ( \
98 ls -1 $(EXTRA_FILES) ; \
99 git ls-files $(IGNORE_FILES) \
100 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
Brian Paul24e2f612009-10-14 10:56:29 -0600101
José Fonseca9a7f84d2011-07-14 17:28:52 +0100102../$(PACKAGE_DIR):
103 ln -s $(PWD) $@
Brian Paulde0ee312004-03-26 15:19:11 +0000104
José Fonseca9a7f84d2011-07-14 17:28:52 +0100105$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
106 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
Brian Paul80cef692005-09-10 16:54:05 +0000107
José Fonseca9a7f84d2011-07-14 17:28:52 +0100108$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
109 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
Brian Paulde0ee312004-03-26 15:19:11 +0000110
José Fonseca9a7f84d2011-07-14 17:28:52 +0100111$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
112 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
Brian Paul80cef692005-09-10 16:54:05 +0000113
José Fonseca9a7f84d2011-07-14 17:28:52 +0100114$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
115 rm -f $(PACKAGE_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000116 cd .. ; \
José Fonseca9a7f84d2011-07-14 17:28:52 +0100117 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
118 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
Brian Paul80cef692005-09-10 16:54:05 +0000119
Ian Romanick10342842011-02-11 16:27:22 -0800120md5: $(ARCHIVES)
José Fonseca9a7f84d2011-07-14 17:28:52 +0100121 @-md5sum $(PACKAGE_NAME).tar.gz
122 @-md5sum $(PACKAGE_NAME).tar.bz2
123 @-md5sum $(PACKAGE_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700124
Eric Anholt07abd912012-05-14 18:38:54 -0700125.PHONY: tarballs md5