Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5564 | serge | 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 | AUTOMAKE_OPTIONS = subdir-objects |
||
23 | |||
24 | SUBDIRS = . main/tests |
||
25 | |||
26 | if HAVE_X11_DRIVER |
||
27 | SUBDIRS += drivers/x11 |
||
28 | endif |
||
29 | |||
30 | if HAVE_DRICOMMON |
||
31 | SUBDIRS += drivers/dri |
||
32 | endif |
||
33 | |||
34 | if HAVE_OSMESA |
||
35 | SUBDIRS += drivers/osmesa |
||
36 | endif |
||
37 | |||
38 | gldir = $(includedir)/GL |
||
39 | gl_HEADERS = $(top_srcdir)/include/GL/*.h |
||
40 | |||
41 | .PHONY: main/git_sha1.h.tmp |
||
42 | main/git_sha1.h.tmp: |
||
43 | @touch main/git_sha1.h.tmp |
||
44 | @if test -d $(top_srcdir)/.git; then \ |
||
45 | if which git > /dev/null; then \ |
||
46 | git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \ |
||
47 | sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ |
||
48 | > main/git_sha1.h.tmp ; \ |
||
49 | fi \ |
||
50 | fi |
||
51 | |||
52 | main/git_sha1.h: main/git_sha1.h.tmp |
||
53 | @echo "updating main/git_sha1.h" |
||
54 | @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \ |
||
55 | mv main/git_sha1.h.tmp main/git_sha1.h ;\ |
||
56 | else \ |
||
57 | rm main/git_sha1.h.tmp ;\ |
||
58 | fi |
||
59 | |||
60 | include Makefile.sources |
||
61 | |||
62 | EXTRA_DIST = \ |
||
63 | drivers/SConscript \ |
||
64 | main/format_info.py \ |
||
65 | main/format_pack.py \ |
||
66 | main/format_parser.py \ |
||
67 | main/format_unpack.py \ |
||
68 | main/formats.csv \ |
||
69 | main/get_hash_generator.py \ |
||
70 | main/get_hash_params.py \ |
||
71 | program/program_lexer.l \ |
||
72 | program/program_parse.y \ |
||
73 | SConscript \ |
||
74 | swrast/NOTES \ |
||
75 | swrast_setup/NOTES \ |
||
76 | tnl/NOTES \ |
||
77 | tnl_dd |
||
78 | |||
79 | BUILT_SOURCES = \ |
||
80 | main/get_hash.h \ |
||
81 | main/format_info.h \ |
||
82 | main/git_sha1.h \ |
||
83 | main/format_pack.c \ |
||
84 | main/format_unpack.c \ |
||
85 | program/program_parse.tab.c \ |
||
86 | program/lex.yy.c |
||
87 | CLEANFILES = \ |
||
88 | $(BUILT_SOURCES) \ |
||
89 | program/program_parse.tab.h \ |
||
90 | main/git_sha1.h.tmp |
||
91 | |||
92 | GET_HASH_GEN = main/get_hash_generator.py |
||
93 | |||
94 | main/get_hash.h: ../mapi/glapi/gen/gl_and_es_API.xml main/get_hash_params.py \ |
||
95 | $(GET_HASH_GEN) |
||
96 | $(AM_V_GEN)set -e; \ |
||
97 | $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN) \ |
||
98 | -f $< > $@.tmp; \ |
||
99 | mv $@.tmp $@; |
||
100 | |||
101 | main/format_info.h: main/formats.csv \ |
||
102 | main/format_parser.py main/format_info.py |
||
103 | $(AM_V_GEN)set -e; \ |
||
104 | $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/format_info.py \ |
||
105 | $< > $@.tmp; \ |
||
106 | mv $@.tmp $@; |
||
107 | |||
108 | main/format_pack.c: main/format_pack.py main/formats.csv \ |
||
109 | main/format_parser.py |
||
110 | $(AM_V_GEN)set -e; \ |
||
111 | $(PYTHON2) $(PYTHON_FLAGS) \ |
||
112 | $(srcdir)/main/format_pack.py \ |
||
113 | $(srcdir)/main/formats.csv \ |
||
114 | | $(INDENT) $(INDENT_FLAGS) > $@; |
||
115 | |||
116 | main/format_unpack.c: main/format_unpack.py main/formats.csv \ |
||
117 | main/format_parser.py |
||
118 | $(AM_V_GEN)set -e; \ |
||
119 | $(PYTHON2) $(PYTHON_FLAGS) \ |
||
120 | $(srcdir)/main/format_unpack.py \ |
||
121 | $(srcdir)/main/formats.csv \ |
||
122 | | $(INDENT) $(INDENT_FLAGS) > $@; |
||
123 | |||
124 | main/formats.c: main/format_info.h |
||
125 | |||
126 | noinst_LTLIBRARIES = $(ARCH_LIBS) |
||
127 | if NEED_LIBMESA |
||
128 | noinst_LTLIBRARIES += libmesa.la |
||
129 | else |
||
130 | check_LTLIBRARIES = libmesa.la |
||
131 | endif |
||
132 | if HAVE_GALLIUM |
||
133 | noinst_LTLIBRARIES += libmesagallium.la |
||
134 | endif |
||
135 | |||
136 | AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS) |
||
137 | AM_CFLAGS = \ |
||
138 | $(LLVM_CFLAGS) \ |
||
139 | $(VISIBILITY_CFLAGS) \ |
||
140 | $(MSVC2013_COMPAT_CFLAGS) |
||
141 | AM_CXXFLAGS = \ |
||
142 | $(LLVM_CFLAGS) \ |
||
143 | $(VISIBILITY_CXXFLAGS) \ |
||
144 | $(MSVC2013_COMPAT_CXXFLAGS) |
||
145 | |||
146 | ARCH_LIBS = |
||
147 | |||
148 | if SSE41_SUPPORTED |
||
149 | ARCH_LIBS += libmesa_sse41.la |
||
150 | endif |
||
151 | |||
152 | MESA_ASM_FILES_FOR_ARCH = |
||
153 | |||
154 | if HAVE_X86_ASM |
||
155 | noinst_PROGRAMS = gen_matypes |
||
156 | |||
157 | gen_matypes_SOURCES = x86/gen_matypes.c |
||
158 | BUILT_SOURCES += matypes.h |
||
159 | |||
160 | if HAVE_X86_64_ASM |
||
161 | MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES) |
||
162 | AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64 |
||
163 | else |
||
164 | MESA_ASM_FILES_FOR_ARCH += $(X86_FILES) |
||
165 | AM_CPPFLAGS += -I$(builddir)/x86 -I$(srcdir)/x86 |
||
166 | endif |
||
167 | endif |
||
168 | if HAVE_SPARC_ASM |
||
169 | MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES) |
||
170 | AM_CPPFLAGS += -I$(builddir)/sparc -I$(srcdir)/sparc |
||
171 | endif |
||
172 | |||
173 | libmesa_la_SOURCES = \ |
||
174 | $(MESA_FILES) \ |
||
175 | $(PROGRAM_FILES) \ |
||
176 | $(PROGRAM_NIR_FILES) \ |
||
177 | $(MESA_ASM_FILES_FOR_ARCH) |
||
178 | |||
179 | libmesa_la_LIBADD = \ |
||
180 | $(top_builddir)/src/glsl/libglsl.la \ |
||
181 | $(ARCH_LIBS) |
||
182 | |||
183 | libmesagallium_la_SOURCES = \ |
||
184 | $(MESA_GALLIUM_FILES) \ |
||
185 | $(PROGRAM_FILES) \ |
||
186 | $(PROGRAM_NIR_FILES) \ |
||
187 | $(MESA_ASM_FILES_FOR_ARCH) |
||
188 | |||
189 | libmesagallium_la_LIBADD = \ |
||
190 | $(top_builddir)/src/glsl/libglsl.la \ |
||
191 | $(ARCH_LIBS) |
||
192 | |||
193 | libmesa_sse41_la_SOURCES = \ |
||
194 | main/streaming-load-memcpy.c \ |
||
195 | main/streaming-load-memcpy.h \ |
||
196 | main/sse_minmax.c \ |
||
197 | main/sse_minmax.h |
||
198 | libmesa_sse41_la_CFLAGS = $(AM_CFLAGS) $(SSE41_CFLAGS) |
||
199 | |||
200 | pkgconfigdir = $(libdir)/pkgconfig |
||
201 | pkgconfig_DATA = gl.pc |
||
202 | |||
203 | program/lex.yy.c: program/program_lexer.l |
||
204 | $(AM_V_at)$(MKDIR_P) program |
||
205 | $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $< |
||
206 | |||
207 | program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y |
||
208 | $(AM_V_at)$(MKDIR_P) program |
||
209 | $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $< |
||
210 | |||
211 | if GEN_ASM_OFFSETS |
||
212 | matypes.h: $(gen_matypes_SOURCES) |
||
213 | $(AM_V_GEN)$(COMPILE) $< -DASM_OFFSETS -S -o - | \ |
||
214 | sed -n '/^->/{s:^->::;/[$$]/{s:^:#define :;s:[$$]::};p}' > $@ |
||
215 | else |
||
216 | matypes.h: gen_matypes |
||
217 | $(AM_V_GEN)./gen_matypes > $@ |
||
218 | endif |
||
219 | |||
220 | # Emacs tags |
||
221 | tags: |
||
222 | etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h> |