radeonsi: enable GL_EXT_shader_image_load_formatted
[mesa.git] / src / mesa / 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 = . main/tests
23
24 # state tracker tests depend on libmesagallium.la
25 if HAVE_GALLIUM
26 SUBDIRS += state_tracker/tests
27 endif
28
29 if HAVE_XLIB_GLX
30 SUBDIRS += drivers/x11
31 endif
32
33 if HAVE_DRICOMMON
34 SUBDIRS += drivers/dri
35 endif
36
37 if HAVE_OSMESA
38 SUBDIRS += drivers/osmesa
39 endif
40
41 include Makefile.sources
42
43 EXTRA_DIST = \
44 drivers/SConscript \
45 main/meson.build \
46 program/meson.build \
47 meson.build \
48 main/format_fallback.py \
49 main/format_info.py \
50 main/format_pack.py \
51 main/format_parser.py \
52 main/format_unpack.py \
53 main/formats.csv \
54 main/get_hash_generator.py \
55 main/get_hash_params.py \
56 program/program_lexer.l \
57 program/program_parse.y \
58 SConscript \
59 swrast/NOTES \
60 swrast_setup/NOTES \
61 tnl/NOTES \
62 tnl_dd
63
64 BUILT_SOURCES = \
65 main/get_hash.h \
66 main/format_fallback.c \
67 main/format_info.h \
68 main/format_pack.c \
69 main/format_unpack.c \
70 program/program_parse.tab.c \
71 program/lex.yy.c
72 CLEANFILES = \
73 $(BUILT_SOURCES) \
74 program/program_parse.tab.h
75
76 PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
77
78 main/get_hash.h: ../mapi/glapi/gen/gl_and_es_API.xml main/get_hash_params.py \
79 main/get_hash_generator.py
80 $(PYTHON_GEN) $(srcdir)/main/get_hash_generator.py \
81 -f $(srcdir)/../mapi/glapi/gen/gl_and_es_API.xml > $@
82
83 main/format_fallback.c: main/format_fallback.py \
84 main/format_parser.py \
85 main/formats.csv
86 $(PYTHON_GEN) $(srcdir)/main/format_fallback.py $(srcdir)/main/formats.csv $@
87
88 main/format_info.h: main/formats.csv \
89 main/format_parser.py main/format_info.py
90 $(PYTHON_GEN) $(srcdir)/main/format_info.py $(srcdir)/main/formats.csv > $@
91
92 main/format_pack.c: main/format_pack.py main/formats.csv \
93 main/format_parser.py
94 $(PYTHON_GEN) $(srcdir)/main/format_pack.py $(srcdir)/main/formats.csv > $@
95
96 main/format_unpack.c: main/format_unpack.py main/formats.csv \
97 main/format_parser.py
98 $(PYTHON_GEN) $(srcdir)/main/format_unpack.py $(srcdir)/main/formats.csv > $@
99
100 main/formats.c: main/format_info.h
101
102 noinst_LTLIBRARIES = $(ARCH_LIBS)
103 if NEED_LIBMESA
104 noinst_LTLIBRARIES += libmesa.la
105 else
106 check_LTLIBRARIES = libmesa.la
107 endif
108 if HAVE_GALLIUM
109 noinst_LTLIBRARIES += libmesagallium.la
110 endif
111
112 AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
113 AM_CFLAGS = \
114 $(VDPAU_CFLAGS) \
115 $(LLVM_CFLAGS) \
116 $(VISIBILITY_CFLAGS) \
117 $(MSVC2013_COMPAT_CFLAGS)
118 AM_CXXFLAGS = \
119 $(LLVM_CFLAGS) \
120 $(VISIBILITY_CXXFLAGS) \
121 $(MSVC2013_COMPAT_CXXFLAGS)
122
123 ARCH_LIBS =
124
125 if SSE41_SUPPORTED
126 ARCH_LIBS += libmesa_sse41.la
127 endif
128
129 MESA_ASM_FILES_FOR_ARCH =
130
131 if HAVE_X86_ASM
132 noinst_PROGRAMS = gen_matypes
133
134 gen_matypes_SOURCES = x86/gen_matypes.c
135 BUILT_SOURCES += matypes.h
136
137 if HAVE_X86_64_ASM
138 MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
139 AM_CPPFLAGS += -I$(builddir)/x86-64 -I$(srcdir)/x86-64
140 else
141 MESA_ASM_FILES_FOR_ARCH += $(X86_FILES)
142 AM_CPPFLAGS += -I$(builddir)/x86 -I$(srcdir)/x86
143 endif
144 endif
145 if HAVE_SPARC_ASM
146 MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES)
147 AM_CPPFLAGS += -I$(builddir)/sparc -I$(srcdir)/sparc
148 endif
149
150 libmesa_la_SOURCES = \
151 $(MESA_FILES) \
152 $(PROGRAM_FILES) \
153 $(PROGRAM_NIR_FILES) \
154 $(MESA_ASM_FILES_FOR_ARCH)
155
156 libmesa_la_LIBADD = \
157 $(top_builddir)/src/compiler/glsl/libglsl.la \
158 $(ARCH_LIBS)
159
160 libmesagallium_la_SOURCES = \
161 $(MESA_GALLIUM_FILES) \
162 $(PROGRAM_FILES) \
163 $(PROGRAM_NIR_FILES) \
164 $(MESA_ASM_FILES_FOR_ARCH)
165
166 libmesagallium_la_LIBADD = \
167 $(top_builddir)/src/compiler/glsl/libglsl.la \
168 $(ARCH_LIBS)
169
170 libmesa_sse41_la_SOURCES = \
171 $(X86_SSE41_FILES)
172
173 libmesa_sse41_la_CFLAGS = $(AM_CFLAGS) $(SSE41_CFLAGS)
174
175 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
176 YACC_GEN = $(AM_V_GEN)$(YACC) $(YFLAGS)
177 LEX_GEN = $(AM_V_GEN)$(LEX) $(LFLAGS)
178
179 program/lex.yy.c: program/program_lexer.l
180 $(MKDIR_GEN)
181 $(LEX_GEN) -o $@ $(srcdir)/program/program_lexer.l
182
183 program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
184 $(MKDIR_GEN)
185 $(YACC_GEN) -o $@ -p "_mesa_program_" --defines=$(builddir)/program/program_parse.tab.h $(srcdir)/program/program_parse.y
186
187 if GEN_ASM_OFFSETS
188 matypes.h: $(gen_matypes_SOURCES)
189 $(AM_V_GEN)$(COMPILE) $< -DASM_OFFSETS -S -o - | \
190 sed -n '/^->/{s:^->::;/[$$]/{s:^:#define :;s:[$$]::};p}' > $@
191 else
192 matypes.h: gen_matypes
193 $(AM_V_GEN)./gen_matypes > $@
194 endif
195
196 # Emacs tags
197 tags:
198 etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h