Android-x86
Fork
Spenden

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-libdrm: Commit

external/libdrm


Commit MetaInfo

Revision4e17e77f592ec6dd5b98e3c1bf2cfb394cd289d5 (tree)
Zeit2020-05-23 23:07:16
AutorMauro Rossi <issor.oruam@gmai...>
CommiterMauro Rossi

Log Message

Convert to Android.bp (v2)

Based on AOSP fa32e29 "Convert to Android.bp" updated to commit
915c5fa "Android.bp: Add include exports for android dir"
with the following changelog:

amdgpu/Android.bp: add cflag -DAMDGPU_ASIC_ID_TABLE
amdgpu/Android.sources.bp: added amdgpu_vm.c that was missing
intel/Android.sources.bp: added intel_chipset.c that was missing
rockchip: delete Android.bp
tests/planetest: delete Android.bp and Android.sources.bp

NOTE: due to commit 93a3ae4 "Convert Android.mk file to Android.bp"
prebuilt_etc module type is used in data/Android.bp but is supported
only with build/soong version of Android Q
Workaraound will be required to build with Android O and P

(v2) changes due to 074947ee ("meson: always define whether headers exist")

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,68 @@
1+//
2+// Copyright © 2011-2012 Intel Corporation
3+//
4+// Permission is hereby granted, free of charge, to any person obtaining a
5+// copy of this software and associated documentation files (the "Software"),
6+// to deal in the Software without restriction, including without limitation
7+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+// and/or sell copies of the Software, and to permit persons to whom the
9+// Software is furnished to do so, subject to the following conditions:
10+//
11+// The above copyright notice and this permission notice (including the next
12+// paragraph) shall be included in all copies or substantial portions of the
13+// Software.
14+//
15+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21+// IN THE SOFTWARE.
22+//
23+
24+subdirs = ["*"]
25+build = ["Android.sources.bp"]
26+
27+cc_defaults {
28+ name: "libdrm_defaults",
29+ cflags: [
30+ // XXX: Consider moving these to config.h analogous to autoconf.
31+ "-DMAJOR_IN_SYSMACROS=1",
32+ "-DHAVE_ALLOCA_H=0",
33+ "-DHAVE_SYS_SELECT_H=0",
34+ "-DHAVE_SYS_SYSCTL_H=0",
35+ "-DHAVE_VISIBILITY=1",
36+ "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1",
37+
38+ "-Wall",
39+ "-Werror",
40+ "-Wno-deprecated-declarations",
41+ "-Wno-format",
42+ "-Wno-gnu-variable-sized-type-not-at-end",
43+ "-Wno-pointer-arith",
44+ "-Wno-unused-parameter",
45+ "-Wno-unused-variable",
46+ "-Wno-missing-field-initializers",
47+ ],
48+ export_include_dirs: ["."],
49+}
50+
51+// Library for the device
52+cc_library {
53+ name: "libdrm",
54+ vendor_available: true,
55+ defaults: [
56+ "libdrm_defaults",
57+ "libdrm_sources",
58+ ],
59+
60+ export_include_dirs: ["include/drm", "android"],
61+
62+ cflags: [
63+ "-Wno-enum-conversion",
64+ "-Wno-pointer-arith",
65+ "-Wno-sign-compare",
66+ "-Wno-tautological-compare",
67+ ],
68+}
--- a/Android.common.mk
+++ /dev/null
@@ -1,20 +0,0 @@
1-# XXX: Consider moving these to config.h analogous to autoconf.
2-LOCAL_CFLAGS += \
3- -DMAJOR_IN_SYSMACROS=1 \
4- -DHAVE_ALLOCA_H=0 \
5- -DHAVE_SYS_SELECT_H=0 \
6- -DHAVE_SYS_SYSCTL_H=0 \
7- -DHAVE_VISIBILITY=1 \
8- -fvisibility=hidden \
9- -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
10-
11-LOCAL_CFLAGS += \
12- -Wno-error \
13- -Wno-unused-parameter \
14- -Wno-missing-field-initializers \
15- -Wno-pointer-arith \
16- -Wno-enum-conversion
17-
18-# Quiet down the build system and remove any .h files from the sources
19-LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
20-LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)
--- a/Android.mk
+++ /dev/null
@@ -1,117 +0,0 @@
1-#
2-# Copyright © 2011-2012 Intel Corporation
3-#
4-# Permission is hereby granted, free of charge, to any person obtaining a
5-# copy of this software and associated documentation files (the "Software"),
6-# to deal in the Software without restriction, including without limitation
7-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-# and/or sell copies of the Software, and to permit persons to whom the
9-# Software is furnished to do so, subject to the following conditions:
10-#
11-# The above copyright notice and this permission notice (including the next
12-# paragraph) shall be included in all copies or substantial portions of the
13-# Software.
14-#
15-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21-# IN THE SOFTWARE.
22-#
23-
24-# Two identical libs are defined here.
25-# libdrm: for vendors. installed to /vendor/lib. libdrm_<vendor> uses this.
26-# libdrm_platform: for platform modules (such as libminui). installed to /system/lib
27-
28-LIBDRM_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
29-ifneq ($(filter 2 4, $(LIBDRM_ANDROID_MAJOR_VERSION)),)
30-$(error "Android 4.4 and earlier not supported")
31-endif
32-
33-LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk
34-
35-LOCAL_PATH := $(call my-dir)
36-LIBDRM_TOP := $(LOCAL_PATH)
37-
38-include $(CLEAR_VARS)
39-
40-# Import variables LIBDRM_{,H,INCLUDE_H,INCLUDE_ANDROID_H,INCLUDE_VMWGFX_H}_FILES
41-include $(LOCAL_PATH)/Makefile.sources
42-
43-#static library for the device (recovery)
44-include $(CLEAR_VARS)
45-
46-LOCAL_MODULE := libdrm_platform
47-
48-LOCAL_SRC_FILES := $(LIBDRM_FILES)
49-LOCAL_EXPORT_C_INCLUDE_DIRS := \
50- $(LOCAL_PATH) \
51- $(LOCAL_PATH)/include/drm
52-
53-LOCAL_C_INCLUDES := \
54- $(LOCAL_PATH)/include/drm
55-
56-include $(LIBDRM_COMMON_MK)
57-include $(BUILD_STATIC_LIBRARY)
58-
59-# Dynamic library for the device
60-include $(CLEAR_VARS)
61-
62-LOCAL_MODULE := libdrm_platform
63-
64-LOCAL_SRC_FILES := $(LIBDRM_FILES)
65-LOCAL_EXPORT_C_INCLUDE_DIRS := \
66- $(LOCAL_PATH) \
67- $(LOCAL_PATH)/include/drm
68-
69-LOCAL_SHARED_LIBRARIES := \
70- liblog
71-
72-LOCAL_C_INCLUDES := \
73- $(LOCAL_PATH)/include/drm
74-
75-include $(LIBDRM_COMMON_MK)
76-include $(BUILD_SHARED_LIBRARY)
77-
78-# Static library for the device (recovery)
79-include $(CLEAR_VARS)
80-
81-LOCAL_MODULE := libdrm
82-LOCAL_VENDOR_MODULE := true
83-
84-LOCAL_SRC_FILES := $(LIBDRM_FILES)
85-LOCAL_EXPORT_C_INCLUDE_DIRS := \
86- $(LOCAL_PATH) \
87- $(LOCAL_PATH)/include/drm \
88- $(LOCAL_PATH)/android
89-
90-LOCAL_C_INCLUDES := \
91- $(LOCAL_PATH)/include/drm
92-
93-include $(LIBDRM_COMMON_MK)
94-include $(BUILD_STATIC_LIBRARY)
95-
96-# Shared library for the device
97-include $(CLEAR_VARS)
98-LOCAL_MODULE := libdrm
99-LOCAL_VENDOR_MODULE := true
100-
101-LOCAL_SRC_FILES := $(LIBDRM_FILES)
102-LOCAL_EXPORT_C_INCLUDE_DIRS := \
103- $(LOCAL_PATH) \
104- $(LOCAL_PATH)/include/drm \
105- $(LOCAL_PATH)/android
106-
107-LOCAL_SHARED_LIBRARIES := \
108- liblog \
109- libcutils
110-
111-LOCAL_C_INCLUDES := \
112- $(LOCAL_PATH)/include/drm
113-
114-include $(LIBDRM_COMMON_MK)
115-include $(BUILD_SHARED_LIBRARY)
116-
117-include $(call all-makefiles-under,$(LOCAL_PATH))
--- /dev/null
+++ b/Android.sources.bp
@@ -0,0 +1,12 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_sources",
5+ srcs: [
6+ "xf86drm.c",
7+ "xf86drmHash.c",
8+ "xf86drmRandom.c",
9+ "xf86drmSL.c",
10+ "xf86drmMode.c",
11+ ],
12+}
--- /dev/null
+++ b/Android.sources.bp.mk
@@ -0,0 +1,25 @@
1+# Usage: make -f path/to/Android.sources.bp.mk NAMES=<> >Android.sources.bp
2+#
3+# It will read the Makefile.sources in the current directory, and
4+# write <NAME>_FILES to stdout as an Android.bp cc_defaults module.
5+
6+.PHONY: all
7+all:
8+ @# Do nothing
9+
10+include Makefile.sources
11+
12+empty :=
13+indent := $(empty) $(empty)
14+
15+$(info // Autogenerated with Android.sources.bp.mk)
16+$(foreach NAME,$(NAMES), \
17+ $(eval lower_name := $(shell echo $(PREFIX)$(NAME) | tr 'A-Z' 'a-z')) \
18+ $(info ) \
19+ $(info cc_defaults {) \
20+ $(info $(indent)name: "$(lower_name)_sources",) \
21+ $(info $(indent)srcs: [) \
22+ $(foreach f,$(filter %.c,$($(NAME)_FILES)), \
23+ $(info $(indent)$(indent)"$(f)",)) \
24+ $(info $(indent)],) \
25+ $(info }))
--- /dev/null
+++ b/amdgpu/Android.bp
@@ -0,0 +1,15 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_amdgpu",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_amdgpu_sources",
8+ ],
9+ vendor: true,
10+ shared_libs: ["libdrm"],
11+
12+ cflags: [
13+ "-DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\""
14+ ],
15+}
--- a/amdgpu/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-# Import variables LIBDRM_AMDGPU_FILES, LIBDRM_AMDGPU_H_FILES
5-include $(LOCAL_PATH)/Makefile.sources
6-
7-LOCAL_MODULE := libdrm_amdgpu
8-LOCAL_VENDOR_MODULE := true
9-LOCAL_SHARED_LIBRARIES := libdrm
10-
11-LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
12-
13-LOCAL_CFLAGS := \
14- -DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\"
15-
16-LOCAL_REQUIRED_MODULES := amdgpu.ids
17-
18-include $(LIBDRM_COMMON_MK)
19-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/amdgpu/Android.sources.bp
@@ -0,0 +1,15 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_amdgpu_sources",
5+ srcs: [
6+ "amdgpu_asic_id.c",
7+ "amdgpu_bo.c",
8+ "amdgpu_cs.c",
9+ "amdgpu_device.c",
10+ "amdgpu_gpu_info.c",
11+ "amdgpu_vamgr.c",
12+ "amdgpu_vm.c",
13+ "handle_table.c",
14+ ],
15+}
--- /dev/null
+++ b/data/Android.bp
@@ -0,0 +1,6 @@
1+prebuilt_etc {
2+ name: "amdgpu.ids",
3+ proprietary: true,
4+ sub_dir: "hwdata",
5+ src: "amdgpu.ids",
6+}
--- a/data/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-
3-include $(CLEAR_VARS)
4-LOCAL_MODULE := amdgpu.ids
5-LOCAL_MODULE_TAGS := optional
6-LOCAL_MODULE_CLASS := ETC
7-LOCAL_PROPRIETARY_MODULE := true
8-LOCAL_MODULE_RELATIVE_PATH := hwdata
9-LOCAL_SRC_FILES := $(LOCAL_MODULE)
10-include $(BUILD_PREBUILT)
--- /dev/null
+++ b/etnaviv/Android.bp
@@ -0,0 +1,11 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_etnaviv",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_etnaviv_sources",
8+ ],
9+ vendor: true,
10+ shared_libs: ["libdrm"],
11+}
--- a/etnaviv/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-# Import variables LIBDRM_ETNAVIV_FILES, LIBDRM_ETNAVIV_H_FILES
5-include $(LOCAL_PATH)/Makefile.sources
6-
7-LOCAL_MODULE := libdrm_etnaviv
8-LOCAL_VENDOR_MODULE := true
9-
10-LOCAL_SHARED_LIBRARIES := libdrm
11-
12-LOCAL_SRC_FILES := $(LIBDRM_ETNAVIV_FILES)
13-
14-include $(LIBDRM_COMMON_MK)
15-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/etnaviv/Android.sources.bp
@@ -0,0 +1,13 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_etnaviv_sources",
5+ srcs: [
6+ "etnaviv_device.c",
7+ "etnaviv_gpu.c",
8+ "etnaviv_bo.c",
9+ "etnaviv_bo_cache.c",
10+ "etnaviv_pipe.c",
11+ "etnaviv_cmd_stream.c",
12+ ],
13+}
--- /dev/null
+++ b/freedreno/Android.bp
@@ -0,0 +1,11 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_freedreno",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_freedreno_sources",
8+ ],
9+ vendor: true,
10+ shared_libs: ["libdrm"],
11+}
--- a/freedreno/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-# Import variables LIBDRM_FREEDRENO_FILES, LIBDRM_FREEDRENO_H_FILES
5-include $(LOCAL_PATH)/Makefile.sources
6-
7-LOCAL_MODULE := libdrm_freedreno
8-LOCAL_VENDOR_MODULE := true
9-LOCAL_SHARED_LIBRARIES := libdrm
10-
11-LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES)
12-
13-include $(LIBDRM_COMMON_MK)
14-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/freedreno/Android.sources.bp
@@ -0,0 +1,16 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_freedreno_sources",
5+ srcs: [
6+ "freedreno_device.c",
7+ "freedreno_pipe.c",
8+ "freedreno_ringbuffer.c",
9+ "freedreno_bo.c",
10+ "freedreno_bo_cache.c",
11+ "msm/msm_bo.c",
12+ "msm/msm_device.c",
13+ "msm/msm_pipe.c",
14+ "msm/msm_ringbuffer.c",
15+ ],
16+}
--- /dev/null
+++ b/intel/Android.bp
@@ -0,0 +1,36 @@
1+//
2+// Copyright © 2011 Intel Corporation
3+//
4+// Permission is hereby granted, free of charge, to any person obtaining a
5+// copy of this software and associated documentation files (the "Software"),
6+// to deal in the Software without restriction, including without limitation
7+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+// and/or sell copies of the Software, and to permit persons to whom the
9+// Software is furnished to do so, subject to the following conditions:
10+//
11+// The above copyright notice and this permission notice (including the next
12+// paragraph) shall be included in all copies or substantial portions of the
13+// Software.
14+//
15+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21+// IN THE SOFTWARE.
22+//
23+
24+build = ["Android.sources.bp"]
25+
26+cc_library_shared {
27+ name: "libdrm_intel",
28+ defaults: [
29+ "libdrm_defaults",
30+ "libdrm_intel_sources",
31+ ],
32+ vendor: true,
33+
34+ // Removed dependency to libpciaccess: not used on Android
35+ shared_libs: ["libdrm"],
36+}
--- a/intel/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
1-#
2-# Copyright © 2011 Intel Corporation
3-#
4-# Permission is hereby granted, free of charge, to any person obtaining a
5-# copy of this software and associated documentation files (the "Software"),
6-# to deal in the Software without restriction, including without limitation
7-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-# and/or sell copies of the Software, and to permit persons to whom the
9-# Software is furnished to do so, subject to the following conditions:
10-#
11-# The above copyright notice and this permission notice (including the next
12-# paragraph) shall be included in all copies or substantial portions of the
13-# Software.
14-#
15-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21-# IN THE SOFTWARE.
22-#
23-
24-LOCAL_PATH := $(call my-dir)
25-include $(CLEAR_VARS)
26-
27-# Import variables LIBDRM_INTEL_FILES, LIBDRM_INTEL_H_FILES
28-include $(LOCAL_PATH)/Makefile.sources
29-
30-LOCAL_MODULE := libdrm_intel
31-LOCAL_VENDOR_MODULE := true
32-
33-LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES)
34-
35-LOCAL_SHARED_LIBRARIES := \
36- libdrm
37-
38-include $(LIBDRM_COMMON_MK)
39-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/intel/Android.sources.bp
@@ -0,0 +1,13 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_intel_sources",
5+ srcs: [
6+ "intel_bufmgr.c",
7+ "intel_bufmgr_fake.c",
8+ "intel_bufmgr_gem.c",
9+ "intel_chipset.c",
10+ "intel_decode.c",
11+ "mm.c",
12+ ],
13+}
--- /dev/null
+++ b/libkms/Android.bp
@@ -0,0 +1,15 @@
1+build = ["Android.sources.bp"]
2+
3+cc_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+}
--- a/libkms/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
1-DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
2-
3-intel_drivers := i915 i965 i915g iris
4-radeon_drivers := r300g r600g radeonsi
5-nouveau_drivers := nouveau
6-virgl_drivers := virgl
7-vmwgfx_drivers := vmwgfx
8-
9-valid_drivers := \
10- $(intel_drivers) \
11- $(radeon_drivers) \
12- $(nouveau_drivers) \
13- $(virgl_drivers) \
14- $(vmwgfx_drivers)
15-
16-# warn about invalid drivers
17-invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS))
18-ifneq ($(invalid_drivers),)
19-$(warning invalid GPU drivers: $(invalid_drivers))
20-# tidy up
21-DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS))
22-endif
23-
24-LOCAL_PATH := $(call my-dir)
25-
26-include $(CLEAR_VARS)
27-include $(LOCAL_PATH)/Makefile.sources
28-
29-LOCAL_SRC_FILES := $(LIBKMS_FILES)
30-
31-ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
32-LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
33-endif
34-
35-ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
36-LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES)
37-endif
38-
39-ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),)
40-LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES)
41-endif
42-
43-ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),)
44-LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
45-endif
46-
47-LOCAL_MODULE := libkms
48-LOCAL_VENDOR_MODULE := true
49-LOCAL_SHARED_LIBRARIES := libdrm
50-
51-include $(LIBDRM_COMMON_MK)
52-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/libkms/Android.sources.bp
@@ -0,0 +1,38 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libkms_sources",
5+ srcs: [
6+ "linux.c",
7+ "dumb.c",
8+ "api.c",
9+ ],
10+}
11+
12+cc_defaults {
13+ name: "libkms_vmwgfx_sources",
14+ srcs: [
15+ "vmwgfx.c",
16+ ],
17+}
18+
19+cc_defaults {
20+ name: "libkms_intel_sources",
21+ srcs: [
22+ "intel.c",
23+ ],
24+}
25+
26+cc_defaults {
27+ name: "libkms_nouveau_sources",
28+ srcs: [
29+ "nouveau.c",
30+ ],
31+}
32+
33+cc_defaults {
34+ name: "libkms_radeon_sources",
35+ srcs: [
36+ "radeon.c",
37+ ],
38+}
--- /dev/null
+++ b/nouveau/Android.bp
@@ -0,0 +1,11 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_nouveau",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_nouveau_sources",
8+ ],
9+ vendor: true,
10+ shared_libs: ["libdrm"],
11+}
--- a/nouveau/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-# Import variables LIBDRM_NOUVEAU_FILES, LIBDRM_NOUVEAU_H_FILES
5-include $(LOCAL_PATH)/Makefile.sources
6-
7-LOCAL_MODULE := libdrm_nouveau
8-LOCAL_VENDOR_MODULE := true
9-
10-LOCAL_SHARED_LIBRARIES := libdrm
11-
12-LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES)
13-
14-include $(LIBDRM_COMMON_MK)
15-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/nouveau/Android.sources.bp
@@ -0,0 +1,11 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_nouveau_sources",
5+ srcs: [
6+ "nouveau.c",
7+ "pushbuf.c",
8+ "bufctx.c",
9+ "abi16.c",
10+ ],
11+}
--- /dev/null
+++ b/omap/Android.bp
@@ -0,0 +1,12 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_omap",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_omap_sources",
8+ ],
9+ vendor: true,
10+
11+ shared_libs: ["libdrm"],
12+}
--- a/omap/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-LOCAL_MODULE := libdrm_omap
5-LOCAL_VENDOR_MODULE := true
6-
7-LOCAL_SRC_FILES := omap_drm.c
8-
9-LOCAL_SHARED_LIBRARIES := libdrm
10-
11-include $(LIBDRM_COMMON_MK)
12-
13-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/omap/Android.sources.bp
@@ -0,0 +1,8 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_omap_sources",
5+ srcs: [
6+ "omap_drm.c",
7+ ],
8+}
--- /dev/null
+++ b/radeon/Android.bp
@@ -0,0 +1,11 @@
1+build = ["Android.sources.bp"]
2+
3+cc_library_shared {
4+ name: "libdrm_radeon",
5+ defaults: [
6+ "libdrm_defaults",
7+ "libdrm_radeon_sources",
8+ ],
9+ vendor: true,
10+ shared_libs: ["libdrm"],
11+}
--- a/radeon/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-include $(CLEAR_VARS)
3-
4-# Import variables LIBDRM_RADEON_FILES, LIBDRM_RADEON_H_FILES
5-include $(LOCAL_PATH)/Makefile.sources
6-
7-LOCAL_MODULE := libdrm_radeon
8-LOCAL_VENDOR_MODULE := true
9-
10-LOCAL_SHARED_LIBRARIES := libdrm
11-
12-LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES)
13-
14-include $(LIBDRM_COMMON_MK)
15-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/radeon/Android.sources.bp
@@ -0,0 +1,13 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_radeon_sources",
5+ srcs: [
6+ "radeon_bo_gem.c",
7+ "radeon_cs_gem.c",
8+ "radeon_cs_space.c",
9+ "radeon_bo.c",
10+ "radeon_cs.c",
11+ "radeon_surface.c",
12+ ],
13+}
--- /dev/null
+++ b/tegra/Android.bp
@@ -0,0 +1,14 @@
1+cc_library_shared {
2+ name: "libdrm_tegra",
3+ vendor: true,
4+ shared_libs: ["libdrm"],
5+
6+ srcs: ["tegra.c"],
7+
8+ cflags: [
9+ "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1",
10+ "-Wall",
11+ "-Werror",
12+ "-Wno-unused-variable",
13+ ],
14+}
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,6 @@
1+subdirs = ["*"]
2+
3+cc_library_headers {
4+ name: "libdrm_test_headers",
5+ export_include_dirs: ["."],
6+}
--- a/tests/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
1-include $(call all-subdir-makefiles)
--- /dev/null
+++ b/tests/modetest/Android.bp
@@ -0,0 +1,12 @@
1+build = ["Android.sources.bp"]
2+
3+cc_test {
4+ name: "modetest",
5+ defaults: [
6+ "libdrm_defaults",
7+ "modetest_sources",
8+ ],
9+
10+ shared_libs: ["libdrm"],
11+ static_libs: ["libdrm_util"],
12+}
--- a/tests/modetest/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-
3-include $(CLEAR_VARS)
4-include $(LOCAL_PATH)/Makefile.sources
5-
6-LOCAL_SRC_FILES := $(MODETEST_FILES)
7-
8-LOCAL_MODULE := modetest
9-
10-LOCAL_SHARED_LIBRARIES := libdrm_platform
11-LOCAL_STATIC_LIBRARIES := libdrm_util
12-
13-include $(LIBDRM_COMMON_MK)
14-include $(BUILD_EXECUTABLE)
--- /dev/null
+++ b/tests/modetest/Android.sources.bp
@@ -0,0 +1,10 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "modetest_sources",
5+ srcs: [
6+ "buffers.c",
7+ "cursor.c",
8+ "modetest.c",
9+ ],
10+}
--- /dev/null
+++ b/tests/proptest/Android.bp
@@ -0,0 +1,8 @@
1+cc_test {
2+ name: "proptest",
3+ defaults: ["libdrm_defaults"],
4+ srcs: ["proptest.c"],
5+
6+ shared_libs: ["libdrm"],
7+ static_libs: ["libdrm_util"],
8+}
--- a/tests/proptest/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
1-LOCAL_PATH := $(call my-dir)
2-
3-include $(CLEAR_VARS)
4-include $(LOCAL_PATH)/Makefile.sources
5-
6-LOCAL_SRC_FILES := $(PROPTEST_FILES)
7-
8-LOCAL_MODULE := proptest
9-
10-LOCAL_SHARED_LIBRARIES := libdrm_platform
11-LOCAL_STATIC_LIBRARIES := libdrm_util
12-
13-include $(LIBDRM_COMMON_MK)
14-include $(BUILD_EXECUTABLE)
--- /dev/null
+++ b/tests/util/Android.bp
@@ -0,0 +1,35 @@
1+//
2+// Copyright © 2015 NVIDIA Corporation
3+//
4+// Permission is hereby granted, free of charge, to any person obtaining a
5+// copy of this software and associated documentation files (the "Software"),
6+// to deal in the Software without restriction, including without limitation
7+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+// and/or sell copies of the Software, and to permit persons to whom the
9+// Software is furnished to do so, subject to the following conditions:
10+//
11+// The above copyright notice and this permission notice (including the next
12+// paragraph) shall be included in all copies or substantial portions of the
13+// Software.
14+//
15+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21+// IN THE SOFTWARE.
22+//
23+
24+build = ["Android.sources.bp"]
25+
26+cc_library_static {
27+ name: "libdrm_util",
28+ defaults: [
29+ "libdrm_defaults",
30+ "libdrm_util_sources",
31+ ],
32+ shared_libs: ["libdrm"],
33+ header_libs: ["libdrm_test_headers"],
34+ export_header_lib_headers: ["libdrm_test_headers"],
35+}
--- a/tests/util/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
1-#
2-# Copyright © 2015 NVIDIA Corporation
3-#
4-# Permission is hereby granted, free of charge, to any person obtaining a
5-# copy of this software and associated documentation files (the "Software"),
6-# to deal in the Software without restriction, including without limitation
7-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-# and/or sell copies of the Software, and to permit persons to whom the
9-# Software is furnished to do so, subject to the following conditions:
10-#
11-# The above copyright notice and this permission notice (including the next
12-# paragraph) shall be included in all copies or substantial portions of the
13-# Software.
14-#
15-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21-# IN THE SOFTWARE.
22-#
23-
24-LOCAL_PATH := $(call my-dir)
25-
26-include $(CLEAR_VARS)
27-include $(LOCAL_PATH)/Makefile.sources
28-
29-LOCAL_MODULE := libdrm_util
30-
31-LOCAL_SHARED_LIBRARIES := libdrm_platform
32-
33-LOCAL_SRC_FILES := $(UTIL_FILES)
34-
35-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LIBDRM_TOP)/tests
36-
37-include $(LIBDRM_COMMON_MK)
38-include $(BUILD_STATIC_LIBRARY)
--- /dev/null
+++ b/tests/util/Android.sources.bp
@@ -0,0 +1,10 @@
1+// Autogenerated with Android.sources.bp.mk
2+
3+cc_defaults {
4+ name: "libdrm_util_sources",
5+ srcs: [
6+ "format.c",
7+ "kms.c",
8+ "pattern.c",
9+ ],
10+}
Show on old repository browser