aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorDan Willemsen2017-10-20 00:18:23 -0500
committerDan Willemsen2017-10-23 14:27:31 -0500
commitfa32e29a1fe81e5472aabc65d3aa25a5af5aec55 (patch)
treeddc9bf3abee1194215f500913f95229b33b928f7 /libkms
parentc6ebab75df64ad6ff2be83cd53bb7d02955d7438 (diff)
downloadexternal-libdrm-fa32e29a1fe81e5472aabc65d3aa25a5af5aec55.tar.gz
external-libdrm-fa32e29a1fe81e5472aabc65d3aa25a5af5aec55.tar.xz
external-libdrm-fa32e29a1fe81e5472aabc65d3aa25a5af5aec55.zip
Convert to Android.bp
See build/soong/README.md for more information about Soong. Removes BOARD_GPU_DRIVERS, which wasn't affecting anything, since none of the HAVE_* macros are defined. Even if they were, we'd prefer to compile all of them so that a single library can support multiple boards. Test: mmma external/libdrm Change-Id: Ie01736bce6cf41e3da5040fe5341ade0634b5111
Diffstat (limited to 'libkms')
-rw-r--r--libkms/Android.bp15
-rw-r--r--libkms/Android.mk56
-rw-r--r--libkms/Android.sources.bp38
3 files changed, 53 insertions, 56 deletions
diff --git a/libkms/Android.bp b/libkms/Android.bp
new file mode 100644
index 00000000..b09dbf42
--- /dev/null
+++ b/libkms/Android.bp
@@ -0,0 +1,15 @@
1build = ["Android.sources.bp"]
2
3cc_library_shared {
4 name: "libkms",
5 defaults: [
6 "libdrm_defaults",
7 "libkms_sources",
8 "libkms_vmwgfx_sources",
9 "libkms_intel_sources",
10 "libkms_nouveau_sources",
11 "libkms_radeon_sources",
12 ],
13 vendor: true,
14 shared_libs: ["libdrm"],
15}
diff --git a/libkms/Android.mk b/libkms/Android.mk
deleted file mode 100644
index 8a38ad54..00000000
--- a/libkms/Android.mk
+++ /dev/null
@@ -1,56 +0,0 @@
1DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
2
3intel_drivers := i915 i965 i915g ilo
4radeon_drivers := r300g r600g radeonsi
5rockchip_drivers := rockchip
6nouveau_drivers := nouveau
7virgl_drivers := virgl
8vmwgfx_drivers := vmwgfx
9tegra_drivers := tegra
10
11valid_drivers := \
12 $(intel_drivers) \
13 $(radeon_drivers) \
14 $(rockchip_drivers) \
15 $(nouveau_drivers) \
16 $(virgl_drivers) \
17 $(vmwgfx_drivers) \
18 $(tegra_drivers)
19
20# warn about invalid drivers
21invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS))
22ifneq ($(invalid_drivers),)
23$(warning invalid GPU drivers: $(invalid_drivers))
24# tidy up
25DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS))
26endif
27
28LOCAL_PATH := $(call my-dir)
29
30include $(CLEAR_VARS)
31include $(LOCAL_PATH)/Makefile.sources
32
33LOCAL_SRC_FILES := $(LIBKMS_FILES)
34
35ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
36LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
37endif
38
39ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
40LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES)
41endif
42
43ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),)
44LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES)
45endif
46
47ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),)
48LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
49endif
50
51LOCAL_MODULE := libkms
52LOCAL_VENDOR_MODULE := true
53LOCAL_SHARED_LIBRARIES := libdrm
54
55include $(LIBDRM_COMMON_MK)
56include $(BUILD_SHARED_LIBRARY)
diff --git a/libkms/Android.sources.bp b/libkms/Android.sources.bp
new file mode 100644
index 00000000..5582f235
--- /dev/null
+++ b/libkms/Android.sources.bp
@@ -0,0 +1,38 @@
1// Autogenerated with Android.sources.bp.mk
2
3cc_defaults {
4 name: "libkms_sources",
5 srcs: [
6 "linux.c",
7 "dumb.c",
8 "api.c",
9 ],
10}
11
12cc_defaults {
13 name: "libkms_vmwgfx_sources",
14 srcs: [
15 "vmwgfx.c",
16 ],
17}
18
19cc_defaults {
20 name: "libkms_intel_sources",
21 srcs: [
22 "intel.c",
23 ],
24}
25
26cc_defaults {
27 name: "libkms_nouveau_sources",
28 srcs: [
29 "nouveau.c",
30 ],
31}
32
33cc_defaults {
34 name: "libkms_radeon_sources",
35 srcs: [
36 "radeon.c",
37 ],
38}