1 # Copyright © 2015 Intel Corporation
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:
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
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
22 include Makefile.sources
24 vulkan_includedir = $(includedir)/vulkan
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
31 lib_LTLIBRARIES = libvulkan_intel.la
33 check_LTLIBRARIES = libvulkan-test.la
41 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
43 # The gallium includes are for the util/u_math.h include from main/macros.h
49 -I$(top_srcdir)/include \
50 -I$(top_builddir)/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
66 $(VISIBILITY_CFLAGS) \
67 -Wno-override-init -msse2
69 libanv_gen7_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=70
70 libanv_gen7_la_SOURCES = $(GEN7_FILES)
72 libanv_gen75_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=75
73 libanv_gen75_la_SOURCES = $(GEN75_FILES)
75 libanv_gen8_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=80
76 libanv_gen8_la_SOURCES = $(GEN8_FILES)
78 libanv_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
79 libanv_gen9_la_SOURCES = $(GEN9_FILES)
83 $(VULKAN_GENERATED_FILES) \
91 -DVK_USE_PLATFORM_XCB_KHR \
92 -DVK_USE_PLATFORM_XLIB_KHR
94 VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES)
96 # FIXME: Use pkg-config for X11-xcb ldflags.
97 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
101 if HAVE_PLATFORM_WAYLAND
103 -I$(top_builddir)/src/egl/wayland/wayland-drm \
104 -I$(top_srcdir)/src/egl/wayland/wayland-drm \
106 -DVK_USE_PLATFORM_WAYLAND_KHR
108 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
111 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
115 noinst_LTLIBRARIES += libvulkan_common.la
116 libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
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 \
132 nodist_EXTRA_libvulkan_intel_la_SOURCES = dummy.cpp
133 libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)
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 > $@
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 > $@
143 .PHONY: anv_timestamp.h
146 @echo "Updating anv_timestamp.h"
147 $(AM_V_GEN) echo "#define ANV_TIMESTAMP \"$(TIMESTAMP_CMD)\"" > $@
149 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
150 CLEANFILES = $(BUILT_SOURCES) dev_icd.json intel_icd.@host_cpu@.json
152 $(top_srcdir)/include/vulkan/vk_icd.h \
153 anv_entrypoints_gen.py \
157 libvulkan_intel_la_LIBADD = $(VULKAN_LIB_DEPS)
159 libvulkan_intel_la_LDFLAGS = \
169 icdconfdir = @VULKAN_ICD_INSTALL_DIR@
170 icdconf_DATA = intel_icd.@host_cpu@.json
171 # The following is used for development purposes, by setting VK_ICD_FILENAMES.
172 noinst_DATA = dev_icd.json
174 dev_icd.json : dev_icd.json.in
176 -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
177 < $(srcdir)/dev_icd.json.in > $@
179 intel_icd.@host_cpu@.json : intel_icd.json.in
181 -e "s#@install_libdir@#${libdir}#" \
182 < $(srcdir)/intel_icd.json.in > $@
184 # Libvulkan with dummy gem. Used for unit tests.
185 libvulkan_test_la_SOURCES = $(VULKAN_GEM_STUB_FILES)
186 libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS)
188 include $(top_srcdir)/install-lib-links.mk
191 tests/state_pool_test_helper.h
195 $(PTHREAD_LIBS) -lm -lstdc++
198 tests/block_pool_no_free \
199 tests/state_pool_no_free \
200 tests/state_pool_free_list_only \
203 TESTS = $(check_PROGRAMS)