aboutsummaryrefslogtreecommitdiffstats
path: root/system/vulkan_enc/Android.mk
blob: b4fd3cf4c1af05a8bc816fcc71fb1b7199870691 (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

# Autogenerated makefile
# android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/genvk.py -registry android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/vk.xml cereal -o android/android-emugl/host/libs/libOpenglRender/vulkan/cereal
# Please do not modify directly;
# re-run android/scripts/generate-vulkan-sources.sh,
# or directly from Python by defining:
# VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml
# CEREAL_OUTPUT_DIR: Where to put the generated sources.
# python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR

LOCAL_PATH := $(call my-dir)

$(call emugl-begin-shared-library,libvulkan_enc)
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
$(call emugl-import,libOpenglCodecCommon$(GOLDFISH_OPENGL_LIB_SUFFIX) lib_renderControl_enc)
ifeq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST))
$(call emugl-import,libandroidemu)
else
$(call emugl-export,SHARED_LIBRARIES,libandroidemu)
endif

# Vulkan include dir
ifeq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST))
LOCAL_C_INCLUDES += \
    $(LOCAL_PATH) \
    $(HOST_EMUGL_PATH)/host/include \
    $(HOST_EMUGL_PATH)/host/include/vulkan
endif

ifneq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST))
LOCAL_C_INCLUDES += \
    $(LOCAL_PATH) \
    $(LOCAL_PATH)/../vulkan_enc \
    external/libdrm \
    external/minigbm/cros_gralloc \

LOCAL_HEADER_LIBRARIES += \
    hwvulkan_headers \
    vulkan_headers \

LOCAL_SHARED_LIBRARIES += libdrm

endif

LOCAL_CFLAGS += \
    -DLOG_TAG=\"goldfish_vulkan\" \
    -DVK_ANDROID_native_buffer \
    -DVK_GOOGLE_address_space \
    -Wno-missing-field-initializers \
    -Werror \
    -fstrict-aliasing \
    -DVK_USE_PLATFORM_ANDROID_KHR \
    -DVK_NO_PROTOTYPES \

LOCAL_SRC_FILES := AndroidHardwareBuffer.cpp \
    HostVisibleMemoryVirtualization.cpp \
    Resources.cpp \
    Validation.cpp \
    VulkanStreamGuest.cpp \
    VulkanHandleMapping.cpp \
    ResourceTracker.cpp \
    VkEncoder.cpp \
goldfish_vk_extension_structs_guest.cpp \
goldfish_vk_marshaling_guest.cpp \
goldfish_vk_deepcopy_guest.cpp \
goldfish_vk_handlemap_guest.cpp \
goldfish_vk_transform_guest.cpp \


ifeq (true,$(GOLDFISH_OPENGL_BUILD_FOR_HOST))
LOCAL_CFLAGS += -D__ANDROID_API__=28
$(call emugl-export,SHARED_LIBRARIES,libgui)
else
$(call emugl-export,SHARED_LIBRARIES,libsync libnativewindow)
LOCAL_STATIC_LIBRARIES += libarect
endif

$(call emugl-end-module)