-
Notifications
You must be signed in to change notification settings - Fork 4
/
Android.mk
executable file
·206 lines (173 loc) · 4.95 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#
# rockchip hwcomposer( 2D graphic acceleration unit) .
#
#Copyright (C) 2015 Rockchip Electronics Co., Ltd.
#
LOCAL_PATH := $(call my-dir)
#include $(LOCAL_PATH)/../../Android.mk.def
BUILD_SECVM_LIB := false
ifeq ($(BUILD_SECVM_LIB),true)
include $(CLEAR_VARS)
LOCAL_PREBUILT_LIBS := libcodec_intel_sec.so
LOCAL_MODULE_TAGS := optional
include $(BUILD_MULTI_PREBUILT)
endif
#
# hwcomposer.default.so
#
include $(CLEAR_VARS)
$(info $(shell $(LOCAL_PATH)/version.sh))
LOCAL_SRC_FILES := \
rk_hwcomposer.cpp \
rk_hwcomposer_blit.cpp \
rk_hwc_com.cpp \
rga_api.cpp \
rk_hwcomposer_htg.cpp \
hwc_ipp.cpp \
hwc_rga.cpp \
TVInfo.cpp
LOCAL_CFLAGS := \
$(CFLAGS) \
-Wall \
-Wextra \
-DLOG_TAG=\"hwcomposer\"
ifeq ($(BUILD_SECVM_LIB),true)
LOCAL_CFLAGS += -DTARGET_SECVM
endif
LOCAL_C_INCLUDES := \
$(AQROOT)/sdk/inc \
$(AQROOT)/hal/inc
LOCAL_C_INCLUDES += hardware/rockchip/libgralloc_ump
LOCAL_C_INCLUDES += hardware/rockchip/libgralloc
LOCAL_C_INCLUDES += hardware/intel/libgralloc
LOCAL_C_INCLUDES += hardware/rockchip/librkvpu
LOCAL_C_INCLUDES += system/core/include/system
LOCAL_LDFLAGS := \
-Wl,-z,defs
LOCAL_SHARED_LIBRARIES := \
libhardware \
liblog \
libui \
libEGL \
libcutils \
libion \
libhardware_legacy \
libsync
#LOCAL_SHARED_LIBRARIES += \
libvpu
ifeq ($(BUILD_SECVM_LIB),true)
LOCAL_SHARED_LIBRARIES += libcodec_intel_sec
endif
#LOCAL_C_INCLUDES := \
# $(LOCAL_PATH)/inc
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk30xxb)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK30XXB
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk2928)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK29XX
endif
#LOCAL_CFLAGS += -DUSE_LCDC_COMPOSER
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk312x)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK312X
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK312X_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK312X_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK312X_PHONE
endif
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk322x)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK322X
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK322X_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK322X_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK322X_PHONE
endif
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk3188)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK3188
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK3188_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK3188_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK3188_PHONE
endif
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk3036)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK3036
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK3036_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK3036_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK3036_PHONE
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),dongle)
LOCAL_CFLAGS += -DRK3036_DONGLE
endif
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk3328)
LOCAL_CFLAGS += -DTARGET_BOARD_PLATFORM_RK3328
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK3328_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK3328_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK3328_PHONE
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),dongle)
LOCAL_CFLAGS += -DRK3328_DONGLE
endif
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),tablet)
LOCAL_CFLAGS += -DRK_MID
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),box)
LOCAL_CFLAGS += -DRK_BOX
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),phone)
LOCAL_CFLAGS += -DRK_PHONE
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)),dongle)
LOCAL_CFLAGS += -DRK_DONGLE
endif
ifeq ($(strip $(BOARD_USE_LCDC_COMPOSER)),true)
LOCAL_CFLAGS += -DUSE_LCDC_COMPOSER
ifeq ($(strip $(BOARD_LCDC_COMPOSER_LANDSCAPE_ONLY)),false)
LOCAL_CFLAGS += -DLCDC_COMPOSER_FULL_ANGLE
endif
endif
#ifeq ($(strip $(GRAPHIC_MEMORY_PROVIDER)),dma_buf)
LOCAL_CFLAGS += -DUSE_DMA_BUF
#endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),sofia3gr)
LOCAL_CFLAGS += -DUSE_X86
LOCAL_CFLAGS += -DROCKCHIP_GPU_LIB_ENABLE
endif
ifeq ($(strip $(BOARD_USE_LAUNCHER2)),true)
LOCAL_CFLAGS += -DUSE_LAUNCHER2
endif
LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_HARDWARE)
LOCAL_MODULE_TAGS := optional
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 21 && echo OK),OK)
LOCAL_MODULE_RELATIVE_PATH := hw
else
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
endif
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)