blob: e00af4236b63ca7f3902592c5ccc3663d559575e [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 Turnerbaedd682014-12-17 12:41:02 -080024DISTCHECK_CONFIGURE_FLAGS = \
25 --enable-dri3 \
26 --enable-gallium-tests \
27 --enable-gbm \
28 --enable-gles1 \
29 --enable-gles2 \
30 --enable-glx-tls \
31 --enable-va \
32 --enable-vdpau \
33 --enable-xa \
34 --enable-xvmc \
35 --with-egl-platforms=x11,wayland,drm
36
Matt Turner7da12422012-09-18 20:21:47 -070037ACLOCAL_AMFLAGS = -I m4
38
Brian Paulde0ee312004-03-26 15:19:11 +000039# Rules for making release tarballs
40
José Fonseca9a7f84d2011-07-14 17:28:52 +010041PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
42PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
Brian Paulde0ee312004-03-26 15:19:11 +000043
Matt Turner0ac98e72014-12-07 13:30:24 -080044EXTRA_DIST = \
Matt Turnerd51150a2014-12-07 14:48:15 -080045 autogen.sh \
Matt Turner952b3242014-12-07 14:07:32 -080046 common.py \
Matt Turner0ac98e72014-12-07 13:30:24 -080047 docs \
Matt Turner952b3242014-12-07 14:07:32 -080048 doxygen \
49 scons \
50 SConstruct
Matt Turner0ac98e72014-12-07 13:30:24 -080051
José Fonseca9a7f84d2011-07-14 17:28:52 +010052EXTRA_FILES = \
53 aclocal.m4 \
54 configure \
Andreas Boll8a9f0fd2012-11-14 21:43:31 +010055 bin/ar-lib \
56 bin/compile \
Andreas Bolla0a90ea2012-11-14 21:34:44 +010057 bin/config.sub \
58 bin/config.guess \
Andreas Boll8a9f0fd2012-11-14 21:43:31 +010059 bin/depcomp \
Matt Turnerec57fbb2012-10-23 10:57:15 -070060 bin/install-sh \
Andreas Boll8a9f0fd2012-11-14 21:43:31 +010061 bin/ltmain.sh \
62 bin/missing \
63 bin/ylwrap \
Carl Worth93e399f2013-12-12 21:33:02 -080064 bin/test-driver \
Matt Turner86d30de2013-01-14 22:00:08 -080065 src/glsl/glsl_parser.cpp \
José Fonseca9a7f84d2011-07-14 17:28:52 +010066 src/glsl/glsl_parser.h \
Matt Turner86d30de2013-01-14 22:00:08 -080067 src/glsl/glsl_lexer.cpp \
José Fonseca9a7f84d2011-07-14 17:28:52 +010068 src/glsl/glcpp/glcpp-lex.c \
69 src/glsl/glcpp/glcpp-parse.c \
70 src/glsl/glcpp/glcpp-parse.h \
71 src/mesa/program/lex.yy.c \
72 src/mesa/program/program_parse.tab.c \
Andreas Bollbc08f262012-11-14 21:39:15 +010073 src/mesa/program/program_parse.tab.h \
Andreas Boll0f5e2ce2012-11-16 10:46:06 +010074 `git ls-files | grep "Makefile.am" | sed -e "s/Makefile.am/Makefile.in/"`
Andreas Bollbc08f262012-11-14 21:39:15 +010075
Matt Turner55afbcc2013-11-11 19:45:05 -080076noinst_HEADERS = \
77 include/c99_compat.h \
78 include/c99 \
79 include/c11 \
80 include/D3D9 \
81 include/HaikuGL \
82 include/pci_ids
Chia-I Wu238f7822010-05-07 22:09:45 +080083
José Fonseca9a7f84d2011-07-14 17:28:52 +010084IGNORE_FILES = \
85 -x autogen.sh
Brian Paulde0ee312004-03-26 15:19:11 +000086
Brian Pauldff11bb2005-07-21 18:44:52 +000087
Ian Romanick654adaa2011-02-11 16:44:11 -080088parsers: configure
Matt Turner86d30de2013-01-14 22:00:08 -080089 $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
Ian Romanick654adaa2011-02-11 16:44:11 -080090
Brian Paul281f8552004-09-09 18:17:36 +000091# Everything for new a Mesa release:
José Fonseca9a7f84d2011-07-14 17:28:52 +010092ARCHIVES = $(PACKAGE_NAME).tar.gz \
93 $(PACKAGE_NAME).tar.bz2 \
Eric Anholt07abd912012-05-14 18:38:54 -070094 $(PACKAGE_NAME).zip
Brian Paul281f8552004-09-09 18:17:36 +000095
Carl Worth46d03d32014-08-21 09:03:02 -070096tarballs: checksums
José Fonseca9a7f84d2011-07-14 17:28:52 +010097 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
Brian Paul281f8552004-09-09 18:17:36 +000098
José Fonseca9a7f84d2011-07-14 17:28:52 +010099manifest.txt: .git
100 ( \
101 ls -1 $(EXTRA_FILES) ; \
102 git ls-files $(IGNORE_FILES) \
103 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
Brian Paul24e2f612009-10-14 10:56:29 -0600104
José Fonseca9a7f84d2011-07-14 17:28:52 +0100105../$(PACKAGE_DIR):
106 ln -s $(PWD) $@
Brian Paulde0ee312004-03-26 15:19:11 +0000107
José Fonseca9a7f84d2011-07-14 17:28:52 +0100108$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
109 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
Brian Paul80cef692005-09-10 16:54:05 +0000110
José Fonseca9a7f84d2011-07-14 17:28:52 +0100111$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
112 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
Brian Paulde0ee312004-03-26 15:19:11 +0000113
José Fonseca9a7f84d2011-07-14 17:28:52 +0100114$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
115 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
Brian Paul80cef692005-09-10 16:54:05 +0000116
José Fonseca9a7f84d2011-07-14 17:28:52 +0100117$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
118 rm -f $(PACKAGE_NAME).zip ; \
Brian Paulde0ee312004-03-26 15:19:11 +0000119 cd .. ; \
José Fonseca9a7f84d2011-07-14 17:28:52 +0100120 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
121 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
Brian Paul80cef692005-09-10 16:54:05 +0000122
Carl Worth46d03d32014-08-21 09:03:02 -0700123checksums: $(ARCHIVES)
124 @-sha256sum $(PACKAGE_NAME).tar.gz
125 @-sha256sum $(PACKAGE_NAME).tar.bz2
126 @-sha256sum $(PACKAGE_NAME).zip
Dan Nicholson50f7e6f2008-05-06 11:52:34 -0700127
Carl Worth7528f6f2014-08-26 16:13:14 -0700128.PHONY: tarballs checksums
Matt Turnera2672122014-12-07 13:21:53 -0800129
130# We list some directories in EXTRA_DIST, but don't actually want to include
131# the .gitignore files in the tarball.
132dist-hook:
133 find $(distdir) -name .gitignore -exec $(RM) {} +