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