OSDN Git Service

Enable fstack-protector-strong option.
[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         vendor/intel/external/android_ia/libdrm \
34         vendor/intel/external/android_ia/libdrm/include/drm \
35         system/core/include/utils \
36         system/core/libsync \
37         system/core/libsync/include \
38         vendor/intel/external/android_ia/hwcomposer/public \
39         vendor/intel/external/android_ia/hwcomposer/common/core \
40         vendor/intel/external/android_ia/hwcomposer/common/compositor \
41         vendor/intel/external/android_ia/hwcomposer/common/compositor/gl \
42         vendor/intel/external/android_ia/hwcomposer/common/display \
43         vendor/intel/external/android_ia/hwcomposer/common/utils \
44         vendor/intel/external/android_ia/hwcomposer/common/watchers \
45         vendor/intel/external/android_ia/hwcomposer/os/android \
46
47 LOCAL_SRC_FILES := \
48         common/compositor/compositor.cpp \
49         common/compositor/factory.cpp \
50         common/compositor/nativesurface.cpp \
51         common/compositor/renderstate.cpp \
52         common/compositor/scopedrendererstate.cpp \
53         common/core/headless.cpp \
54         common/core/hwclayer.cpp \
55         common/core/internaldisplay.cpp \
56         common/core/virtualdisplay.cpp \
57         common/core/gpudevice.cpp \
58         common/core/nativesync.cpp \
59         common/core/overlaylayer.cpp \
60         common/display/displayplane.cpp \
61         common/display/displayplanemanager.cpp \
62         common/display/overlaybuffer.cpp \
63         common/display/pageflipeventhandler.cpp \
64         common/utils/drmscopedtypes.cpp \
65         common/utils/hwcthread.cpp \
66         common/utils/disjoint_layers.cpp \
67         os/android/grallocbufferhandler.cpp \
68         os/android/drmhwctwo.cpp
69
70 LOCAL_CPPFLAGS += \
71         -DHWC2_USE_CPP11 \
72         -DHWC2_INCLUDE_STRINGIFICATION \
73         -DUSE_ANDROID_SYNC \
74         -DUSE_ANDROID_SHIM \
75         -fPIC -O2 \
76         -D_FORTIFY_SOURCE=2 \
77         -fstack-protector-strong \
78         -fPIE -Wformat -Wformat-security
79
80 ifeq ($(strip $(BOARD_DISABLE_NATIVE_COLOR_MODES)),true)
81 LOCAL_CPPFLAGS += -DDISABLE_NATIVE_COLOR_MODES
82 endif
83
84 ifeq ($(strip $(BOARD_DISABLE_EXPLICIT_SYNC)),true)
85 LOCAL_CPPFLAGS += -DDISABLE_EXPLICIT_SYNC
86 LOCAL_CPPFLAGS += -DDISABLE_OVERLAY_USAGE
87 endif
88
89 ifeq ($(strip $(BOARD_USES_VULKAN)),)
90 LOCAL_CPPFLAGS += \
91         -DUSE_GL
92
93 LOCAL_SRC_FILES += \
94         common/compositor/gl/glprogram.cpp \
95         common/compositor/gl/glrenderer.cpp \
96         common/compositor/gl/glsurface.cpp \
97         common/compositor/gl/egloffscreencontext.cpp \
98         common/compositor/gl/nativeglresource.cpp \
99         common/compositor/gl/shim.cpp
100 endif
101
102 ifeq ($(strip $(BOARD_USES_MINIGBM)),true)
103 LOCAL_CPPFLAGS += -DUSE_MINIGBM
104 LOCAL_C_INCLUDES += \
105         vendor/intel/external/android_ia/minigbm/cros_gralloc
106 else
107 LOCAL_C_INCLUDES += \
108         vendor/intel/external/android_ia/drm_gralloc
109 endif
110
111 LOCAL_MODULE := hwcomposer.android_ia
112 LOCAL_MODULE_TAGS := optional
113 #Preffered paths for all vendor hals /vendor/lib/hw
114 LOCAL_PROPRIETARY_MODULE := true
115 LOCAL_MODULE_RELATIVE_PATH := hw
116 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
117 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
118 include $(BUILD_SHARED_LIBRARY)
119
120 endif