Convert libpixelflinger to Android.bp

See build/soong/README.md for more information.

Test: cd system/core/libpixelflinger; mma
Change-Id: I2354e5bc6b0b8a10d598e3677bc63962f70bf7bc
This commit is contained in:
Dan Willemsen 2018-11-16 17:36:26 -08:00
parent 3a2bd498f8
commit 596e2217e2
32 changed files with 248 additions and 304 deletions

115
libpixelflinger/Android.bp Normal file
View file

@ -0,0 +1,115 @@
cc_defaults {
name: "pixelflinger_defaults",
cflags: [
"-fstrict-aliasing",
"-fomit-frame-pointer",
"-Wall",
"-Werror",
"-Wno-unused-function",
],
export_include_dirs: ["include"],
header_libs: ["libbase_headers"],
shared_libs: [
"libcutils",
"liblog",
"libutils",
],
arch: {
arm: {
neon: {
cflags: ["-D__ARM_HAVE_NEON"],
},
},
},
}
cc_library_static {
name: "libpixelflinger-arm",
defaults: ["pixelflinger_defaults"],
srcs: [
"fixed.cpp",
"picker.cpp",
"pixelflinger.cpp",
"trap.cpp",
"scanline.cpp",
],
arch: {
arm: {
instruction_set: "arm",
},
},
}
// For the tests to use
cc_library_headers {
name: "libpixelflinger_internal",
export_include_dirs: [
"include",
".",
],
}
cc_library {
name: "libpixelflinger",
defaults: ["pixelflinger_defaults"],
srcs: [
"codeflinger/ARMAssemblerInterface.cpp",
"codeflinger/ARMAssemblerProxy.cpp",
"codeflinger/CodeCache.cpp",
"codeflinger/GGLAssembler.cpp",
"codeflinger/load_store.cpp",
"codeflinger/blending.cpp",
"codeflinger/texturing.cpp",
"format.cpp",
"clear.cpp",
"raster.cpp",
"buffer.cpp",
],
whole_static_libs: ["libpixelflinger-arm"],
arch: {
arm: {
srcs: [
"codeflinger/ARMAssembler.cpp",
"codeflinger/disassem.c",
"col32cb16blend.S",
"t32cb16blend.S",
],
neon: {
srcs: ["col32cb16blend_neon.S"],
},
},
arm64: {
srcs: [
"codeflinger/Arm64Assembler.cpp",
"codeflinger/Arm64Disassembler.cpp",
"arch-arm64/col32cb16blend.S",
"arch-arm64/t32cb16blend.S",
],
},
mips: {
mips32r6: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/mips_disassem.c",
"arch-mips/t32cb16blend.S",
],
},
},
mips64: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/MIPS64Assembler.cpp",
"codeflinger/mips64_disassem.c",
"arch-mips64/col32cb16blend.S",
"arch-mips64/t32cb16blend.S",
],
},
},
}

View file

