blob: 932cd040c6c101253fe1f67419519fa39e08d33b [file] [log] [blame]
Ethan Yonker8373cfe2017-09-08 06:50:54 -05001# Copyright (C) 2016 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
15LOCAL_PATH := $(call my-dir)
16
17include $(CLEAR_VARS)
18LOCAL_CLANG := true
19LOCAL_SRC_FILES := bootloader_message.cpp
20LOCAL_MODULE := libbootloader_message_twrp
21LOCAL_C_INCLUDES += bionic $(LOCAL_PATH)/include
Ethan Yonker917331b2017-11-28 22:26:38 -060022ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 21; echo $$?),0)
Ethan Yonker8373cfe2017-09-08 06:50:54 -050023 LOCAL_C_INCLUDES += external/stlport/stlport
24 LOCAL_SHARED_LIBRARIES += libstlport
25else
26 LOCAL_C_INCLUDES += external/libcxx/include
27 LOCAL_SHARED_LIBRARIES += libc++
28endif
29LOCAL_CFLAGS := -Werror -std=c++11
30# ignore bootloader's factory reset command even when written to /misc
31ifeq ($(TW_IGNORE_MISC_WIPE_DATA), true)
32 LOCAL_CFLAGS += -DIGNORE_MISC_WIPE_DATA
33endif
Alessandro Astone7ec5fd92018-10-12 11:12:22 +020034ifeq ($(BOOTLOADER_MESSAGE_OFFSET),)
35 LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=0
36else
37 LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOOTLOADER_MESSAGE_OFFSET)
38endif
Ethan Yonker8373cfe2017-09-08 06:50:54 -050039LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
40include $(BUILD_SHARED_LIBRARY)