Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 1 | # 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 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
| 17 | include $(CLEAR_VARS) |
| 18 | LOCAL_CLANG := true |
| 19 | LOCAL_SRC_FILES := bootloader_message.cpp |
| 20 | LOCAL_MODULE := libbootloader_message_twrp |
| 21 | LOCAL_C_INCLUDES += bionic $(LOCAL_PATH)/include |
Ethan Yonker | 917331b | 2017-11-28 22:26:38 -0600 | [diff] [blame] | 22 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 21; echo $$?),0) |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 23 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 24 | LOCAL_SHARED_LIBRARIES += libstlport |
| 25 | else |
| 26 | LOCAL_C_INCLUDES += external/libcxx/include |
| 27 | LOCAL_SHARED_LIBRARIES += libc++ |
| 28 | endif |
| 29 | LOCAL_CFLAGS := -Werror -std=c++11 |
| 30 | # ignore bootloader's factory reset command even when written to /misc |
| 31 | ifeq ($(TW_IGNORE_MISC_WIPE_DATA), true) |
| 32 | LOCAL_CFLAGS += -DIGNORE_MISC_WIPE_DATA |
| 33 | endif |
Alessandro Astone | 7ec5fd9 | 2018-10-12 11:12:22 +0200 | [diff] [blame] | 34 | ifeq ($(BOOTLOADER_MESSAGE_OFFSET),) |
| 35 | LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=0 |
| 36 | else |
| 37 | LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOOTLOADER_MESSAGE_OFFSET) |
| 38 | endif |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 39 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| 40 | include $(BUILD_SHARED_LIBRARY) |