@ -1,81 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
#
# C/C++ and ARMv5 objects
#
include $(CLEAR_VARS)
PIXELFLINGER_SRC_FILES:= \
codeflinger/ARMAssemblerInterface.cpp \
codeflinger/ARMAssemblerProxy.cpp \
codeflinger/CodeCache.cpp \
codeflinger/GGLAssembler.cpp \
codeflinger/load_store.cpp \
codeflinger/blending.cpp \
codeflinger/texturing.cpp \
fixed.cpp.arm \
picker.cpp.arm \
pixelflinger.cpp.arm \
trap.cpp.arm \
scanline.cpp.arm \
format.cpp \
clear.cpp \
raster.cpp \
buffer.cpp
PIXELFLINGER_CFLAGS := -fstrict-aliasing -fomit-frame-pointer
PIXELFLINGER_CFLAGS += -Wall -Werror
PIXELFLINGER_CFLAGS += -Wno-unused-function
PIXELFLINGER_SRC_FILES_arm := \
codeflinger/ARMAssembler.cpp \
codeflinger/disassem.c \
col32cb16blend.S \
t32cb16blend.S \
ifeq ($(ARCH_ARM_HAVE_NEON),true)
PIXELFLINGER_SRC_FILES_arm += col32cb16blend_neon.S
PIXELFLINGER_CFLAGS_arm += -D__ARM_HAVE_NEON
endif
PIXELFLINGER_SRC_FILES_arm64 := \
codeflinger/Arm64Assembler.cpp \
codeflinger/Arm64Disassembler.cpp \
arch-arm64/col32cb16blend.S \
arch-arm64/t32cb16blend.S \
ifndef ARCH_MIPS_REV6
PIXELFLINGER_SRC_FILES_mips := \
codeflinger/MIPSAssembler.cpp \
codeflinger/mips_disassem.c \
arch-mips/t32cb16blend.S \
endif
PIXELFLINGER_SRC_FILES_mips64 := \
codeflinger/MIPSAssembler.cpp \
codeflinger/MIPS64Assembler.cpp \
codeflinger/mips64_disassem.c \
arch-mips64/col32cb16blend.S \
arch-mips64/t32cb16blend.S \
#
# Shared library
#
LOCAL_MODULE:= libpixelflinger
LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES)
LOCAL_SRC_FILES_arm := $(PIXELFLINGER_SRC_FILES_arm)
LOCAL_SRC_FILES_arm64 := $(PIXELFLINGER_SRC_FILES_arm64)
LOCAL_SRC_FILES_mips := $(PIXELFLINGER_SRC_FILES_mips)
LOCAL_SRC_FILES_mips64 := $(PIXELFLINGER_SRC_FILES_mips64)
LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
LOCAL_HEADER_LIBRARIES := libbase_headers
LOCAL_SHARED_LIBRARIES := libcutils liblog libutils
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))

View file

@ -0,0 +1,16 @@
cc_defaults {
name: "pixelflinger-tests",
cflags: [
"-Wall",
"-Werror",
],
header_libs: ["libpixelflinger_internal"],
static_libs: [
"libcutils",
"liblog",
"libpixelflinger",
"libutils",
],
}

View file

@ -1 +0,0 @@
include $(all-subdir-makefiles)

View file

@ -0,0 +1,11 @@
cc_defaults {
name: "pixelflinger-tests-arm64",
defaults: ["pixelflinger-tests"],
enabled: false,
arch: {
arm64: {
enabled: true,
},
},
}

View file

@ -1,3 +0,0 @@
ifeq ($(TARGET_ARCH),arm64)
include $(all-subdir-makefiles)
endif

View file

@ -0,0 +1,9 @@
cc_test {
name: "test-pixelflinger-arm64-assembler-test",
defaults: ["pixelflinger-tests-arm64"],
srcs: [
"arm64_assembler_test.cpp",
"asm_test_jacket.S",
],
}

View file

@ -1,23 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
arm64_assembler_test.cpp\
asm_test_jacket.S
LOCAL_SHARED_LIBRARIES := \
libcutils \
libpixelflinger
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../..
LOCAL_MODULE:= test-pixelflinger-arm64-assembler-test
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-arm64-col32cb16blend",
defaults: ["pixelflinger-tests-arm64"],
srcs: ["col32cb16blend_test.c"],
}

View file

@ -1,20 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
col32cb16blend_test.c \
../../../arch-arm64/col32cb16blend.S
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_MODULE:= test-pixelflinger-arm64-col32cb16blend
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-arm64-disassembler-test",
defaults: ["pixelflinger-tests-arm64"],
srcs: ["arm64_diassembler_test.cpp"],
}

View file

@ -1,18 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
arm64_diassembler_test.cpp \
../../../codeflinger/Arm64Disassembler.cpp
LOCAL_SHARED_LIBRARIES :=
LOCAL_MODULE:= test-pixelflinger-arm64-disassembler-test
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-arm64-t32cb16blend",
defaults: ["pixelflinger-tests-arm64"],
srcs: ["t32cb16blend_test.c"],
}

View file

