OSDN Git Service

Do not build PIC code for Android
[android-x86/external-IA-Hardware-Composer.git] / Android.mk
1 # Copyright (C) 2015 The Android Open Source Project
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 ifeq ($(strip $(BOARD_USES_IA_HWCOMPOSER)),true)
16
17 LOCAL_PATH := $(call my-dir)
18 include $(CLEAR_VARS)
19
20 LOCAL_SHARED_LIBRARIES := \
21         libcutils \
22         libdrm \
23         libEGL \
24         libGLESv2 \
25         libhardware \
26         liblog \
27         libsync \
28         libui \
29         libutils
30
31
32 LOCAL_C_INCLUDES := \
33         system/core/include/utils \
34         system/core/libsync \
35         system/core/libsync/include \
36         $(LOCAL_PATH)/public \
37         $(LOCAL_PATH)/common/core \
38         $(LOCAL_PATH)/common/compositor \
39         $(LOCAL_PATH)/common/compositor/gl \
40         $(LOCAL_PATH)/common/display \
41         $(LOCAL_PATH)/common/utils \
42         $(LOCAL_PATH)/common/watchers \
43         $(LOCAL_PATH)/os/android
44
45 LOCAL_SRC_FILES := \
46         common/compositor/compositor.cpp \
47         common/compositor/factory.cpp \
48         common/compositor/nativesurface.cpp \
49         common/compositor/renderstate.cpp \
50         common/core/hwclayer.cpp \
51         common/core/gpudevice.cpp \
52         common/core/nativesync.cpp \
53         common/core/overlaybuffer.cpp \
54         common/core/overlaybuffermanager.cpp \
55         common/core/overlaylayer.cpp \
56         common/display/display.cpp \
57         common/display/displayplane.cpp \
58         common/display/displayplanemanager.cpp \
59         common/display/displayqueue.cpp \
60         common/display/headless.cpp \
61         common/display/vblankeventhandler.cpp \
62         common/display/kmsfencehandler.cpp \
63         common/display/virtualdisplay.cpp \
64         common/utils/drmscopedtypes.cpp \
65         common/utils/fdhandler.cpp \
66         common/utils/hwcevent.cpp \
67         common/utils/hwcthread.cpp \
68         common/utils/hwcutils.cpp \
69         common/utils/disjoint_layers.cpp \
70         os/android/grallocbufferhandler.cpp \
71         os/android/drmhwctwo.cpp
72
73 LOCAL_CPPFLAGS += \
74         -DHWC2_USE_CPP11 \
75         -DHWC2_INCLUDE_STRINGIFICATION \
76         -DUSE_ANDROID_SYNC \
77         -DUSE_ANDROID_SHIM \
78         -O2 \
79         -D_FORTIFY_SOURCE=2 \
80         -fstack-protector-strong \
81         -Wformat -Wformat-security
82
83 ifeq ($(strip $(BOARD_DISABLE_NATIVE_COLOR_MODES)),true)
84 LOCAL_CPPFLAGS += -DDISABLE_NATIVE_COLOR_MODES
85 endif
86
87 ifeq ($(strip $(BOARD_ENABLE_EXPLICIT_SYNC)),false)
88 LOCAL_CPPFLAGS += -DDISABLE_EXPLICIT_SYNC
89 LOCAL_CPPFLAGS += -DDISABLE_OVERLAY_USAGE
90 endif
91
92 ifeq ($(strip $(BOARD_USES_VULKAN)),)
93 LOCAL_CPPFLAGS += \
94         -DUSE_GL
95
96 LOCAL_SRC_FILES += \
97         common/compositor/gl/glprogram.cpp \
98         common/compositor/gl/glrenderer.cpp \
99         common/compositor/gl/glsurface.cpp \
100         common/compositor/gl/egloffscreencontext.cpp \
101         common/compositor/gl/nativeglresource.cpp \
102         common/compositor/gl/shim.cpp \
103         common/compositor/scopedrendererstate.cpp
104 endif
105
106 ifeq ($(strip $(BOARD_USES_MINIGBM)),true)
107 LOCAL_CPPFLAGS += -DUSE_MINIGBM
108 LOCAL_C_INCLUDES += \
109         $(INTEL_MINIGBM)/cros_gralloc/
110 else
111 LOCAL_C_INCLUDES += \
112         $(INTEL_DRM_GRALLOC)
113 endif
114
115 LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
116 LOCAL_MODULE_TAGS := optional
117 #Preffered paths for all vendor hals /vendor/lib/hw
118 LOCAL_PROPRIETARY_MODULE := true
119 LOCAL_MODULE_RELATIVE_PATH := hw
120 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
121 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
122 include $(BUILD_SHARED_LIBRARY)
123
124 endif