mesa: Set DISTCHECK_CONFIGURE_FLAGS.
[mesa.git] / Makefile.am
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.
21
22 SUBDIRS = src
23
24 DISTCHECK_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
37 ACLOCAL_AMFLAGS = -I m4
38
39 # Rules for making release tarballs
40
41 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
42 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
43
44 EXTRA_DIST = \
45 autogen.sh \
46 common.py \
47 docs \
48 doxygen \
49 scons \
50 SConstruct
51
52 EXTRA_FILES = \
53 aclocal.m4 \
54 configure \
55 bin/ar-lib \
56 bin/compile \
57 bin/config.sub \
58 bin/config.guess \
59 bin/depcomp \
60 bin/install-sh \
61 bin/ltmain.sh \
62 bin/missing \
63 bin/ylwrap \
64 bin/test-driver \
65 src/glsl/glsl_parser.cpp \
66 src/glsl/glsl_parser.h \
67 src/glsl/glsl_lexer.cpp \
68 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 \
73 src/mesa/program/program_parse.tab.h \
74 `git ls-files | grep "Makefile.am" | sed -e "s/Makefile.am/Makefile.in/"`
75
76 noinst_HEADERS = \
77 include/c99_compat.h \
78 include/c99 \
79 include/c11 \
80 include/D3D9 \
81 include/HaikuGL \
82 include/pci_ids
83
84 IGNORE_FILES = \
85 -x autogen.sh
86
87
88 parsers: configure
89 $(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
90
91 # Everything for new a Mesa release:
92 ARCHIVES = $(PACKAGE_NAME).tar.gz \
93 $(PACKAGE_NAME).tar.bz2 \
94 $(PACKAGE_NAME).zip
95
96 tarballs: checksums
97 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
98
99 manifest.txt: .git
100 ( \
101 ls -1 $(EXTRA_FILES) ; \
102 git ls-files $(IGNORE_FILES) \
103 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
104
105 ../$(PACKAGE_DIR):
106 ln -s $(PWD) $@
107
108 $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
109 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
110
111 $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
112 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
113
114 $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
115 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
116
117 $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
118 rm -f $(PACKAGE_NAME).zip ; \
119 cd .. ; \
120 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
121 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
122
123 checksums: $(ARCHIVES)
124 @-sha256sum $(PACKAGE_NAME).tar.gz
125 @-sha256sum $(PACKAGE_NAME).tar.bz2
126 @-sha256sum $(PACKAGE_NAME).zip
127
128 .PHONY: tarballs checksums
129
130 # We list some directories in EXTRA_DIST, but don't actually want to include
131 # the .gitignore files in the tarball.
132 dist-hook:
133 find $(distdir) -name .gitignore -exec $(RM) {} +