OSDN Git Service

mesa/tests: Add tests for the generated shared-glapi dispatch table
[android-x86/external-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 doxygen:
25         cd doxygen && $(MAKE)
26
27 check-local:
28         $(MAKE) -C src/mapi/glapi/tests check
29         $(MAKE) -C src/mapi/shared-glapi/tests check
30         $(MAKE) -C src/mesa/main/tests check
31         $(MAKE) -C src/glsl/tests check
32         $(MAKE) -C src/glx/tests check
33
34 clean-local:
35         -@touch $(top_builddir)/configs/current
36         -@for dir in $(SUBDIRS) ; do \
37                 if [ -d $$dir ] ; then \
38                         (cd $$dir && $(MAKE) clean) ; \
39                 fi \
40         done
41         -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
42
43
44
45 distclean-local:
46         -rm -rf lib*
47         -rm -f $(top_builddir)/configs/current
48         -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
49           -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
50
51 .PHONY: doxygen
52
53 # Rules for making release tarballs
54
55 PACKAGE_VERSION=8.1-devel
56 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
57 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
58
59 EXTRA_FILES = \
60         aclocal.m4                                      \
61         configure                                       \
62         src/glsl/glsl_parser.cc                         \
63         src/glsl/glsl_parser.h                          \
64         src/glsl/glsl_lexer.cc                          \
65         src/glsl/glcpp/glcpp-lex.c                      \
66         src/glsl/glcpp/glcpp-parse.c                    \
67         src/glsl/glcpp/glcpp-parse.h                    \
68         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       \
74         src/mesa/program/lex.yy.c                       \
75         src/mesa/program/program_parse.tab.c            \
76         src/mesa/program/program_parse.tab.h
77
78 IGNORE_FILES = \
79         -x autogen.sh
80
81
82 parsers: configure
83         -@touch $(top_builddir)/configs/current
84         $(MAKE) -C src/glsl glsl_parser.cc glsl_parser.h glsl_lexer.cc
85         $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
86         $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
87
88 # Everything for new a Mesa release:
89 ARCHIVES = $(PACKAGE_NAME).tar.gz \
90         $(PACKAGE_NAME).tar.bz2 \
91         $(PACKAGE_NAME).zip
92
93 tarballs: md5
94         rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
95
96 manifest.txt: .git
97         ( \
98                 ls -1 $(EXTRA_FILES) ; \
99                 git ls-files $(IGNORE_FILES) \
100         ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
101
102 ../$(PACKAGE_DIR):
103         ln -s $(PWD) $@
104
105 $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
106         cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
107
108 $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
109         gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
110
111 $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
112         bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
113
114 $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
115         rm -f $(PACKAGE_NAME).zip ; \
116         cd .. ; \
117         zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
118         mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
119
120 md5: $(ARCHIVES)
121         @-md5sum $(PACKAGE_NAME).tar.gz
122         @-md5sum $(PACKAGE_NAME).tar.bz2
123         @-md5sum $(PACKAGE_NAME).zip
124
125 .PHONY: tarballs md5