OSDN Git Service

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