anv: Emit cherryview SF state without including gen9_pack.h
[mesa.git] / src / intel / vulkan / Makefile.am
1 # Copyright © 2015 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 include Makefile.sources
23
24 vulkan_includedir = $(includedir)/vulkan
25
26 vulkan_include_HEADERS = \
27 $(top_srcdir)/include/vulkan/vk_platform.h \
28 $(top_srcdir)/include/vulkan/vulkan.h \
29 $(top_srcdir)/include/vulkan/vulkan_intel.h
30
31 lib_LTLIBRARIES = libvulkan_intel.la
32
33 check_LTLIBRARIES = libvulkan-test.la
34
35 PER_GEN_LIBS = \
36 libanv-gen7.la \
37 libanv-gen75.la \
38 libanv-gen8.la \
39 libanv-gen9.la
40
41 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
42
43 # The gallium includes are for the util/u_math.h include from main/macros.h
44
45 AM_CPPFLAGS = \
46 $(INTEL_CFLAGS) \
47 $(VALGRIND_CFLAGS) \
48 $(DEFINES) \
49 -I$(top_srcdir)/include \
50 -I$(top_builddir)/src \
51 -I$(top_srcdir)/src \
52 -I$(top_srcdir)/src/vulkan/wsi \
53 -I$(top_builddir)/src/compiler \
54 -I$(top_srcdir)/src/compiler \
55 -I$(top_builddir)/src/compiler/nir \
56 -I$(top_srcdir)/src/mapi \
57 -I$(top_srcdir)/src/mesa \
58 -I$(top_srcdir)/src/mesa/drivers/dri/common \
59 -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
60 -I$(top_srcdir)/src/gallium/auxiliary \
61 -I$(top_srcdir)/src/gallium/include \
62 -I$(top_builddir)/src/intel \
63 -I$(top_srcdir)/src/intel
64
65 AM_CFLAGS = \
66 $(VISIBILITY_CFLAGS) \
67 -Wno-override-init -msse2
68
69 libanv_gen7_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=70
70 libanv_gen7_la_SOURCES = $(GEN7_FILES)
71
72 libanv_gen75_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=75
73 libanv_gen75_la_SOURCES = $(GEN75_FILES)
74
75 libanv_gen8_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=80
76 libanv_gen8_la_SOURCES = $(GEN8_FILES)
77
78 libanv_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
79 libanv_gen9_la_SOURCES = $(GEN9_FILES)
80
81
82 VULKAN_SOURCES = \
83 $(VULKAN_GENERATED_FILES) \
84 $(VULKAN_FILES)
85
86 VULKAN_LIB_DEPS =
87
88 if HAVE_PLATFORM_X11
89 AM_CPPFLAGS += \
90 $(XCB_DRI3_CFLAGS) \
91 -DVK_USE_PLATFORM_XCB_KHR \
92 -DVK_USE_PLATFORM_XLIB_KHR
93
94 VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES)
95
96 # FIXME: Use pkg-config for X11-xcb ldflags.
97 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
98 endif
99
100
101 if HAVE_PLATFORM_WAYLAND
102 AM_CPPFLAGS += \
103 -I$(top_builddir)/src/egl/wayland/wayland-drm \
104 -I$(top_srcdir)/src/egl/wayland/wayland-drm \
105 $(WAYLAND_CFLAGS) \
106 -DVK_USE_PLATFORM_WAYLAND_KHR
107
108 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
109
110 VULKAN_LIB_DEPS += \
111 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
112 $(WAYLAND_LIBS)
113 endif
114
115 noinst_LTLIBRARIES += libvulkan_common.la
116 libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
117
118 VULKAN_LIB_DEPS += \
119 libvulkan_common.la \
120 $(top_builddir)/src/vulkan/wsi/libvulkan_wsi.la \
121 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
122 $(top_builddir)/src/compiler/nir/libnir.la \
123 $(top_builddir)/src/util/libmesautil.la \
124 $(top_builddir)/src/intel/common/libintel_common.la \
125 $(top_builddir)/src/intel/isl/libisl.la \
126 $(top_builddir)/src/intel/blorp/libblorp.la \
127 $(PER_GEN_LIBS) \
128 $(PTHREAD_LIBS) \
129 $(DLOPEN_LIBS) \
130 -lm
131
132 nodist_EXTRA_libvulkan_intel_la_SOURCES = dummy.cpp
133 libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)
134
135 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
136 $(AM_V_GEN) cat $(vulkan_include_HEADERS) |\
137 $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@
138
139 anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
140 $(AM_V_GEN) cat $(vulkan_include_HEADERS) |\
141 $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py code > $@
142
143 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
144 CLEANFILES = $(BUILT_SOURCES) dev_icd.json intel_icd.@host_cpu@.json
145 EXTRA_DIST = \
146 $(top_srcdir)/include/vulkan/vk_icd.h \
147 anv_entrypoints_gen.py \
148 dev_icd.json.in \
149 intel_icd.json.in
150
151 libvulkan_intel_la_LIBADD = $(VULKAN_LIB_DEPS)
152
153 libvulkan_intel_la_LDFLAGS = \
154 -shared \
155 -module \
156 -no-undefined \
157 -avoid-version \
158 $(BSYMBOLIC) \
159 $(GC_SECTIONS) \
160 $(LD_NO_UNDEFINED)
161
162
163 icdconfdir = @VULKAN_ICD_INSTALL_DIR@
164 icdconf_DATA = intel_icd.@host_cpu@.json
165 # The following is used for development purposes, by setting VK_ICD_FILENAMES.
166 noinst_DATA = dev_icd.json
167
168 dev_icd.json : dev_icd.json.in
169 $(AM_V_GEN) $(SED) \
170 -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
171 < $(srcdir)/dev_icd.json.in > $@
172
173 intel_icd.@host_cpu@.json : intel_icd.json.in
174 $(AM_V_GEN) $(SED) \
175 -e "s#@install_libdir@#${libdir}#" \
176 < $(srcdir)/intel_icd.json.in > $@
177
178 # Libvulkan with dummy gem. Used for unit tests.
179 libvulkan_test_la_SOURCES = $(VULKAN_GEM_STUB_FILES)
180 libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS)
181
182 include $(top_srcdir)/install-lib-links.mk
183
184 noinst_HEADERS = \
185 tests/state_pool_test_helper.h
186
187 LDADD = \
188 libvulkan-test.la \
189 $(PTHREAD_LIBS) -lm -lstdc++
190
191 check_PROGRAMS = \
192 tests/block_pool_no_free \
193 tests/state_pool_no_free \
194 tests/state_pool_free_list_only \
195 tests/state_pool
196
197 TESTS = $(check_PROGRAMS)