Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 1 | # Copyright 2015 The Android Open Source Project |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 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 | # |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 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 languae governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 17 | ifdef project-path-for |
| 18 | RECOVERY_PATH := $(call project-path-for,recovery) |
| 19 | else |
| 20 | RECOVERY_PATH := bootable/recovery |
| 21 | endif |
| 22 | |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 23 | include $(CLEAR_VARS) |
| 24 | |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 25 | otafault_static_libs := \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 26 | libziparchive \ |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 27 | libz \ |
Tianjie Xu | 7b0ad9c | 2016-08-05 18:00:04 -0700 | [diff] [blame] | 28 | libselinux \ |
| 29 | libbase \ |
| 30 | liblog |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 31 | |
Tianjie Xu | 4bb11c7 | 2017-04-06 23:54:03 -0700 | [diff] [blame] | 32 | LOCAL_CFLAGS := \ |
| 33 | -Werror \ |
| 34 | -Wthread-safety \ |
| 35 | -Wthread-safety-negative \ |
| 36 | -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS |
| 37 | |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 38 | LOCAL_SRC_FILES := config.cpp ota_io.cpp |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 39 | LOCAL_MODULE_TAGS := eng |
| 40 | LOCAL_MODULE := libotafault |
| 41 | LOCAL_CLANG := true |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 42 | LOCAL_C_INCLUDES := $(RECOVERY_PATH) |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 43 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 44 | LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs) |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 45 | |
| 46 | include $(BUILD_STATIC_LIBRARY) |
| 47 | |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 48 | # otafault_test (static executable) |
| 49 | # =============================== |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 50 | include $(CLEAR_VARS) |
| 51 | |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 52 | LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 53 | LOCAL_MODULE_TAGS := tests |
| 54 | LOCAL_MODULE := otafault_test |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 55 | LOCAL_STATIC_LIBRARIES := $(otafault_static_libs) |
Tianjie Xu | 7aa8874 | 2016-09-28 11:42:17 -0700 | [diff] [blame] | 56 | LOCAL_CFLAGS := -Werror |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 57 | LOCAL_C_INCLUDES := $(RECOVERY_PATH) |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 58 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 59 | |
| 60 | include $(BUILD_EXECUTABLE) |