blob: 13ab711c52031e2f5ea77e731006104ab50efded [file] [log] [blame]
Jed Estepff6df892015-12-15 16:04:53 -08001# Copyright 2015 The Android Open Source Project
Jed Estepf1fc48c2015-12-15 16:04:53 -08002#
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 Estepff6df892015-12-15 16:04:53 -08007# http://www.apache.org/licenses/LICENSE-2.0
Jed Estepf1fc48c2015-12-15 16:04:53 -08008#
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
15LOCAL_PATH := $(call my-dir)
16
Jed Estepf1fc48c2015-12-15 16:04:53 -080017include $(CLEAR_VARS)
18
Jed Estepff6df892015-12-15 16:04:53 -080019otafault_static_libs := \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070020 libziparchive \
Jed Estepff6df892015-12-15 16:04:53 -080021 libz \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -070022 libselinux \
23 libbase \
24 liblog
Jed Estepff6df892015-12-15 16:04:53 -080025
Tianjie Xu4bb11c72017-04-06 23:54:03 -070026LOCAL_CFLAGS := \
27 -Werror \
28 -Wthread-safety \
29 -Wthread-safety-negative \
30 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
31
Jed Estepff6df892015-12-15 16:04:53 -080032LOCAL_SRC_FILES := config.cpp ota_io.cpp
bigbiffd58ba182020-03-23 10:02:29 -040033LOCAL_MODULE_TAGS := optional
Jed Estepf1fc48c2015-12-15 16:04:53 -080034LOCAL_MODULE := libotafault
35LOCAL_CLANG := true
Michael Bestas43ee7e72018-01-10 18:33:42 +020036LOCAL_C_INCLUDES := $(commands_recovery_local_path)
Jed Estepff6df892015-12-15 16:04:53 -080037LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
38LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs)
Jed Estepf1fc48c2015-12-15 16:04:53 -080039
40include $(BUILD_STATIC_LIBRARY)
41
Tao Baod80a9982016-03-03 11:43:47 -080042# otafault_test (static executable)
43# ===============================
Jed Estepf1fc48c2015-12-15 16:04:53 -080044include $(CLEAR_VARS)
45
Jed Estepff6df892015-12-15 16:04:53 -080046LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080047LOCAL_MODULE_TAGS := tests
48LOCAL_MODULE := otafault_test
Jed Estepff6df892015-12-15 16:04:53 -080049LOCAL_STATIC_LIBRARIES := $(otafault_static_libs)
Tianjie Xu7aa88742016-09-28 11:42:17 -070050LOCAL_CFLAGS := -Werror
Michael Bestas43ee7e72018-01-10 18:33:42 +020051LOCAL_C_INCLUDES := $(commands_recovery_local_path)
Jed Estepf1fc48c2015-12-15 16:04:53 -080052LOCAL_FORCE_STATIC_EXECUTABLE := true
Jed Estepf1fc48c2015-12-15 16:04:53 -080053
54include $(BUILD_EXECUTABLE)