aboutsummaryrefslogtreecommitdiff
path: root/build-android/jni/Android.mk
blob: 7c1693139120bb2ad344faf667408be814d30ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Copyright 2015 The Android Open Source Project
# Copyright (C) 2015 Valve Corporation

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#      http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
SRC_DIR := ../..
LAYER_DIR := ../generated
THIRD_PARTY := ../third_party

VULKAN_INCLUDE := $(LOCAL_PATH)/$(THIRD_PARTY)/Vulkan-Headers/include

include $(CLEAR_VARS)
LOCAL_MODULE := layer_utils
LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_config.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_extension_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_logging.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/vk_format_utils.cpp
LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
                    $(LOCAL_PATH)/$(THIRD_PARTY)/robin-hood-hashing/src/include
LOCAL_CPPFLAGS += -std=c++17 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
LOCAL_CPPFLAGS += -DVK_ENABLE_BETA_EXTENSIONS -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -DUSE_ROBIN_HOOD_HASHING -fvisibility=hidden
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := VkLayer_khronos_validation
LOCAL_SRC_FILES += $(SRC_DIR)/layers/state_tracker.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/android_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/device_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/device_memory_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/device_memory_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/external_object_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/base_node.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/buffer_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/cmd_buffer_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/cmd_buffer_dynamic_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/image_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/pipeline_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/pipeline_layout_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/pipeline_sub_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/pipeline_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/queue_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/render_pass_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/render_pass_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/video_session_state.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/video_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/core_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/drawdispatch.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/descriptor_sets.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/descriptor_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/buffer_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_module.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_instruction.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/spirv_validation_helper.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/spirv_grammar_helper.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/command_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/gpu_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/gpu_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/debug_printf.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/best_practices_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/best_practices.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/sync_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/sync_vuid_maps.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/core_error_location.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/synchronization_validation_types.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/synchronization_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/convert_to_renderpass2.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/layer_options.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/query_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/ray_tracing_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/wsi_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/xxhash.c
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/parameter_validation.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/parameter_validation_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/object_tracker.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/object_tracker_utils.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/thread_safety.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/vk_safe_struct.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/image_layout_map.cpp
LOCAL_SRC_FILES += $(SRC_DIR)/layers/subresource_adapter.cpp
LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
                    $(LOCAL_PATH)/$(THIRD_PARTY)/shaderc/third_party/spirv-tools/external/spirv-headers/include \
                    $(LOCAL_PATH)/$(THIRD_PARTY)/robin-hood-hashing/src/include
LOCAL_STATIC_LIBRARIES += layer_utils glslang SPIRV-Tools SPIRV-Tools-opt
LOCAL_CPPFLAGS += -std=c++17 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -frtti
LOCAL_CPPFLAGS += -DVK_ENABLE_BETA_EXTENSIONS -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -DUSE_ROBIN_HOOD_HASHING -fvisibility=hidden -DXXH_NO_LONG_LONG
LOCAL_LDLIBS    := -llog -landroid
LOCAL_LDFLAGS   += -Wl,-Bsymbolic
LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := VkLayerValidationTests
LOCAL_SRC_FILES += $(SRC_DIR)/tests/layer_validation_tests.cpp \
                   $(SRC_DIR)/tests/vklayertests_instanceless.cpp \
                   $(SRC_DIR)/tests/vklayertests_pipeline_shader.cpp \
                   $(SRC_DIR)/tests/vklayertests_buffer_image_memory_sampler.cpp \
                   $(SRC_DIR)/tests/vklayertests_others.cpp \
                   $(SRC_DIR)/tests/vklayertests_descriptor_renderpass_framebuffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_command.cpp \
                   $(SRC_DIR)/tests/vklayertests_gpu.cpp \
                   $(SRC_DIR)/tests/vklayertests_debug_printf.cpp \
                   $(SRC_DIR)/tests/vklayertests_best_practices.cpp \
                   $(SRC_DIR)/tests/vklayertests_arm_best_practices.cpp \
                   $(SRC_DIR)/tests/vklayertests_wsi.cpp \
                   $(SRC_DIR)/tests/vklayertests_imageless_framebuffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_graphics_library.cpp \
                   $(SRC_DIR)/tests/vklayertests_android_hardware_buffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing_pipeline.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing_gpu.cpp \
                   $(SRC_DIR)/tests/positive/command.cpp \
                   $(SRC_DIR)/tests/positive/descriptors.cpp \
                   $(SRC_DIR)/tests/positive/image_buffer.cpp \
                   $(SRC_DIR)/tests/positive/instance.cpp \
                   $(SRC_DIR)/tests/positive/other.cpp \
                   $(SRC_DIR)/tests/positive/pipeline.cpp \
                   $(SRC_DIR)/tests/positive/render_pass.cpp \
                   $(SRC_DIR)/tests/positive/shaderval.cpp \
                   $(SRC_DIR)/tests/positive/sync.cpp \
                   $(SRC_DIR)/tests/positive/tooling.cpp \
                   $(SRC_DIR)/tests/positive/android_hardware_buffer.cpp \
                   $(SRC_DIR)/tests/positive/ray_tracing.cpp \
                   $(SRC_DIR)/tests/positive/ray_tracing_pipeline.cpp \
                   $(SRC_DIR)/tests/vksyncvaltests.cpp \
                   $(SRC_DIR)/tests/vktestbinding.cpp \
                   $(SRC_DIR)/tests/vktestframeworkandroid.cpp \
                   $(SRC_DIR)/tests/vkerrormonitor.cpp \
                   $(SRC_DIR)/tests/vkrenderframework.cpp \
                   $(SRC_DIR)/layers/convert_to_renderpass2.cpp \
                   $(SRC_DIR)/layers/generated/vk_safe_struct.cpp \
                   $(SRC_DIR)/layers/generated/lvt_function_pointers.cpp
LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
                    $(LOCAL_PATH)/$(SRC_DIR)/libs \
                    $(LOCAL_PATH)/$(THIRD_PARTY)/robin-hood-hashing/src/include

LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc
LOCAL_CPPFLAGS += -std=c++17 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
LOCAL_CPPFLAGS += -DVK_ENABLE_BETA_EXTENSIONS -DVK_USE_PLATFORM_ANDROID_KHR -DUSE_ROBIN_HOOD_HASHING -fvisibility=hidden
LOCAL_LDLIBS := -llog -landroid -ldl
LOCAL_LDFLAGS   += -Wl,-Bsymbolic
LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
include $(BUILD_EXECUTABLE)

# Note: The following module is similar in name to the executable, but differs so that loader won't enumerate the resulting .so
include $(CLEAR_VARS)
LOCAL_MODULE := VulkanLayerValidationTests
LOCAL_SRC_FILES += $(SRC_DIR)/tests/layer_validation_tests.cpp \
                   $(SRC_DIR)/tests/vklayertests_instanceless.cpp \
                   $(SRC_DIR)/tests/vklayertests_pipeline_shader.cpp \
                   $(SRC_DIR)/tests/vklayertests_buffer_image_memory_sampler.cpp \
                   $(SRC_DIR)/tests/vklayertests_others.cpp \
                   $(SRC_DIR)/tests/vklayertests_descriptor_renderpass_framebuffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_command.cpp \
                   $(SRC_DIR)/tests/vklayertests_gpu.cpp \
                   $(SRC_DIR)/tests/vklayertests_debug_printf.cpp \
                   $(SRC_DIR)/tests/vklayertests_best_practices.cpp \
                   $(SRC_DIR)/tests/vklayertests_arm_best_practices.cpp \
                   $(SRC_DIR)/tests/vklayertests_wsi.cpp \
                   $(SRC_DIR)/tests/vklayertests_imageless_framebuffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_graphics_library.cpp \
                   $(SRC_DIR)/tests/vklayertests_android_hardware_buffer.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing_pipeline.cpp \
                   $(SRC_DIR)/tests/vklayertests_ray_tracing_gpu.cpp \
                   $(SRC_DIR)/tests/positive/command.cpp \
                   $(SRC_DIR)/tests/positive/descriptors.cpp \
                   $(SRC_DIR)/tests/positive/image_buffer.cpp \
                   $(SRC_DIR)/tests/positive/instance.cpp \
                   $(SRC_DIR)/tests/positive/other.cpp \
                   $(SRC_DIR)/tests/positive/pipeline.cpp \
                   $(SRC_DIR)/tests/positive/render_pass.cpp \
                   $(SRC_DIR)/tests/positive/shaderval.cpp \
                   $(SRC_DIR)/tests/positive/sync.cpp \
                   $(SRC_DIR)/tests/positive/tooling.cpp \
                   $(SRC_DIR)/tests/positive/android_hardware_buffer.cpp \
                   $(SRC_DIR)/tests/positive/ray_tracing.cpp \
                   $(SRC_DIR)/tests/positive/ray_tracing_pipeline.cpp \
                   $(SRC_DIR)/tests/vksyncvaltests.cpp \
                   $(SRC_DIR)/tests/vktestbinding.cpp \
                   $(SRC_DIR)/tests/vktestframeworkandroid.cpp \
                   $(SRC_DIR)/tests/vkerrormonitor.cpp \
                   $(SRC_DIR)/tests/vkrenderframework.cpp \
                   $(SRC_DIR)/layers/convert_to_renderpass2.cpp \
                   $(SRC_DIR)/layers/generated/vk_safe_struct.cpp \
                   $(SRC_DIR)/layers/generated/lvt_function_pointers.cpp
LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
                    $(LOCAL_PATH)/$(SRC_DIR)/libs \
                    $(LOCAL_PATH)/$(THIRD_PARTY)/robin-hood-hashing/src/include

LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc
LOCAL_CPPFLAGS += -std=c++17 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
LOCAL_CPPFLAGS += -DVK_ENABLE_BETA_EXTENSIONS -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden -DVALIDATION_APK -DUSE_ROBIN_HOOD_HASHING
LOCAL_WHOLE_STATIC_LIBRARIES += android_native_app_glue
LOCAL_LDLIBS := -llog -landroid -ldl
LOCAL_LDFLAGS := -u ANativeActivity_onCreate
include $(BUILD_SHARED_LIBRARY)

$(call import-module,android/native_app_glue)
$(call import-module,third_party/googletest)
$(call import-module,third_party/shaderc)