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