• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 The Android Open Source Project
2# Copyright (C) 2015 Valve Corporation
3
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7
8#      http://www.apache.org/licenses/LICENSE-2.0
9
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16LOCAL_PATH := $(call my-dir)
17SRC_DIR := ../..
18LAYER_DIR := ../generated
19THIRD_PARTY := ../third_party
20
21VULKAN_INCLUDE := $(LOCAL_PATH)/$(SRC_DIR)/include
22
23include $(CLEAR_VARS)
24LOCAL_MODULE := layer_utils
25LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
26LOCAL_LICENSE_CONDITIONS := notice
27LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
28LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_config.cpp
29LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_extension_utils.cpp
30LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_utils.cpp
31LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_format_utils.cpp
32LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
33                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
34                    $(LOCAL_PATH)/$(SRC_DIR)/layers
35LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
36LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden
37include $(BUILD_STATIC_LIBRARY)
38
39include $(CLEAR_VARS)
40LOCAL_MODULE := VkLayer_khronos_validation
41LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
42LOCAL_LICENSE_CONDITIONS := notice
43LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
44LOCAL_SRC_FILES += $(SRC_DIR)/layers/core_validation.cpp
45LOCAL_SRC_FILES += $(SRC_DIR)/layers/drawdispatch.cpp
46LOCAL_SRC_FILES += $(SRC_DIR)/layers/descriptor_sets.cpp
47LOCAL_SRC_FILES += $(SRC_DIR)/layers/buffer_validation.cpp
48LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_validation.cpp
49LOCAL_SRC_FILES += $(SRC_DIR)/layers/gpu_validation.cpp
50LOCAL_SRC_FILES += $(SRC_DIR)/layers/convert_to_renderpass2.cpp
51LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
52LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
53LOCAL_SRC_FILES += $(SRC_DIR)/layers/xxhash.c
54LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/parameter_validation.cpp
55LOCAL_SRC_FILES += $(SRC_DIR)/layers/parameter_validation_utils.cpp
56LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/object_tracker.cpp
57LOCAL_SRC_FILES += $(SRC_DIR)/layers/object_tracker_utils.cpp
58LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/thread_safety.cpp
59LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
60                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
61                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated
62LOCAL_STATIC_LIBRARIES += layer_utils glslang SPIRV-Tools SPIRV-Tools-opt
63LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
64LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden -DBUILD_KHRONOS_VALIDATION -DBUILD_CORE_VALIDATION -DBUILD_PARAMETER_VALIDATION -DBUILD_OBJECT_TRACKER -DBUILD_THREAD_SAFETY -DLAYER_CHASSIS_CAN_WRAP_HANDLES
65LOCAL_LDLIBS    := -llog -landroid
66LOCAL_LDFLAGS   += -Wl,-Bsymbolic
67LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
68include $(BUILD_SHARED_LIBRARY)
69
70
71include $(CLEAR_VARS)
72LOCAL_MODULE := VkLayer_core_validation
73LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
74LOCAL_LICENSE_CONDITIONS := notice
75LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
76LOCAL_SRC_FILES += $(SRC_DIR)/layers/core_validation.cpp
77LOCAL_SRC_FILES += $(SRC_DIR)/layers/drawdispatch.cpp
78LOCAL_SRC_FILES += $(SRC_DIR)/layers/descriptor_sets.cpp
79LOCAL_SRC_FILES += $(SRC_DIR)/layers/buffer_validation.cpp
80LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_validation.cpp
81LOCAL_SRC_FILES += $(SRC_DIR)/layers/gpu_validation.cpp
82LOCAL_SRC_FILES += $(SRC_DIR)/layers/convert_to_renderpass2.cpp
83LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
84LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
85LOCAL_SRC_FILES += $(SRC_DIR)/layers/xxhash.c
86LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
87                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
88                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated
89LOCAL_STATIC_LIBRARIES += layer_utils glslang SPIRV-Tools SPIRV-Tools-opt
90LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
91LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden -DBUILD_CORE_VALIDATION
92LOCAL_LDLIBS    := -llog -landroid
93LOCAL_LDFLAGS   += -Wl,-Bsymbolic
94LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
95include $(BUILD_SHARED_LIBRARY)
96
97include $(CLEAR_VARS)
98LOCAL_MODULE := VkLayer_parameter_validation
99LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
100LOCAL_LICENSE_CONDITIONS := notice
101LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
102LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/parameter_validation.cpp
103LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
104LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
105LOCAL_SRC_FILES += $(SRC_DIR)/layers/parameter_validation_utils.cpp
106LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
107                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
108                    $(LOCAL_PATH)/$(SRC_DIR)/layers
109LOCAL_STATIC_LIBRARIES += layer_utils
110LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
111LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden -DBUILD_PARAMETER_VALIDATION
112LOCAL_LDLIBS    := -llog
113LOCAL_LDFLAGS   += -Wl,-Bsymbolic
114LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
115include $(BUILD_SHARED_LIBRARY)
116
117include $(CLEAR_VARS)
118LOCAL_MODULE := VkLayer_object_tracker
119LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
120LOCAL_LICENSE_CONDITIONS := notice
121LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
122LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/object_tracker.cpp
123LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
124LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
125LOCAL_SRC_FILES += $(SRC_DIR)/layers/object_tracker_utils.cpp
126LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
127                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
128                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated
129LOCAL_STATIC_LIBRARIES += layer_utils
130LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
131LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden -DBUILD_OBJECT_TRACKER
132LOCAL_LDLIBS    := -llog
133LOCAL_LDFLAGS   += -Wl,-Bsymbolic
134LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
135include $(BUILD_SHARED_LIBRARY)
136
137include $(CLEAR_VARS)
138LOCAL_MODULE := VkLayer_threading
139LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
140LOCAL_LICENSE_CONDITIONS := notice
141LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
142LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/thread_safety.cpp
143LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
144LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
145LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
146                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
147                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated
148LOCAL_STATIC_LIBRARIES += layer_utils
149LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
150LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden -DBUILD_THREAD_SAFETY
151LOCAL_LDLIBS    := -llog
152LOCAL_LDFLAGS   += -Wl,-Bsymbolic
153LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
154include $(BUILD_SHARED_LIBRARY)
155
156include $(CLEAR_VARS)
157LOCAL_MODULE := VkLayer_unique_objects
158LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
159LOCAL_LICENSE_CONDITIONS := notice
160LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
161LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/layer_chassis_dispatch.cpp
162LOCAL_SRC_FILES += $(SRC_DIR)/layers/generated/chassis.cpp
163LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
164                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
165                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated
166LOCAL_STATIC_LIBRARIES += layer_utils
167LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
168LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden -DLAYER_CHASSIS_CAN_WRAP_HANDLES
169LOCAL_LDLIBS    := -llog
170LOCAL_LDFLAGS   += -Wl,-Bsymbolic
171LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
172include $(BUILD_SHARED_LIBRARY)
173
174include $(CLEAR_VARS)
175LOCAL_MODULE := VkLayerValidationTests
176LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
177LOCAL_LICENSE_CONDITIONS := notice
178LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
179LOCAL_SRC_FILES += $(SRC_DIR)/tests/layer_validation_tests.cpp \
180				   $(SRC_DIR)/tests/vklayertests_pipeline_shader.cpp \
181				   $(SRC_DIR)/tests/vklayertests_buffer_image_memory_sampler.cpp \
182				   $(SRC_DIR)/tests/vklayertests_others.cpp \
183				   $(SRC_DIR)/tests/vklayertests_descriptor_renderpass_framebuffer.cpp \
184				   $(SRC_DIR)/tests/vklayertests_command.cpp \
185				   $(SRC_DIR)/tests/vkpositivelayertests.cpp \
186                   $(SRC_DIR)/tests/vktestbinding.cpp \
187                   $(SRC_DIR)/tests/vktestframeworkandroid.cpp \
188                   $(SRC_DIR)/tests/vkrenderframework.cpp \
189                   $(SRC_DIR)/layers/convert_to_renderpass2.cpp \
190                   $(SRC_DIR)/layers/generated/vk_safe_struct.cpp \
191                   $(THIRD_PARTY)/Vulkan-Tools/common/vulkan_wrapper.cpp
192LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
193                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
194                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
195                    $(LOCAL_PATH)/$(SRC_DIR)/libs \
196                    $(LOCAL_PATH)/$(THIRD_PARTY)/Vulkan-Tools/common
197
198LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc
199LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
200LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DNV_EXTENSIONS -DAMD_EXTENSIONS -fvisibility=hidden --include=$(THIRD_PARTY)/Vulkan-Tools/common/vulkan_wrapper.h
201LOCAL_LDLIBS := -llog -landroid
202LOCAL_LDFLAGS   += -Wl,-Bsymbolic
203LOCAL_LDFLAGS   += -Wl,--exclude-libs,ALL
204include $(BUILD_EXECUTABLE)
205
206# Note: The following module is similar in name to the executable, but differs so that loader won't enumerate the resulting .so
207include $(CLEAR_VARS)
208LOCAL_MODULE := VulkanLayerValidationTests
209LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
210LOCAL_LICENSE_CONDITIONS := notice
211LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE.txt $(LOCAL_PATH)/../../NOTICE
212LOCAL_SRC_FILES += $(SRC_DIR)/tests/layer_validation_tests.cpp \
213				   $(SRC_DIR)/tests/vklayertests_pipeline_shader.cpp \
214				   $(SRC_DIR)/tests/vklayertests_buffer_image_memory_sampler.cpp \
215				   $(SRC_DIR)/tests/vklayertests_others.cpp \
216				   $(SRC_DIR)/tests/vklayertests_descriptor_renderpass_framebuffer.cpp \
217				   $(SRC_DIR)/tests/vklayertests_command.cpp \
218				   $(SRC_DIR)/tests/vkpositivelayertests.cpp \
219                   $(SRC_DIR)/tests/vktestbinding.cpp \
220                   $(SRC_DIR)/tests/vktestframeworkandroid.cpp \
221                   $(SRC_DIR)/tests/vkrenderframework.cpp \
222                   $(SRC_DIR)/layers/convert_to_renderpass2.cpp \
223                   $(SRC_DIR)/layers/generated/vk_safe_struct.cpp \
224                   $(THIRD_PARTY)/Vulkan-Tools/common/vulkan_wrapper.cpp
225LOCAL_C_INCLUDES += $(VULKAN_INCLUDE) \
226                    $(LOCAL_PATH)/$(SRC_DIR)/layers/generated \
227                    $(LOCAL_PATH)/$(SRC_DIR)/layers \
228                    $(LOCAL_PATH)/$(SRC_DIR)/libs \
229                    $(LOCAL_PATH)/$(THIRD_PARTY)/Vulkan-Tools/common
230
231LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc
232LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable
233LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DNV_EXTENSIONS -DAMD_EXTENSIONS -fvisibility=hidden -DVALIDATION_APK --include=$(THIRD_PARTY)/Vulkan-Tools/common/vulkan_wrapper.h
234LOCAL_WHOLE_STATIC_LIBRARIES += android_native_app_glue
235LOCAL_LDLIBS := -llog -landroid
236LOCAL_LDFLAGS := -u ANativeActivity_onCreate
237include $(BUILD_SHARED_LIBRARY)
238
239$(call import-module,android/native_app_glue)
240$(call import-module,third_party/googletest)
241$(call import-module,third_party/shaderc)
242