-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAndroid.mk
107 lines (89 loc) · 3.12 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
ifeq ($(PREBUILT_FSL_IMX_OMX),true)
HAVE_FSL_IMX_CODEC := false
else
HAVE_FSL_IMX_CODEC := true
endif
ifeq ($(HAVE_FSL_IMX_CODEC),true)
LOCAL_PATH := $(call my-dir)
# LOCAL_PATH will be changed by each Android.mk under this. So save it firstly
FSL_OMX_PATH := $(LOCAL_PATH)
include $(CLEAR_VARS)
ANDROID_VERSION_LIST = -DFROYO=220 -DGINGER_BREAD=230 -DHONEY_COMB=300 \
-DICS=400 -DJELLY_BEAN_42=420 -DJELLY_BEAN_43=430 -DKITKAT_44=440 -DLOLLIPOP_50=500 \
-DMARSH_MALLOW_600=600 -DNOUGAT=700 -DANDROID_O=800
ANDROID_VERSION_MACRO := 800
ifeq ($(findstring x2.2,x$(PLATFORM_VERSION)), x2.2)
ANDROID_VERSION_MACRO := 220
endif
ifeq ($(findstring x2.3,x$(PLATFORM_VERSION)), x2.3)
ANDROID_VERSION_MACRO := 230
endif
ifeq ($(findstring x3.,x$(PLATFORM_VERSION)), x3.)
ANDROID_VERSION_MACRO := 300
endif
ifeq ($(findstring x4.0,x$(PLATFORM_VERSION)), x4.0)
ANDROID_VERSION_MACRO := 400
endif
ifeq ($(findstring x4.2,x$(PLATFORM_VERSION)), x4.2)
ANDROID_VERSION_MACRO := 420
endif
ifeq ($(findstring x4.3,x$(PLATFORM_VERSION)), x4.3)
ANDROID_VERSION_MACRO := 430
endif
ifeq ($(findstring x4.4,x$(PLATFORM_VERSION)), x4.4)
ANDROID_VERSION_MACRO := 440
endif
ifeq ($(findstring x5.0,x$(PLATFORM_VERSION)), x5.0)
ANDROID_VERSION_MACRO := 500
endif
ifeq ($(findstring x5.1,x$(PLATFORM_VERSION)), x5.1)
ANDROID_VERSION_MACRO := 510
endif
ifeq ($(findstring x6.0.0,x$(PLATFORM_VERSION)), x6.0.0)
ANDROID_VERSION_MACRO := 600
endif
ifeq ($(findstring x6.0.1,x$(PLATFORM_VERSION)), x6.0.1)
ANDROID_VERSION_MACRO := 601
endif
ifeq ($(findstring x7.0,x$(PLATFORM_VERSION)), x7.0)
ANDROID_VERSION_MACRO := 700
endif
ifeq ($(findstring x7.1,x$(PLATFORM_VERSION)), x7.1)
ANDROID_VERSION_MACRO := 710
endif
ifeq ($(findstring x8.0,x$(PLATFORM_VERSION)), x8.0)
ANDROID_VERSION_MACRO := 800
endif
FSL_OMX_CFLAGS += $(ANDROID_VERSION_LIST) -DANDROID_VERSION=$(ANDROID_VERSION_MACRO)
FSL_OMX_TARGET_OUT_VENDOR := $(shell if [ $(ANDROID_VERSION_MACRO) -ge 800 ];then echo "true";fi)
FSL_BUILD_OMX_PLAYER := $(shell if [ $(ANDROID_VERSION_MACRO) -lt 800 ];then echo "true";fi)
# special case for pico, it's android 7.0 but has feature of android 800
ifneq ($(PREBUILT_FSL_IMX_OMX),"")
ifeq ($(ANDROID_VERSION_MACRO),700)
FSL_BUILD_OMX_PLAYER := false
FSL_OMX_CFLAGS += -DNO_FORCE_CONTIGUOUS
endif
endif
use_gralloc_v3 := $(shell if [ $(ANDROID_VERSION_MACRO) -ge 800 ];then echo "true";fi)
#FSL_VPU_OMX_ONLY is set in device/nxp/[platform]/BoardConfig.mk
#set default value to false for android 7.1
FSL_VPU_OMX_ONLY ?= false
#$(warning FSL_BUILD_OMX_PLAYER=$(FSL_BUILD_OMX_PLAYER))
#$(warning use_gralloc_v3=$(use_gralloc_v3))
#$(warning FSL_VPU_OMX_ONLY=$(FSL_VPU_OMX_ONLY))
#$(warning TARGET_BOOTLOADER_BOARD_NAME=$(TARGET_BOOTLOADER_BOARD_NAME))
ifneq ($(FSL_BUILD_OMX_PLAYER), true)
ifeq ($(FSL_VPU_OMX_ONLY), true)
include $(FSL_OMX_PATH)/Android_vpu.mk
else
include $(FSL_OMX_PATH)/Android_decoders.mk
endif
else
player := $(shell if [ $(ANDROID_VERSION_MACRO) -gt 600 ];then echo "simple_player";fi)
ifeq ($(player), simple_player)
include $(FSL_OMX_PATH)/Android_simple_player.mk
else
include $(FSL_OMX_PATH)/Android_full_player.mk
endif
endif
endif