blob: 1898e179ffa5199449133d6c786c495d4ae32ef3 [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 Xu7aa88742016-09-28 11:42:17 -070032LOCAL_CFLAGS := -Werror
Jed Estepff6df892015-12-15 16:04:53 -080033LOCAL_SRC_FILES := config.cpp ota_io.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080034LOCAL_MODULE_TAGS := eng
35LOCAL_MODULE := libotafault
36LOCAL_CLANG := true
Michael Bestasc86b6d42017-04-28 22:43:09 +030037LOCAL_C_INCLUDES := $(RECOVERY_PATH)
Jed Estepff6df892015-12-15 16:04:53 -080038LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
39LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs)
Jed Estepf1fc48c2015-12-15 16:04:53 -080040
41include $(BUILD_STATIC_LIBRARY)
42
Tao Baod80a9982016-03-03 11:43:47 -080043# otafault_test (static executable)
44# ===============================
Jed Estepf1fc48c2015-12-15 16:04:53 -080045include $(CLEAR_VARS)
46
Jed Estepff6df892015-12-15 16:04:53 -080047LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080048LOCAL_MODULE_TAGS := tests
49LOCAL_MODULE := otafault_test
Jed Estepff6df892015-12-15 16:04:53 -080050LOCAL_STATIC_LIBRARIES := $(otafault_static_libs)
Tianjie Xu7aa88742016-09-28 11:42:17 -070051LOCAL_CFLAGS := -Werror
Michael Bestasc86b6d42017-04-28 22:43:09 +030052LOCAL_C_INCLUDES := $(RECOVERY_PATH)
Jed Estepf1fc48c2015-12-15 16:04:53 -080053LOCAL_FORCE_STATIC_EXECUTABLE := true
Jed Estepf1fc48c2015-12-15 16:04:53 -080054
55include $(BUILD_EXECUTABLE)