OSDN Git Service

build: add missing Makefile.in files to tarballs target
[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 ACLOCAL_AMFLAGS = -I m4
25
26 doxygen:
27         cd doxygen && $(MAKE)
28
29 check-local:
30         $(MAKE) -C src/mapi/glapi/tests check
31         $(MAKE) -C src/mapi/shared-glapi/tests check
32         $(MAKE) -C src/mesa/main/tests check
33         $(MAKE) -C src/glsl/tests check
34         $(MAKE) -C src/glx/tests check
35
36 clean-local:
37         -@touch $(top_builddir)/configs/current
38         -@for dir in $(SUBDIRS) ; do \
39                 if [ -d $$dir ] ; then \
40                         (cd $$dir && $(MAKE) clean) ; \
41                 fi \
42         done
43         -@test -s $(top_builddir)/configs/current || rm -f $(top_builddir)/configs/current
44
45
46
47 distclean-local:
48         -rm -rf lib*
49         -rm -f $(top_builddir)/configs/current
50         -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
51           -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
52
53 .PHONY: doxygen
54
55 # Rules for making release tarballs
56
57 PACKAGE_VERSION=9.1-devel
58 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
59 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
60
61 EXTRA_FILES = \
62         aclocal.m4                                      \
63         configure                                       \
64         bin/ar-lib                                      \
65         bin/compile                                     \
66         bin/config.sub                                  \
67         bin/config.guess                                \
68         bin/depcomp                                     \
69         bin/install-sh                                  \
70         bin/ltmain.sh                                   \
71         bin/missing                                     \
72         bin/ylwrap                                      \
73         src/glsl/glsl_parser.cc                         \
74         src/glsl/glsl_parser.h                          \
75         src/glsl/glsl_lexer.cc                          \
76         src/glsl/glcpp/glcpp-lex.c                      \
77         src/glsl/glcpp/glcpp-parse.c                    \
78         src/glsl/glcpp/glcpp-parse.h                    \
79         src/mesa/main/api_exec_es1.c                    \
80         src/mesa/main/api_exec_es1_dispatch.h           \
81         src/mesa/main/api_exec_es1_remap_helper.h       \
82         src/mesa/main/api_exec_es2.c                    \
83         src/mesa/main/api_exec_es2_dispatch.h           \
84         src/mesa/main/api_exec_es2_remap_helper.h       \
85         src/mesa/program/lex.yy.c                       \
86         src/mesa/program/program_parse.tab.c            \
87         src/mesa/program/program_parse.tab.h            \
88         src/gallium/drivers/r600/Makefile.in            \
89         src/gallium/drivers/r300/Makefile.in            \
90         src/gallium/drivers/Makefile.in                 \
91         src/gallium/Makefile.in                         \
92         src/gallium/auxiliary/pipe-loader/Makefile.in   \
93         src/gallium/targets/opencl/Makefile.in          \
94         src/gallium/state_trackers/clover/Makefile.in   \
95         src/mapi/glapi/tests/Makefile.in                \
96         src/mapi/glapi/Makefile.in                      \
97         src/mapi/glapi/gen/Makefile.in                  \
98         src/mapi/es1api/Makefile.in                     \
99         src/mapi/shared-glapi/tests/Makefile.in         \
100         src/mapi/shared-glapi/Makefile.in               \
101         src/mapi/vgapi/Makefile.in                      \
102         src/mapi/es2api/Makefile.in                     \
103         src/glsl/tests/Makefile.in                      \
104         src/glsl/glcpp/Makefile.in                      \
105         src/glsl/builtin_compiler/Makefile.in           \
106         src/glsl/Makefile.in                            \
107         src/gtest/Makefile.in                           \
108         src/egl/drivers/Makefile.in                     \
109         src/egl/drivers/glx/Makefile.in                 \
110         src/egl/drivers/dri2/Makefile.in                \
111         src/egl/Makefile.in                             \
112         src/egl/main/Makefile.in                        \
113         src/egl/wayland/Makefile.in                     \
114         src/egl/wayland/wayland-drm/Makefile.in         \
115         src/egl/wayland/wayland-egl/Makefile.in         \
116         src/Makefile.in                                 \
117         src/glx/tests/Makefile.in                       \
118         src/glx/Makefile.in                             \
119         src/gbm/Makefile.in                             \
120         src/mesa/drivers/Makefile.in                    \
121         src/mesa/drivers/dri/common/Makefile.in         \
122         src/mesa/drivers/dri/i965/Makefile.in           \
123         src/mesa/drivers/dri/r200/Makefile.in           \
124         src/mesa/drivers/dri/Makefile.in                \
125         src/mesa/drivers/dri/radeon/Makefile.in         \
126         src/mesa/drivers/dri/swrast/Makefile.in         \
127         src/mesa/drivers/dri/nouveau/Makefile.in        \
128         src/mesa/drivers/dri/i915/Makefile.in           \
129         src/mesa/drivers/osmesa/Makefile.in             \
130         src/mesa/drivers/x11/Makefile.in                \
131         src/mesa/Makefile.in                            \
132         src/mesa/libdricore/Makefile.in                 \
133         src/mesa/x86-64/Makefile.in                     \
134         src/mesa/program/Makefile.in                    \
135         src/mesa/main/tests/Makefile.in                 \
136         src/mesa/main/tests/hash_table/Makefile.in      \
137         src/mesa/x86/Makefile.in                        \
138         Makefile.in
139
140
141 IGNORE_FILES = \
142         -x autogen.sh
143
144
145 parsers: configure
146         -@touch $(top_builddir)/configs/current
147         $(MAKE) -C src/glsl glsl_parser.cc glsl_parser.h glsl_lexer.cc
148         $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
149         $(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
150
151 # Everything for new a Mesa release:
152 ARCHIVES = $(PACKAGE_NAME).tar.gz \
153         $(PACKAGE_NAME).tar.bz2 \
154         $(PACKAGE_NAME).zip
155
156 tarballs: md5
157         rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
158
159 manifest.txt: .git
160         ( \
161                 ls -1 $(EXTRA_FILES) ; \
162                 git ls-files $(IGNORE_FILES) \
163         ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
164
165 ../$(PACKAGE_DIR):
166         ln -s $(PWD) $@
167
168 $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
169         cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
170
171 $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
172         gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
173
174 $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
175         bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
176
177 $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
178         rm -f $(PACKAGE_NAME).zip ; \
179         cd .. ; \
180         zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
181         mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
182
183 md5: $(ARCHIVES)
184         @-md5sum $(PACKAGE_NAME).tar.gz
185         @-md5sum $(PACKAGE_NAME).tar.bz2
186         @-md5sum $(PACKAGE_NAME).zip
187
188 .PHONY: tarballs md5