blob: 779551b757050b1b626e63b4290b725c38a81f42 [file] [log] [blame]
David Reveman630129e2019-05-03 01:18:32 -04001shared_library("libvulkan_goldfish") {
David Reveman74e99bb2019-02-15 18:47:25 -05002 sources = [
3 "android-emu/android/base/AlignedBuf.cpp",
4 "android-emu/android/base/AlignedBuf.h",
5 "android-emu/android/base/Pool.cpp",
6 "android-emu/android/base/Pool.h",
7 "android-emu/android/base/SubAllocator.cpp",
8 "android-emu/android/base/SubAllocator.h",
9 "android-emu/android/base/files/MemStream.cpp",
10 "android-emu/android/base/files/MemStream.h",
11 "android-emu/android/base/files/Stream.cpp",
12 "android-emu/android/base/files/Stream.h",
13 "android-emu/android/base/files/StreamSerializing.cpp",
14 "android-emu/android/base/files/StreamSerializing.h",
Lingfeng Yangf6861062019-08-21 21:05:31 -070015 "android-emu/android/base/threads/AndroidWorkPool.h",
16 "android-emu/android/base/threads/AndroidWorkPool.cpp",
Lingfeng Yang42ac1792019-02-22 20:13:44 -080017 "android-emu/android/base/Tracing.cpp",
18 "android-emu/android/base/Tracing.h",
David Reveman74e99bb2019-02-15 18:47:25 -050019 "shared/OpenglCodecCommon/ChecksumCalculator.cpp",
20 "shared/OpenglCodecCommon/ChecksumCalculator.h",
21 "shared/OpenglCodecCommon/glUtils.cpp",
22 "shared/OpenglCodecCommon/glUtils.h",
23 "shared/OpenglCodecCommon/goldfish_address_space.cpp",
24 "shared/OpenglCodecCommon/goldfish_address_space.h",
25 "shared/OpenglCodecCommon/goldfish_dma.cpp",
26 "shared/OpenglCodecCommon/goldfish_dma.h",
27 "system/OpenglSystemCommon/HostConnection.cpp",
28 "system/OpenglSystemCommon/HostConnection.h",
29 "system/OpenglSystemCommon/ProcessPipe.cpp",
30 "system/OpenglSystemCommon/ProcessPipe.h",
31 "system/OpenglSystemCommon/QemuPipeStream.cpp",
32 "system/OpenglSystemCommon/QemuPipeStream.h",
33 "system/OpenglSystemCommon/ThreadInfo.cpp",
34 "system/OpenglSystemCommon/ThreadInfo.h",
35 "system/renderControl_enc/renderControl_enc.cpp",
36 "system/renderControl_enc/renderControl_enc.h",
37 "system/vulkan/func_table.cpp",
38 "system/vulkan/func_table.h",
39 "system/vulkan/goldfish_vulkan.cpp",
40 "system/vulkan_enc/HostVisibleMemoryVirtualization.cpp",
41 "system/vulkan_enc/HostVisibleMemoryVirtualization.h",
42 "system/vulkan_enc/ResourceTracker.cpp",
43 "system/vulkan_enc/ResourceTracker.h",
44 "system/vulkan_enc/Resources.cpp",
45 "system/vulkan_enc/Resources.h",
46 "system/vulkan_enc/Validation.cpp",
47 "system/vulkan_enc/Validation.h",
48 "system/vulkan_enc/VkEncoder.cpp",
49 "system/vulkan_enc/VkEncoder.h",
50 "system/vulkan_enc/VulkanHandleMapping.cpp",
51 "system/vulkan_enc/VulkanHandleMapping.h",
Lingfeng Yang42ac1792019-02-22 20:13:44 -080052 "system/vulkan_enc/VulkanStreamGuest.cpp",
53 "system/vulkan_enc/VulkanStreamGuest.h",
David Reveman74e99bb2019-02-15 18:47:25 -050054 "system/vulkan_enc/goldfish_vk_deepcopy_guest.cpp",
55 "system/vulkan_enc/goldfish_vk_deepcopy_guest.h",
56 "system/vulkan_enc/goldfish_vk_extension_structs_guest.cpp",
57 "system/vulkan_enc/goldfish_vk_extension_structs_guest.h",
58 "system/vulkan_enc/goldfish_vk_marshaling_guest.cpp",
59 "system/vulkan_enc/goldfish_vk_marshaling_guest.h",
60 "system/vulkan_enc/goldfish_vk_transform_guest.cpp",
61 "system/vulkan_enc/goldfish_vk_transform_guest.h",
62 ]
63
64 include_dirs = [
65 "android-emu",
66 "host/include/libOpenglRender",
67 "shared/OpenglCodecCommon",
68 "system/OpenglSystemCommon",
69 "system/renderControl_enc",
70 "system/vulkan_enc",
71 "system/include",
72 ]
73
74 defines = [
75 "LOG_TAG=\"goldfish_vulkan\"",
76 "GOLDFISH_VULKAN",
77 "GOLDFISH_NO_GL",
David Reveman5b7c5842019-02-20 01:06:48 -050078 "VK_USE_PLATFORM_FUCHSIA",
David Reveman74e99bb2019-02-15 18:47:25 -050079 "PLATFORM_SDK_VERSION=1",
80 "PAGE_SIZE=4096",
81 ]
82
83 cflags_cc = [
David Reveman5b7c5842019-02-20 01:06:48 -050084 "-Wno-missing-field-initializers",
David Revemanaa65ad62019-05-02 08:23:46 -040085 "-Wno-newline-eof",
David Reveman3c7b3ca2019-05-01 19:36:26 -040086 "-Wno-unused-function",
87 "-Wno-unused-value",
88 "-Wno-unused-variable",
David Reveman74e99bb2019-02-15 18:47:25 -050089 ]
90
David Reveman7beff562019-04-22 16:50:02 +020091 ldflags = [ "-static-libstdc++" ]
92
David Reveman74e99bb2019-02-15 18:47:25 -050093 if (target_os == "fuchsia") {
David Reveman4f45b8c2019-04-21 09:10:10 +020094 sources -= [ "system/OpenglSystemCommon/QemuPipeStream.cpp" ]
95 sources += [
96 "fuchsia/port.cc",
97 "system/OpenglSystemCommon/QemuPipeStreamFuchsia.cpp",
98 ]
David Reveman74e99bb2019-02-15 18:47:25 -050099
100 include_dirs += [
David Reveman74e99bb2019-02-15 18:47:25 -0500101 "fuchsia/include",
David Revemanc28bad82019-05-07 17:57:49 -0400102 "//third_party/vulkan_loader_and_validation_layers/include"
David Reveman74e99bb2019-02-15 18:47:25 -0500103 ]
104
David Reveman5b7c5842019-02-20 01:06:48 -0500105 libs = [
106 "zircon"
107 ]
108
109 deps = [
David Revemanaa65ad62019-05-02 08:23:46 -0400110 "//zircon/public/fidl/fuchsia-hardware-goldfish-address-space",
111 "//zircon/public/fidl/fuchsia-hardware-goldfish-control",
112 "//zircon/public/fidl/fuchsia-hardware-goldfish-pipe",
David Revemane10aae22019-03-17 15:55:45 -0400113 "//zircon/public/fidl/fuchsia-sysmem",
David Reveman5b7c5842019-02-20 01:06:48 -0500114 "//zircon/public/lib/fdio",
David Reveman5b7c5842019-02-20 01:06:48 -0500115 "//zircon/public/lib/trace",
116 ]
117
David Reveman74e99bb2019-02-15 18:47:25 -0500118 defines += [
David Reveman1b2a7792019-04-08 11:30:05 -0400119 "QEMU_PIPE_PATH=\"/dev/class/goldfish-pipe/000\"",
120 "GOLDFISH_ADDRESS_SPACE_DEVICE_NAME=\"/dev/class/goldfish-address-space/000\"",
David Reveman74e99bb2019-02-15 18:47:25 -0500121 ]
122 }
123}