Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 1 | # Copyright 2015 The Android Open Source Project |
Jed Estep | a7b9a46 | 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 | a7b9a46 | 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 | |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 17 | include $(CLEAR_VARS) |
| 18 | |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 19 | otafault_static_libs := \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 20 | libziparchive \ |
Tianjie Xu | 7b0ad9c | 2016-08-05 18:00:04 -0700 | [diff] [blame] | 21 | libbase \ |
| 22 | liblog |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 23 | |
Tianjie Xu | 4bb11c7 | 2017-04-06 23:54:03 -0700 | [diff] [blame] | 24 | LOCAL_CFLAGS := \ |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 25 | -Wall \ |
Tianjie Xu | 4bb11c7 | 2017-04-06 23:54:03 -0700 | [diff] [blame] | 26 | -Werror \ |
| 27 | -Wthread-safety \ |
| 28 | -Wthread-safety-negative \ |
| 29 | -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS |
| 30 | |
Jed Estep | ff6df89 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 31 | LOCAL_SRC_FILES := config.cpp ota_io.cpp |
Jed Estep | f1fc48c | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 32 | LOCAL_MODULE_TAGS := eng |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 33 | LOCAL_MODULE := libotafault |
Tao Bao | d33b2f8 | 2017-09-28 21:29:11 -0700 | [diff] [blame] | 34 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 35 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Tao Bao | 646b05a | 2017-09-28 17:43:53 -0700 | [diff] [blame] | 36 | LOCAL_STATIC_LIBRARIES := $(otafault_static_libs) |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 37 | |
| 38 | include $(BUILD_STATIC_LIBRARY) |
| 39 | |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 40 | # otafault_test (static executable) |
| 41 | # =============================== |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 42 | include $(CLEAR_VARS) |
| 43 | |
Tao Bao | d33b2f8 | 2017-09-28 21:29:11 -0700 | [diff] [blame] | 44 | LOCAL_SRC_FILES := test.cpp |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 45 | LOCAL_MODULE_TAGS := tests |
| 46 | LOCAL_MODULE := otafault_test |
Tao Bao | d33b2f8 | 2017-09-28 21:29:11 -0700 | [diff] [blame] | 47 | LOCAL_STATIC_LIBRARIES := \ |
| 48 | libotafault \ |
| 49 | $(otafault_static_libs) |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 50 | LOCAL_CFLAGS := -Wall -Werror |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 51 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Jed Estep | a7b9a46 | 2015-12-15 16:04:53 -0800 | [diff] [blame] | 52 | |
| 53 | include $(BUILD_EXECUTABLE) |