diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-10-23 21:37:02 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-23 21:37:02 +0000 |
commit | 82d838b6dc31b7087af50c80e787cc8f726b5dde (patch) | |
tree | ddc9bf3abee1194215f500913f95229b33b928f7 | |
parent | 50873ed8ad39bdeb72e5f516ed88e9952cae529d (diff) | |
parent | fa32e29a1fe81e5472aabc65d3aa25a5af5aec55 (diff) | |
download | libdrm-o-mr1-iot-preview-6.tar.gz |
Convert to Android.bpandroid-o-mr1-iot-preview-6o-mr1-iot-preview-6
am: fa32e29a1f
Change-Id: I57a500e2567eccabaf2ad4b681985bafe7d31982
43 files changed, 489 insertions, 454 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 00000000..6a90c389 --- /dev/null +++ b/Android.bp @@ -0,0 +1,64 @@ +// +// Copyright © 2011-2012 Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice (including the next +// paragraph) shall be included in all copies or substantial portions of the +// Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// + +subdirs = ["*"] +build = ["Android.sources.bp"] + +cc_defaults { + name: "libdrm_defaults", + cflags: [ + // XXX: Consider moving these to config.h analogous to autoconf. + "-DMAJOR_IN_SYSMACROS=1", + "-DHAVE_VISIBILITY=1", + "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1", + + "-Wall", + "-Werror", + "-Wno-format", + "-Wno-gnu-variable-sized-type-not-at-end", + "-Wno-pointer-arith", + "-Wno-unused-parameter", + "-Wno-unused-variable", + "-Wno-missing-field-initializers", + ], + export_include_dirs: ["."], +} + +// Library for the device +cc_library { + name: "libdrm", + vendor_available: true, + defaults: [ + "libdrm_defaults", + "libdrm_sources", + ], + + export_include_dirs: ["include/drm"], + + cflags: [ + "-Wno-enum-conversion", + "-Wno-pointer-arith", + "-Wno-sign-compare", + "-Wno-tautological-compare", + ], +} diff --git a/Android.common.mk b/Android.common.mk deleted file mode 100644 index 1fe79035..00000000 --- a/Android.common.mk +++ /dev/null @@ -1,19 +0,0 @@ -# XXX: Consider moving these to config.h analogous to autoconf. -LOCAL_CFLAGS += \ - -DMAJOR_IN_SYSMACROS=1 \ - -DHAVE_VISIBILITY=1 \ - -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 - -LOCAL_CFLAGS += \ - -Wall \ - -Werror \ - -Wno-format \ - -Wno-gnu-variable-sized-type-not-at-end \ - -Wno-pointer-arith \ - -Wno-unused-parameter \ - -Wno-unused-variable \ - -Wno-missing-field-initializers - -# Quiet down the build system and remove any .h files from the sources -LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES)) -LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH) diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 2a980ad0..00000000 --- a/Android.mk +++ /dev/null @@ -1,133 +0,0 @@ -# -# Copyright © 2011-2012 Intel Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# - -# Two identical libs are defined here. -# libdrm: for vendors. installed to /vendor/lib. libdrm_<vendor> uses this. -# libdrm_platform: for platform modules (such as libminui). installed to /system/lib - -LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk - -LOCAL_PATH := $(call my-dir) - -# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES -include $(LOCAL_PATH)/Makefile.sources - -common_CFLAGS := \ - -Wall -Werror \ - -Wno-enum-conversion \ - -Wno-pointer-arith \ - -Wno-sign-compare \ - -Wno-tautological-compare - -# Static library for the device (recovery) -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm_platform - -LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) -LOCAL_EXPORT_C_INCLUDE_DIRS := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/include/drm - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include/drm - -LOCAL_CFLAGS := \ - $(common_CFLAGS) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) - -# Dynamic library for the device -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm_platform - -LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) -LOCAL_EXPORT_C_INCLUDE_DIRS := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/include/drm - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include/drm - -LOCAL_CFLAGS := \ - $(common_CFLAGS) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) - - -ifneq ($(TARGET_USE_PRIVATE_LIBDRM),true) - -# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES -include $(LOCAL_PATH)/Makefile.sources - -common_CFLAGS := \ - -Wno-enum-conversion \ - -Wno-pointer-arith \ - -Wno-sign-compare \ - -Wno-tautological-compare - -# Static library for the device (recovery) -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm -LOCAL_VENDOR_MODULE := true - -LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) -LOCAL_EXPORT_C_INCLUDE_DIRS := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/include/drm - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include/drm - -LOCAL_CFLAGS := \ - $(common_CFLAGS) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) - -# Dynamic library for the device -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm -LOCAL_VENDOR_MODULE := true - -LOCAL_SRC_FILES := $(filter-out %.h,$(LIBDRM_FILES)) -LOCAL_EXPORT_C_INCLUDE_DIRS := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/include/drm - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include/drm - -LOCAL_CFLAGS := \ - $(common_CFLAGS) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) -endif # if TARGET_USE_PRIVATE_LIBDRM is not true diff --git a/Android.sources.bp b/Android.sources.bp new file mode 100644 index 00000000..73356dd8 --- /dev/null +++ b/Android.sources.bp @@ -0,0 +1,12 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_sources", + srcs: [ + "xf86drm.c", + "xf86drmHash.c", + "xf86drmRandom.c", + "xf86drmSL.c", + "xf86drmMode.c", + ], +} diff --git a/Android.sources.bp.mk b/Android.sources.bp.mk new file mode 100644 index 00000000..26b61c1e --- /dev/null +++ b/Android.sources.bp.mk @@ -0,0 +1,25 @@ +# Usage: make -f path/to/Android.sources.bp.mk NAMES=<> >Android.sources.bp +# +# It will read the Makefile.sources in the current directory, and +# write <NAME>_FILES to stdout as an Android.bp cc_defaults module. + +.PHONY: all +all: + @# Do nothing + +include Makefile.sources + +empty := +indent := $(empty) $(empty) + +$(info // Autogenerated with Android.sources.bp.mk) +$(foreach NAME,$(NAMES), \ + $(eval lower_name := $(shell echo $(PREFIX)$(NAME) | tr 'A-Z' 'a-z')) \ + $(info ) \ + $(info cc_defaults {) \ + $(info $(indent)name: "$(lower_name)_sources",) \ + $(info $(indent)srcs: [) \ + $(foreach f,$(filter %.c,$($(NAME)_FILES)), \ + $(info $(indent)$(indent)"$(f)",)) \ + $(info $(indent)],) \ + $(info })) diff --git a/amdgpu/Android.bp b/amdgpu/Android.bp new file mode 100644 index 00000000..a63b6174 --- /dev/null +++ b/amdgpu/Android.bp @@ -0,0 +1,11 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_amdgpu", + defaults: [ + "libdrm_defaults", + "libdrm_amdgpu_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk deleted file mode 100644 index 1df84b3e..00000000 --- a/amdgpu/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_AMDGPU_FILES, LIBDRM_AMDGPU_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_amdgpu -LOCAL_VENDOR_MODULE := true -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/amdgpu/Android.sources.bp b/amdgpu/Android.sources.bp new file mode 100644 index 00000000..62b8f054 --- /dev/null +++ b/amdgpu/Android.sources.bp @@ -0,0 +1,14 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_amdgpu_sources", + srcs: [ + "amdgpu_bo.c", + "amdgpu_cs.c", + "amdgpu_device.c", + "amdgpu_gpu_info.c", + "amdgpu_vamgr.c", + "util_hash.c", + "util_hash_table.c", + ], +} diff --git a/etnaviv/Android.bp b/etnaviv/Android.bp new file mode 100644 index 00000000..21deda99 --- /dev/null +++ b/etnaviv/Android.bp @@ -0,0 +1,11 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_etnaviv", + defaults: [ + "libdrm_defaults", + "libdrm_etnaviv_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} diff --git a/etnaviv/Android.mk b/etnaviv/Android.mk deleted file mode 100644 index 1143eac5..00000000 --- a/etnaviv/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_ETNAVIV_FILES, LIBDRM_ETNAVIV_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_etnaviv -LOCAL_VENDOR_MODULE := true - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_ETNAVIV_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/etnaviv/Android.sources.bp b/etnaviv/Android.sources.bp new file mode 100644 index 00000000..aa828900 --- /dev/null +++ b/etnaviv/Android.sources.bp @@ -0,0 +1,13 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_etnaviv_sources", + srcs: [ + "etnaviv_device.c", + "etnaviv_gpu.c", + "etnaviv_bo.c", + "etnaviv_bo_cache.c", + "etnaviv_pipe.c", + "etnaviv_cmd_stream.c", + ], +} diff --git a/freedreno/Android.bp b/freedreno/Android.bp new file mode 100644 index 00000000..9fca9b12 --- /dev/null +++ b/freedreno/Android.bp @@ -0,0 +1,11 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_freedreno", + defaults: [ + "libdrm_defaults", + "libdrm_freedreno_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} diff --git a/freedreno/Android.mk b/freedreno/Android.mk deleted file mode 100644 index c1289145..00000000 --- a/freedreno/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_FREEDRENO_FILES, LIBDRM_FREEDRENO_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_freedreno -LOCAL_VENDOR_MODULE := true -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/freedreno/Android.sources.bp b/freedreno/Android.sources.bp new file mode 100644 index 00000000..3c1ca316 --- /dev/null +++ b/freedreno/Android.sources.bp @@ -0,0 +1,16 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_freedreno_sources", + srcs: [ + "freedreno_device.c", + "freedreno_pipe.c", + "freedreno_ringbuffer.c", + "freedreno_bo.c", + "freedreno_bo_cache.c", + "msm/msm_bo.c", + "msm/msm_device.c", + "msm/msm_pipe.c", + "msm/msm_ringbuffer.c", + ], +} diff --git a/intel/Android.bp b/intel/Android.bp new file mode 100644 index 00000000..22713acc --- /dev/null +++ b/intel/Android.bp @@ -0,0 +1,36 @@ +// +// Copyright © 2011 Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice (including the next +// paragraph) shall be included in all copies or substantial portions of the +// Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// + +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_intel", + defaults: [ + "libdrm_defaults", + "libdrm_intel_sources", + ], + vendor: true, + + // Removed dependency to libpciaccess: not used on Android + shared_libs: ["libdrm"], +} diff --git a/intel/Android.mk b/intel/Android.mk deleted file mode 100644 index f8b27dd5..00000000 --- a/intel/Android.mk +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright © 2011 Intel Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_INTEL_FILES, LIBDRM_INTEL_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_intel -LOCAL_VENDOR_MODULE := true - -# Removed dependency to libpciaccess: not used on Android -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/intel/Android.sources.bp b/intel/Android.sources.bp new file mode 100644 index 00000000..459c070f --- /dev/null +++ b/intel/Android.sources.bp @@ -0,0 +1,12 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_intel_sources", + srcs: [ + "intel_bufmgr.c", + "intel_bufmgr_fake.c", + "intel_bufmgr_gem.c", + "intel_decode.c", + "mm.c", + ], +} 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 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libkms", + defaults: [ + "libdrm_defaults", + "libkms_sources", + "libkms_vmwgfx_sources", + "libkms_intel_sources", + "libkms_nouveau_sources", + "libkms_radeon_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} 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 @@ -DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS))) - -intel_drivers := i915 i965 i915g ilo -radeon_drivers := r300g r600g radeonsi -rockchip_drivers := rockchip -nouveau_drivers := nouveau -virgl_drivers := virgl -vmwgfx_drivers := vmwgfx -tegra_drivers := tegra - -valid_drivers := \ - $(intel_drivers) \ - $(radeon_drivers) \ - $(rockchip_drivers) \ - $(nouveau_drivers) \ - $(virgl_drivers) \ - $(vmwgfx_drivers) \ - $(tegra_drivers) - -# warn about invalid drivers -invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS)) -ifneq ($(invalid_drivers),) -$(warning invalid GPU drivers: $(invalid_drivers)) -# tidy up -DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS)) -endif - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_SRC_FILES := $(LIBKMS_FILES) - -ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),) -LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES) -endif - -ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),) -LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES) -endif - -ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),) -LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES) -endif - -ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),) -LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES) -endif - -LOCAL_MODULE := libkms -LOCAL_VENDOR_MODULE := true -LOCAL_SHARED_LIBRARIES := libdrm - -include $(LIBDRM_COMMON_MK) -include $(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 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libkms_sources", + srcs: [ + "linux.c", + "dumb.c", + "api.c", + ], +} + +cc_defaults { + name: "libkms_vmwgfx_sources", + srcs: [ + "vmwgfx.c", + ], +} + +cc_defaults { + name: "libkms_intel_sources", + srcs: [ + "intel.c", + ], +} + +cc_defaults { + name: "libkms_nouveau_sources", + srcs: [ + "nouveau.c", + ], +} + +cc_defaults { + name: "libkms_radeon_sources", + srcs: [ + "radeon.c", + ], +} diff --git a/nouveau/Android.bp b/nouveau/Android.bp new file mode 100644 index 00000000..12c37e3d --- /dev/null +++ b/nouveau/Android.bp @@ -0,0 +1,11 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_nouveau", + defaults: [ + "libdrm_defaults", + "libdrm_nouveau_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} diff --git a/nouveau/Android.mk b/nouveau/Android.mk deleted file mode 100644 index 27433d87..00000000 --- a/nouveau/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_NOUVEAU_FILES, LIBDRM_NOUVEAU_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_nouveau -LOCAL_VENDOR_MODULE := true - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/nouveau/Android.sources.bp b/nouveau/Android.sources.bp new file mode 100644 index 00000000..5ecdb53c --- /dev/null +++ b/nouveau/Android.sources.bp @@ -0,0 +1,11 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_nouveau_sources", + srcs: [ + "nouveau.c", + "pushbuf.c", + "bufctx.c", + "abi16.c", + ], +} diff --git a/radeon/Android.bp b/radeon/Android.bp new file mode 100644 index 00000000..9d0a09ec --- /dev/null +++ b/radeon/Android.bp @@ -0,0 +1,11 @@ +build = ["Android.sources.bp"] + +cc_library_shared { + name: "libdrm_radeon", + defaults: [ + "libdrm_defaults", + "libdrm_radeon_sources", + ], + vendor: true, + shared_libs: ["libdrm"], +} diff --git a/radeon/Android.mk b/radeon/Android.mk deleted file mode 100644 index 7bc9cee9..00000000 --- a/radeon/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_RADEON_FILES, LIBDRM_RADEON_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_radeon -LOCAL_VENDOR_MODULE := true - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/radeon/Android.sources.bp b/radeon/Android.sources.bp new file mode 100644 index 00000000..820ac4d6 --- /dev/null +++ b/radeon/Android.sources.bp @@ -0,0 +1,13 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_radeon_sources", + srcs: [ + "radeon_bo_gem.c", + "radeon_cs_gem.c", + "radeon_cs_space.c", + "radeon_bo.c", + "radeon_cs.c", + "radeon_surface.c", + ], +} diff --git a/rockchip/Android.bp b/rockchip/Android.bp new file mode 100644 index 00000000..daceacca --- /dev/null +++ b/rockchip/Android.bp @@ -0,0 +1,13 @@ +cc_library_shared { + name: "libdrm_rockchip", + vendor: true, + shared_libs: ["libdrm"], + + srcs: ["rockchip_drm.c"], + + cflags: [ + "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1", + "-Wall", + "-Werror", + ], +} diff --git a/rockchip/Android.mk b/rockchip/Android.mk deleted file mode 100644 index 8f561cd9..00000000 --- a/rockchip/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm_rockchip - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := rockchip_drm.c - -LOCAL_CFLAGS := \ - -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 \ - -Wall -Werror - -LOCAL_SHARED_LIBRARIES := \ - libdrm - -LOCAL_VENDOR_MODULE := true - -include $(BUILD_SHARED_LIBRARY) diff --git a/tegra/Android.bp b/tegra/Android.bp new file mode 100644 index 00000000..33eaf6c5 --- /dev/null +++ b/tegra/Android.bp @@ -0,0 +1,14 @@ +cc_library_shared { + name: "libdrm_tegra", + vendor: true, + shared_libs: ["libdrm"], + + srcs: ["tegra.c"], + + cflags: [ + "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1", + "-Wall", + "-Werror", + "-Wno-unused-variable", + ], +} diff --git a/tegra/Android.mk b/tegra/Android.mk deleted file mode 100644 index cae4ff68..00000000 --- a/tegra/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm_tegra - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := tegra.c - -LOCAL_CFLAGS := \ - -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 \ - -Wall -Werror -Wno-unused-variable - -LOCAL_SHARED_LIBRARIES := \ - libdrm - -LOCAL_VENDOR_MODULE := true - -include $(BUILD_SHARED_LIBRARY) diff --git a/tests/Android.bp b/tests/Android.bp new file mode 100644 index 00000000..cdc6c2cf --- /dev/null +++ b/tests/Android.bp @@ -0,0 +1,6 @@ +subdirs = ["*"] + +cc_library_headers { + name: "libdrm_test_headers", + export_include_dirs: ["."], +} diff --git a/tests/Android.mk b/tests/Android.mk deleted file mode 100644 index 5053e7d6..00000000 --- a/tests/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(call all-subdir-makefiles) diff --git a/tests/modetest/Android.bp b/tests/modetest/Android.bp new file mode 100644 index 00000000..ca811fee --- /dev/null +++ b/tests/modetest/Android.bp @@ -0,0 +1,12 @@ +build = ["Android.sources.bp"] + +cc_test { + name: "modetest", + defaults: [ + "libdrm_defaults", + "modetest_sources", + ], + + shared_libs: ["libdrm"], + static_libs: ["libdrm_util"], +} diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk deleted file mode 100644 index 4f9b02d3..00000000 --- a/tests/modetest/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_SRC_FILES := $(filter-out %.h,$(MODETEST_FILES)) - -LOCAL_MODULE := modetest - -LOCAL_SHARED_LIBRARIES := libdrm_platform -LOCAL_STATIC_LIBRARIES := libdrm_util - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. - -include $(LIBDRM_COMMON_MK) -include $(BUILD_EXECUTABLE) diff --git a/tests/modetest/Android.sources.bp b/tests/modetest/Android.sources.bp new file mode 100644 index 00000000..c6aca2ef --- /dev/null +++ b/tests/modetest/Android.sources.bp @@ -0,0 +1,10 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "modetest_sources", + srcs: [ + "buffers.c", + "cursor.c", + "modetest.c", + ], +} diff --git a/tests/planetest/Android.bp b/tests/planetest/Android.bp new file mode 100644 index 00000000..16dfc5b7 --- /dev/null +++ b/tests/planetest/Android.bp @@ -0,0 +1,33 @@ +build = ["Android.sources.bp"] + +cc_test { + name: "planetest", + defaults: [ + "planetest_common_sources", + "planetest_sources", + ], + shared_libs: ["libdrm"], + + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-parameter", + "-Wno-pointer-arith", + ], +} + +cc_test { + name: "atomictest", + defaults: [ + "planetest_common_sources", + "atomictest_sources", + ], + shared_libs: ["libdrm"], + + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-parameter", + "-Wno-pointer-arith", + ], +} diff --git a/tests/planetest/Android.mk b/tests/planetest/Android.mk deleted file mode 100644 index 0c30968a..00000000 --- a/tests/planetest/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter -Wno-pointer-arith - -LOCAL_SRC_FILES := $(filter-out %.h,$(PLANETEST_COMMON_FILES) $(PLANETEST_FILES)) - -LOCAL_MODULE := planetest - -LOCAL_SHARED_LIBRARIES := libdrm_platform - -include $(BUILD_EXECUTABLE) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter -Wno-pointer-arith - -LOCAL_SRC_FILES := $(filter-out %.h,$(PLANETEST_COMMON_FILES) $(ATOMICTEST_FILES)) - -LOCAL_MODULE := atomictest - -LOCAL_SHARED_LIBRARIES := libdrm_platform - -include $(BUILD_EXECUTABLE) diff --git a/tests/planetest/Android.sources.bp b/tests/planetest/Android.sources.bp new file mode 100644 index 00000000..4a35bb51 --- /dev/null +++ b/tests/planetest/Android.sources.bp @@ -0,0 +1,24 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "planetest_common_sources", + srcs: [ + "bo.c", + "dev.c", + "modeset.c", + ], +} + +cc_defaults { + name: "planetest_sources", + srcs: [ + "planetest.c", + ], +} + +cc_defaults { + name: "atomictest_sources", + srcs: [ + "atomictest.c", + ], +} diff --git a/tests/proptest/Android.bp b/tests/proptest/Android.bp new file mode 100644 index 00000000..28c87e91 --- /dev/null +++ b/tests/proptest/Android.bp @@ -0,0 +1,8 @@ +cc_test { + name: "proptest", + defaults: ["libdrm_defaults"], + srcs: ["proptest.c"], + + shared_libs: ["libdrm"], + static_libs: ["libdrm_util"], +} diff --git a/tests/proptest/Android.mk b/tests/proptest/Android.mk deleted file mode 100644 index eaada3b1..00000000 --- a/tests/proptest/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_SRC_FILES := $(PROPTEST_FILES) - -LOCAL_MODULE := proptest - -LOCAL_SHARED_LIBRARIES := libdrm_platform -LOCAL_STATIC_LIBRARIES := libdrm_util - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. - -include $(LIBDRM_COMMON_MK) -include $(BUILD_EXECUTABLE) diff --git a/tests/util/Android.bp b/tests/util/Android.bp new file mode 100644 index 00000000..36d18206 --- /dev/null +++ b/tests/util/Android.bp @@ -0,0 +1,35 @@ +// +// Copyright © 2015 NVIDIA Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice (including the next +// paragraph) shall be included in all copies or substantial portions of the +// Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// + +build = ["Android.sources.bp"] + +cc_library_static { + name: "libdrm_util", + defaults: [ + "libdrm_defaults", + "libdrm_util_sources", + ], + shared_libs: ["libdrm"], + header_libs: ["libdrm_test_headers"], + export_header_lib_headers: ["libdrm_test_headers"], +} diff --git a/tests/util/Android.mk b/tests/util/Android.mk deleted file mode 100644 index 44c524d2..00000000 --- a/tests/util/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright © 2015 NVIDIA Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_util - -LOCAL_SHARED_LIBRARIES := libdrm_platform - -LOCAL_SRC_FILES := $(UTIL_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) diff --git a/tests/util/Android.sources.bp b/tests/util/Android.sources.bp new file mode 100644 index 00000000..529e1124 --- /dev/null +++ b/tests/util/Android.sources.bp @@ -0,0 +1,10 @@ +// Autogenerated with Android.sources.bp.mk + +cc_defaults { + name: "libdrm_util_sources", + srcs: [ + "format.c", + "kms.c", + "pattern.c", + ], +} |