1 # Copyright © 2017 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 shall be included
11 # in all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19 # DEALINGS IN THE SOFTWARE.
21 LOCAL_PATH
:= $(call my-dir
)
24 include $(LOCAL_PATH
)/Makefile.sources
26 VK_ENTRYPOINTS_SCRIPT
:= $(MESA_PYTHON2
) $(LOCAL_PATH
)/vulkan
/anv_entrypoints_gen.py
28 VULKAN_COMMON_INCLUDES
:= \
29 $(MESA_TOP
)/src
/mapi \
30 $(MESA_TOP
)/src
/gallium
/auxiliary \
31 $(MESA_TOP
)/src
/gallium
/include \
32 $(MESA_TOP
)/src
/mesa \
33 $(MESA_TOP
)/src
/vulkan
/wsi \
34 $(MESA_TOP
)/src
/vulkan
/util \
35 $(MESA_TOP
)/src
/intel \
36 $(MESA_TOP
)/src
/intel
/vulkan
38 # libmesa_anv_entrypoints with header and dummy.c
40 # This static library is built to pull entrypoints header
41 # for multiple gen specific build targets below. The c file
42 # is generated separately for libmesa_vulkan_common to avoid
43 # duplicate symbols when linking the anv libraries.
46 LOCAL_MODULE
:= libmesa_anv_entrypoints
47 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
49 intermediates
:= $(call local-generated-sources-dir
)
52 $(VULKAN_COMMON_INCLUDES
)
54 LOCAL_GENERATED_SOURCES
+= $(intermediates
)/vulkan
/anv_entrypoints.h
55 LOCAL_GENERATED_SOURCES
+= $(intermediates
)/vulkan
/dummy.c
57 $(intermediates
)/vulkan
/dummy.c
:
59 @echo
"Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
62 $(intermediates
)/vulkan
/anv_entrypoints.h
: $(intermediates
)/vulkan
/dummy.c
63 $(VK_ENTRYPOINTS_SCRIPT
) \
65 --xml
$(MESA_TOP
)/src
/vulkan
/registry
/vk.xml
67 LOCAL_EXPORT_C_INCLUDE_DIRS
:= \
70 LOCAL_SHARED_LIBRARIES
:= libdrm
72 include $(MESA_COMMON_MK
)
73 include $(BUILD_STATIC_LIBRARY
)
76 $(VULKAN_COMMON_INCLUDES
) \
77 $(call generated-sources-dir-for
,STATIC_LIBRARIES
,libmesa_anv_entrypoints
,,)/vulkan \
78 $(call generated-sources-dir-for
,STATIC_LIBRARIES
,libmesa_nir
,,)/nir \
79 $(call generated-sources-dir-for
,STATIC_LIBRARIES
,libmesa_vulkan_util
,,)/util
86 LOCAL_MODULE
:= libmesa_anv_gen7
87 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
89 LOCAL_SRC_FILES
:= $(VULKAN_GEN7_FILES
)
90 LOCAL_CFLAGS
:= -DGEN_VERSIONx10
=70
92 LOCAL_C_INCLUDES
:= $(ANV_INCLUDES
)
94 LOCAL_WHOLE_STATIC_LIBRARIES
:= libmesa_anv_entrypoints libmesa_genxml
96 LOCAL_SHARED_LIBRARIES
:= libdrm_intel
98 include $(MESA_COMMON_MK
)
99 include $(BUILD_STATIC_LIBRARY
)
105 include $(CLEAR_VARS
)
106 LOCAL_MODULE
:= libmesa_anv_gen75
107 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
109 LOCAL_SRC_FILES
:= $(VULKAN_GEN75_FILES
)
110 LOCAL_CFLAGS
:= -DGEN_VERSIONx10
=75
112 LOCAL_C_INCLUDES
:= $(ANV_INCLUDES
)
114 LOCAL_WHOLE_STATIC_LIBRARIES
:= libmesa_anv_entrypoints libmesa_genxml
116 LOCAL_SHARED_LIBRARIES
:= libdrm
118 include $(MESA_COMMON_MK
)
119 include $(BUILD_STATIC_LIBRARY
)
125 include $(CLEAR_VARS
)
126 LOCAL_MODULE
:= libmesa_anv_gen8
127 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
129 LOCAL_SRC_FILES
:= $(VULKAN_GEN8_FILES
)
130 LOCAL_CFLAGS
:= -DGEN_VERSIONx10
=80
132 LOCAL_C_INCLUDES
:= $(ANV_INCLUDES
)
134 LOCAL_WHOLE_STATIC_LIBRARIES
:= libmesa_anv_entrypoints libmesa_genxml
136 LOCAL_SHARED_LIBRARIES
:= libdrm
138 include $(MESA_COMMON_MK
)
139 include $(BUILD_STATIC_LIBRARY
)
145 include $(CLEAR_VARS
)
146 LOCAL_MODULE
:= libmesa_anv_gen9
147 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
149 LOCAL_SRC_FILES
:= $(VULKAN_GEN9_FILES
)
150 LOCAL_CFLAGS
:= -DGEN_VERSIONx10
=90
152 LOCAL_C_INCLUDES
:= $(ANV_INCLUDES
)
154 LOCAL_WHOLE_STATIC_LIBRARIES
:= libmesa_anv_entrypoints libmesa_genxml
156 LOCAL_SHARED_LIBRARIES
:= libdrm
158 include $(MESA_COMMON_MK
)
159 include $(BUILD_STATIC_LIBRARY
)
162 # libmesa_vulkan_common
165 include $(CLEAR_VARS
)
166 LOCAL_MODULE
:= libmesa_vulkan_common
167 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
169 intermediates
:= $(call local-generated-sources-dir
)
171 LOCAL_SRC_FILES
:= $(VULKAN_FILES
)
173 LOCAL_C_INCLUDES
:= \
175 $(MESA_TOP
)/src
/compiler
177 LOCAL_WHOLE_STATIC_LIBRARIES
:= \
178 libmesa_anv_entrypoints \
182 # The rule generates both C and H files, but due to some strange
183 # reason generating the files once leads to link-time issues.
184 # Work around create them here as well - we're safe from race
185 # conditions since they are stored in another location.
187 LOCAL_GENERATED_SOURCES
+= $(intermediates
)/vulkan
/anv_entrypoints.c
189 $(intermediates
)/vulkan
/anv_entrypoints.c
:
191 $(VK_ENTRYPOINTS_SCRIPT
) \
192 --xml
$(MESA_TOP
)/src
/vulkan
/registry
/vk.xml \
195 LOCAL_SHARED_LIBRARIES
:= libdrm
197 include $(MESA_COMMON_MK
)
198 include $(BUILD_STATIC_LIBRARY
)
205 include $(CLEAR_VARS
)
207 LOCAL_MODULE
:= libvulkan_intel
208 LOCAL_MODULE_CLASS
:= SHARED_LIBRARIES
210 LOCAL_LDFLAGS
+= -Wl
,--build-id
=sha1
215 LOCAL_C_INCLUDES
:= \
216 $(VULKAN_COMMON_INCLUDES
) \
217 $(call generated-sources-dir-for
,STATIC_LIBRARIES
,libmesa_anv_entrypoints
,,)/vulkan
219 LOCAL_EXPORT_C_INCLUDE_DIRS
:= $(MESA_TOP
)/src
/intel
/vulkan
221 LOCAL_WHOLE_STATIC_LIBRARIES
:= \
228 libmesa_intel_common \
229 libmesa_vulkan_common \
234 libmesa_intel_compiler \
235 libmesa_anv_entrypoints
237 LOCAL_SHARED_LIBRARIES
:= libdrm libz
239 include $(MESA_COMMON_MK
)
240 include $(BUILD_SHARED_LIBRARY
)