@ -1,20 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
t32cb16blend_test.c \
../../../arch-arm64/t32cb16blend.S
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_MODULE:= test-pixelflinger-arm64-t32cb16blend
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,11 @@
cc_defaults {
name: "pixelflinger-tests-mips",
defaults: ["pixelflinger-tests"],
enabled: false,
arch: {
mips: {
enabled: true,
},
},
}

View file

@ -1,6 +0,0 @@
ifeq ($(TARGET_ARCH),mips)
include $(all-subdir-makefiles)
endif
ifeq ($(TARGET_ARCH),mipsel)
include $(all-subdir-makefiles)
endif

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-mips-col32cb16blend",
defaults: ["pixelflinger-tests-mips"],
srcs: ["col32cb16blend_test.c"],
}

View file

@ -1,18 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
col32cb16blend_test.c \
../../../arch-mips/col32cb16blend.S
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_MODULE:= test-pixelflinger-mips-col32cb16blend
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 32
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-mips-t32cb16blend",
defaults: ["pixelflinger-tests-mips"],
srcs: ["t32cb16blend_test.c"],
}

View file

@ -1,18 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
t32cb16blend_test.c \
../../../arch-mips/t32cb16blend.S
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_MODULE:= test-pixelflinger-mips-t32cb16blend
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 32
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,11 @@
cc_defaults {
name: "pixelflinger-tests-mips64",
defaults: ["pixelflinger-tests"],
enabled: false,
arch: {
mips64: {
enabled: true,
},
},
}

View file

@ -1,3 +0,0 @@
ifeq ($(TARGET_ARCH),mips64)
include $(all-subdir-makefiles)
endif

View file

@ -0,0 +1,9 @@
cc_test {
name: "test-pixelflinger-mips64-assembler-test",
defaults: ["pixelflinger-tests-mips64"],
srcs: [
"mips64_assembler_test.cpp",
"asm_mips_test_jacket.S",
],
}

View file

@ -1,21 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
mips64_assembler_test.cpp\
asm_mips_test_jacket.S
LOCAL_SHARED_LIBRARIES := \
libcutils \
libpixelflinger
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../..
LOCAL_MODULE:= test-pixelflinger-mips64-assembler-test
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-mips64-col32cb16blend",
defaults: ["pixelflinger-tests-mips64"],
srcs: ["col32cb16blend_test.c"],
}

View file

@ -1,18 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
col32cb16blend_test.c \
../../../arch-mips64/col32cb16blend.S
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_MODULE:= test-pixelflinger-mips64-col32cb16blend
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,6 @@
cc_test {
name: "test-pixelflinger-mips64-disassembler-test",
defaults: ["pixelflinger-tests-mips64"],
srcs: ["mips64_disassembler_test.cpp"],
}

View file

@ -1,16 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
mips64_disassembler_test.cpp \
../../../codeflinger/mips64_disassem.c
LOCAL_SHARED_LIBRARIES :=
LOCAL_MODULE:= test-pixelflinger-mips64-disassembler-test
LOCAL_MODULE_TAGS := tests
LOCAL_MULTILIB := 64
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,12 @@
cc_test {
name: "test-opengl-codegen",
defaults: ["pixelflinger-tests"],
srcs: ["codegen.cpp"],
arch: {
arm: {
instruction_set: "arm",
},
},
}

View file

@ -1,20 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
codegen.cpp.arm
LOCAL_SHARED_LIBRARIES := \
libcutils \
libpixelflinger
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../..
LOCAL_MODULE:= test-opengl-codegen
LOCAL_CFLAGS:= -Wall -Werror
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,12 @@
cc_test {
name: "test-pixelflinger-gglmul",
srcs: ["gglmul_test.cpp"],
header_libs: ["libpixelflinger_internal"],
cflags: [
"-Wall",
"-Werror",
],
}

View file

@ -1,18 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
gglmul_test.cpp
LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../include
LOCAL_MODULE:= test-pixelflinger-gglmul
LOCAL_CFLAGS:= -Wall -Werror
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)