1e5397019a0cc07c30806e2d5dfad2e9b6b1508a
[mesa.git] / src / intel / vulkan / Android.mk
1 # Copyright © 2017 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 shall be included
11 # in all copies or substantial portions of the Software.
12 #
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.
20
21 LOCAL_PATH := $(call my-dir)
22
23 include $(CLEAR_VARS)
24 include $(LOCAL_PATH)/Makefile.sources
25
26 VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/anv_entrypoints_gen.py
27
28 VULKAN_COMMON_INCLUDES := \
29 $(MESA_TOP)/include/vulkan \
30 $(MESA_TOP)/src/mapi \
31 $(MESA_TOP)/src/gallium/auxiliary \
32 $(MESA_TOP)/src/gallium/include \
33 $(MESA_TOP)/src/mesa \
34 $(MESA_TOP)/src/mesa/drivers/dri/common \
35 $(MESA_TOP)/src/mesa/drivers/dri/i965 \
36 $(MESA_TOP)/src/vulkan/wsi \
37 $(MESA_TOP)/src/intel/vulkan
38
39 # libmesa_anv_entrypoints with header and dummy.c
40 #
41 # This static library is built to pull entrypoints header
42 # for multiple gen specific build targets below. The c file
43 # is generated separately for libmesa_vulkan_common to avoid
44 # duplicate symbols when linking the anv libraries.
45
46 include $(CLEAR_VARS)
47 LOCAL_MODULE := libmesa_anv_entrypoints
48 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
49
50 intermediates := $(call local-generated-sources-dir)
51
52 LOCAL_C_INCLUDES := \
53 $(VULKAN_COMMON_INCLUDES)
54
55 LOCAL_GENERATED_SOURCES += $(intermediates)/anv_entrypoints.h
56 LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c
57
58 $(intermediates)/dummy.c:
59 @mkdir -p $(dir $@)
60 @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
61 $(hide) touch $@
62
63 $(intermediates)/anv_entrypoints.h:
64 $(hide) cat $(MESA_TOP)/src/vulkan/registry/vk.xml | $(VK_ENTRYPOINTS_SCRIPT) header > $@
65
66 LOCAL_EXPORT_C_INCLUDE_DIRS := \
67 $(intermediates)
68
69 LOCAL_SHARED_LIBRARIES := libdrm_intel
70
71 include $(MESA_COMMON_MK)
72 include $(BUILD_STATIC_LIBRARY)
73
74 ANV_INCLUDES := \
75 $(VULKAN_COMMON_INCLUDES) \
76 $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_anv_entrypoints,,) \
77 $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir
78
79 #
80 # libanv for gen7
81 #
82
83 include $(CLEAR_VARS)
84 LOCAL_MODULE := libmesa_anv_gen7
85 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
86
87 LOCAL_SRC_FILES := $(GEN7_FILES)
88 LOCAL_CFLAGS := -DGEN_VERSIONx10=70
89
90 LOCAL_C_INCLUDES := $(ANV_INCLUDES)
91
92 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
93
94 LOCAL_SHARED_LIBRARIES := libdrm_intel
95
96 include $(MESA_COMMON_MK)
97 include $(BUILD_STATIC_LIBRARY)
98
99 #
100 # libanv for gen75
101 #
102
103 include $(CLEAR_VARS)
104 LOCAL_MODULE := libmesa_anv_gen75
105 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
106
107 LOCAL_SRC_FILES := $(GEN75_FILES)
108 LOCAL_CFLAGS := -DGEN_VERSIONx10=75
109
110 LOCAL_C_INCLUDES := $(ANV_INCLUDES)
111
112 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
113
114 LOCAL_SHARED_LIBRARIES := libdrm_intel
115
116 include $(MESA_COMMON_MK)
117 include $(BUILD_STATIC_LIBRARY)
118
119 #
120 # libanv for gen8
121 #
122
123 include $(CLEAR_VARS)
124 LOCAL_MODULE := libmesa_anv_gen8
125 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
126
127 LOCAL_SRC_FILES := $(GEN8_FILES)
128 LOCAL_CFLAGS := -DGEN_VERSIONx10=80
129
130 LOCAL_C_INCLUDES := $(ANV_INCLUDES)
131
132 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
133
134 LOCAL_SHARED_LIBRARIES := libdrm_intel
135
136 include $(MESA_COMMON_MK)
137 include $(BUILD_STATIC_LIBRARY)
138
139 #
140 # libanv for gen9
141 #
142
143 include $(CLEAR_VARS)
144 LOCAL_MODULE := libmesa_anv_gen9
145 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
146
147 LOCAL_SRC_FILES := $(GEN9_FILES)
148 LOCAL_CFLAGS := -DGEN_VERSIONx10=90
149
150 LOCAL_C_INCLUDES := $(ANV_INCLUDES)
151
152 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
153
154 LOCAL_SHARED_LIBRARIES := libdrm_intel
155
156 include $(MESA_COMMON_MK)
157 include $(BUILD_STATIC_LIBRARY)
158
159 #
160 # libmesa_vulkan_common
161 #
162
163 include $(CLEAR_VARS)
164 LOCAL_MODULE := libmesa_vulkan_common
165 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
166
167 intermediates := $(call local-generated-sources-dir)
168
169 LOCAL_SRC_FILES := $(VULKAN_FILES)
170
171 LOCAL_C_INCLUDES := \
172 $(ANV_INCLUDES) \
173 $(MESA_TOP)/src/compiler
174
175 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
176
177 LOCAL_GENERATED_SOURCES += $(intermediates)/anv_entrypoints.c
178
179 $(intermediates)/anv_entrypoints.c:
180 $(hide) cat $(MESA_TOP)/src/vulkan/registry/vk.xml | $(VK_ENTRYPOINTS_SCRIPT) code > $@
181
182 LOCAL_SHARED_LIBRARIES := libdrm_intel
183
184 include $(MESA_COMMON_MK)
185 include $(BUILD_STATIC_LIBRARY)
186
187
188 #
189 # vulkan.mesa_intel
190 #
191
192 include $(CLEAR_VARS)
193
194 LOCAL_MODULE := vulkan.mesa_intel
195 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
196
197 LOCAL_SRC_FILES := \
198 $(VULKAN_GEM_FILES)
199
200 LOCAL_C_INCLUDES := \
201 $(VULKAN_COMMON_INCLUDES) \
202 $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_anv_entrypoints,,)
203
204 LOCAL_EXPORT_C_INCLUDE_DIRS := $(MESA_TOP)/src/intel/vulkan
205
206 LOCAL_WHOLE_STATIC_LIBRARIES := \
207 libmesa_nir \
208 libmesa_isl \
209 libmesa_glsl \
210 libmesa_util \
211 libmesa_blorp \
212 libmesa_compiler \
213 libmesa_intel_common \
214 libmesa_vulkan_common \
215 libmesa_anv_gen7 \
216 libmesa_anv_gen75 \
217 libmesa_anv_gen8 \
218 libmesa_anv_gen9 \
219 libmesa_i965_compiler \
220 libmesa_anv_entrypoints
221
222 LOCAL_SHARED_LIBRARIES := \
223 libdrm_intel
224
225 include $(MESA_COMMON_MK)
226 include $(BUILD_SHARED_LIBRARY)