blob: 026e8ad042272e4de1e065cd137a13e20df18bf8 [file] [log] [blame]
Ethan Yonkerc798c9c2015-10-09 11:15:26 -05001LOCAL_PATH:= system/core/libpixelflinger
2include $(CLEAR_VARS)
3
4#
5# C/C++ and ARMv5 objects
6#
7
8include $(CLEAR_VARS)
9
10ifneq ($(wildcard system/core/libpixelflinger/codeflinger/x86/X86Assembler.cpp),)
11 ifeq ($(TARGET_ARCH),x86)
12 TW_HAVE_X86_ACCELERATED_PIXELFLINGER := true
13 endif
14endif
15
16PIXELFLINGER_SRC_FILES += \
17 codeflinger/CodeCache.cpp \
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050018 format.cpp \
19 clear.cpp \
20 raster.cpp \
21 buffer.cpp
22
Ethan Yonker2c80efa2015-11-07 07:57:36 -060023ifneq ($(wildcard system/core/libpixelflinger/codeflinger/tinyutils/VectorImpl.cpp),)
24 PIXELFLINGER_SRC_FILES += \
25 codeflinger/tinyutils/SharedBuffer.cpp \
26 codeflinger/tinyutils/VectorImpl.cpp
27endif
28
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050029ifneq ($(TW_HAVE_X86_ACCELERATED_PIXELFLINGER),true)
30PIXELFLINGER_SRC_FILES += \
31 codeflinger/ARMAssemblerInterface.cpp \
32 codeflinger/ARMAssemblerProxy.cpp \
33 codeflinger/GGLAssembler.cpp \
34 codeflinger/load_store.cpp \
35 codeflinger/blending.cpp \
36 codeflinger/texturing.cpp \
37 fixed.cpp.arm \
38 picker.cpp.arm \
39 pixelflinger.cpp.arm \
40 trap.cpp.arm \
41 scanline.cpp.arm
42else
43PIXELFLINGER_SRC_FILES_x86 := \
44 codeflinger/x86/X86Assembler.cpp \
45 codeflinger/x86/GGLX86Assembler.cpp \
46 codeflinger/x86/load_store.cpp \
47 codeflinger/x86/blending.cpp \
48 codeflinger/x86/texturing.cpp \
49 fixed.cpp \
50 picker.cpp \
51 pixelflinger.cpp \
52 trap.cpp \
53 scanline.cpp
54
55PIXELFLINGER_C_INCLUDES_x86 := \
56 external/libenc
57
58endif
59
60PIXELFLINGER_CFLAGS := -fstrict-aliasing -fomit-frame-pointer
61
62PIXELFLINGER_SRC_FILES_arm := \
63 codeflinger/ARMAssembler.cpp \
64 codeflinger/disassem.c \
65 col32cb16blend.S \
66 t32cb16blend.S \
67
68ifeq ($(ARCH_ARM_HAVE_NEON),true)
69PIXELFLINGER_SRC_FILES_arm += col32cb16blend_neon.S
70PIXELFLINGER_CFLAGS_arm += -D__ARM_HAVE_NEON
71endif
72
73PIXELFLINGER_SRC_FILES_arm64 := \
74 codeflinger/Arm64Assembler.cpp \
75 codeflinger/Arm64Disassembler.cpp \
76 arch-arm64/col32cb16blend.S \
77 arch-arm64/t32cb16blend.S \
78
79ifndef ARCH_MIPS_REV6
80PIXELFLINGER_SRC_FILES_mips := \
81 codeflinger/MIPSAssembler.cpp \
82 codeflinger/mips_disassem.c \
83 arch-mips/t32cb16blend.S \
84
85endif
86
87#
88# Static library version
89#
90
91include $(CLEAR_VARS)
Ethan Yonker95e80072017-08-24 21:45:50 -050092ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
Dan Pasaneneb028c12015-11-11 11:08:33 -060093LOCAL_CLANG := false
Ethan Yonker95e80072017-08-24 21:45:50 -050094endif
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050095LOCAL_MODULE:= libpixelflinger_twrp
96LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES)
97LOCAL_SRC_FILES_arm := $(PIXELFLINGER_SRC_FILES_arm)
98LOCAL_SRC_FILES_arm64 := $(PIXELFLINGER_SRC_FILES_arm64)
99LOCAL_SRC_FILES_x86 := $(PIXELFLINGER_SRC_FILES_x86)
100LOCAL_SRC_FILES_mips := $(PIXELFLINGER_SRC_FILES_mips)
Matt Mower9a5b8b72015-12-10 00:27:49 -0600101ifneq ($(shell test $(PLATFORM_SDK_VERSION) -gt 20; echo $$?),0)
that05791142015-10-10 15:59:22 +0200102 LOCAL_SRC_FILES += $(LOCAL_SRC_FILES_$(TARGET_ARCH))
103endif
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500104LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
105LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
106LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
Ethan Yonker58f21322018-08-24 11:17:36 -0500107LOCAL_CPPFLAGS := -Wno-unused-function
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500108LOCAL_C_INCLUDES_x86 := $(PIXELFLINGER_C_INCLUDES_x86)
109ifeq ($(TW_HAVE_X86_ACCELERATED_PIXELFLINGER),true)
110LOCAL_WHOLE_STATIC_LIBRARIES += libenc
111LOCAL_C_INCLUDES += external/libenc
112endif
113include $(BUILD_STATIC_LIBRARY)