blob: 7d65b55f6b566edee01acb62ea73e381b5db0648 [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
Michael Bestasc86b6d42017-04-28 22:43:09 +030017ifdef project-path-for
18 RECOVERY_PATH := $(call project-path-for,recovery)
19else
20 RECOVERY_PATH := bootable/recovery
21endif
22
Jed Estepf1fc48c2015-12-15 16:04:53 -080023include $(CLEAR_VARS)
24
Jed Estepff6df892015-12-15 16:04:53 -080025otafault_static_libs := \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070026 libziparchive \
Jed Estepff6df892015-12-15 16:04:53 -080027 libz \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -070028 libselinux \
29 libbase \
30 liblog
Jed Estepff6df892015-12-15 16:04:53 -080031
Tianjie Xu4bb11c72017-04-06 23:54:03 -070032LOCAL_CFLAGS := \
33 -Werror \
34 -Wthread-safety \
35 -Wthread-safety-negative \
36 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
37
Jed Estepff6df892015-12-15 16:04:53 -080038LOCAL_SRC_FILES := config.cpp ota_io.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080039LOCAL_MODULE_TAGS := eng
40LOCAL_MODULE := libotafault
41LOCAL_CLANG := true
Michael Bestasc86b6d42017-04-28 22:43:09 +030042LOCAL_C_INCLUDES := $(RECOVERY_PATH)
Jed Estepff6df892015-12-15 16:04:53 -080043LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
44LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs)
Jed Estepf1fc48c2015-12-15 16:04:53 -080045
46include $(BUILD_STATIC_LIBRARY)
47
Tao Baod80a9982016-03-03 11:43:47 -080048# otafault_test (static executable)
49# ===============================
Jed Estepf1fc48c2015-12-15 16:04:53 -080050include $(CLEAR_VARS)
51
Jed Estepff6df892015-12-15 16:04:53 -080052LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080053LOCAL_MODULE_TAGS := tests
54LOCAL_MODULE := otafault_test
Jed Estepff6df892015-12-15 16:04:53 -080055LOCAL_STATIC_LIBRARIES := $(otafault_static_libs)
Tianjie Xu7aa88742016-09-28 11:42:17 -070056LOCAL_CFLAGS := -Werror
Michael Bestasc86b6d42017-04-28 22:43:09 +030057LOCAL_C_INCLUDES := $(RECOVERY_PATH)
Jed Estepf1fc48c2015-12-15 16:04:53 -080058LOCAL_FORCE_STATIC_EXECUTABLE := true
Jed Estepf1fc48c2015-12-15 16:04:53 -080059
60include $(BUILD_EXECUTABLE)