-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk.def
178 lines (133 loc) · 4.7 KB
/
Android.mk.def
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
##############################################################################
#
# Copyright (c) 2005 - 2012 by Vivante Corp. All rights reserved.
#
# The material in this file is confidential and contains trade secrets
# of Vivante Corporation. This is proprietary information owned by
# Vivante Corporation. No part of this work may be disclosed,
# reproduced, copied, transmitted, or used in any way for any purpose,
# without the express written permission of Vivante Corporation.
#
##############################################################################
#
# Common include file for Android build
#
################################################################################
# Options.
# Select prebuilt binary types.
FIXED_ARCH_TYPE ?=
# Set this variable to Kernel directory.
KERNEL_DIR ?= $(ANDROID_BUILD_TOP)/kernel/
# Cross compiler for building kernel module.
CROSS_COMPILE ?= $(ANDROID_BUILD_TOP)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
# <ro.hardware> property, which comes from 'Hardware' field of
# 'cpuinfo' of the device.
RO_HARDWARE ?= dspg
# Enable this to allocate video memory via coherent DMA.
NO_DMA_COHERENT ?= 0
# Enable to start GPU clock in drver.
ENABLE_GPU_CLOCK_BY_DRIVER ?= 0
# Enable platform driver model, available after linux 2.6.x.
USE_PLATFORM_DRIVER ?= 0
# Build as vanilla Linux in Android environment with VDK backend.
USE_LINUX_MODE_FOR_ANDROID ?= 0
# Force all video memory cached.
FORCE_ALL_VIDEO_MEMORY_CACHED ?= 0
# Enable caching for non paged memory.
NONPAGED_MEMORY_CACHEABLE ?= 0
# Enable buffering for non paged memory
NONPAGED_MEMORY_BUFFERABLE ?= 1
# Enable swap rectangle - EXPERIMENTAL
SUPPORT_SWAP_RECTANGLE ?= 0
# Enable memory bank alignment
USE_BANK_ALIGNMENT ?= 0
BANK_BIT_START ?= 0
BANK_BIT_END ?= 0
BANK_CHANNEL_BIT ?= 0
# Enable debug.
DEBUG ?= 0
# Build OpenCL
USE_OPENCL ?= 1
# Enable/disable deferred resolves for 3D apps - used for HWC - EXPERIMENTAL.
DEFER_RESOLVES ?= 0
# CopyBlt Optimization - EXPERIMENTAL.
COPYBLT_OPTIMIZATION ?= 0
# Use linear buffer for GPU apps. Make sure HWC has 2D composition.
ENABLE_LINEAR_BUFFER_FOR_GPU ?= 0
# Enable outer cache patch.
ENABLE_OUTER_CACHE_PATCH ?= 1
# Enable/disable android unaligned linear surface composition address adjust
ENABLE_ANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST ?= 0
################################################################################
# Variables.
GPU_TYPE := \
$(firstword \
$(filter XAQ2 GCCORE Unified,\
$(notdir $(wildcard $(call my-dir)/arch/*)) \
) \
)
PROPERTY := \
$(firstword \
$(strip $(RO_HARDWARE)) \
$(TARGET_BOOTLOADER_BOARD_NAME) \
$(TARGET_BOARD_PLATFORM)\
default \
)
AQROOT := $(call my-dir)
AQARCH := $(AQROOT)/arch/$(GPU_TYPE)
ARCH_TYPE := $(TARGET_ARCH)
TAG := MRVL
export KERNEL_DIR
export CROSS_COMPILE
################################################################################
# Target CFLAGS.
CFLAGS := -DLINUX
ifeq ($(USE_LINUX_MODE_FOR_ANDROID),1)
CFLAGS += -DUSE_VDK=1
else
CFLAGS += -DUSE_VDK=0
endif
ifeq ($(SUPPORT_SWAP_RECTANGLE),1)
CFLAGS += -DgcdSUPPORT_SWAP_RECTANGLE=1
endif
ifeq ($(DEFER_RESOLVES),1)
CFLAGS += -DgcdDEFER_RESOLVES=1
endif
ifeq ($(COPYBLT_OPTIMIZATION),1)
CFLAGS += -DgcdCOPYBLT_OPTIMIZATION=1
endif
PLATFORM_SDK_VERSION ?= 12
ifeq ($(ENABLE_LINEAR_BUFFER_FOR_GPU),1)
CFLAGS += -DgcdGPU_LINEAR_BUFFER_ENABLED=1
endif
ifeq ($(ENABLE_OUTER_CACHE_PATCH),1)
CFLAGS += -DgcdENABLE_OUTER_CACHE_PATCH=1
endif
ifeq ($(USE_BANK_ALIGNMENT), 1)
CFLAGS += -DgcdENABLE_BANK_ALIGNMENT=1
ifneq ($(BANK_BIT_START), 0)
ifneq ($(BANK_BIT_END), 0)
CFLAGS += -DgcdBANK_BIT_START=$(BANK_BIT_START)
CFLAGS += -DgcdBANK_BIT_END=$(BANK_BIT_END)
endif
endif
ifneq ($(BANK_CHANNEL_BIT), 0)
CFLAGS += -DgcdBANK_CHANNEL_BIT=$(BANK_CHANNEL_BIT)
endif
endif
CFLAGS += -DANDROID_SDK_VERSION=$(PLATFORM_SDK_VERSION)
CFLAGS += -fno-strict-aliasing -fno-short-enums
CFLAGS += -Wall -Wno-missing-field-initializers -Wno-unused-parameter
ifeq ($(DEBUG), 1)
CFLAGS += -DDBG=1 -DDEBUG -D_DEBUG -O0 -g
endif
ifeq ($(ENABLE_ANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST), 1)
CFLAGS += -DgcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST=1
else
CFLAGS += -DgcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST=0
endif
ifeq ($(FORCE_ALL_VIDEO_MEMORY_CACHED), 1)
CFLAGS += -DgcdPAGED_MEMORY_CACHEABLE=1
else
CFLAGS += -DgcdPAGED_MEMORY_CACHEABLE=0
endif