blob: 5ec8a192a198e2884b614d73694814ce6cdd59c7 [file] [log] [blame]
Jed Estepff6df892015-12-15 16:04:53 -08001# Copyright 2015 The Android Open Source Project
Jed Estepa7b9a462015-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 Estepa7b9a462015-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 Estepa7b9a462015-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 \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -070021 libbase \
22 liblog
Jed Estepff6df892015-12-15 16:04:53 -080023
Tianjie Xu4bb11c72017-04-06 23:54:03 -070024LOCAL_CFLAGS := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070025 -Wall \
Tianjie Xu4bb11c72017-04-06 23:54:03 -070026 -Werror \
27 -Wthread-safety \
28 -Wthread-safety-negative \
29 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
30
Jed Estepff6df892015-12-15 16:04:53 -080031LOCAL_SRC_FILES := config.cpp ota_io.cpp
Jed Estepf1fc48c2015-12-15 16:04:53 -080032LOCAL_MODULE_TAGS := eng
Jed Estepa7b9a462015-12-15 16:04:53 -080033LOCAL_MODULE := libotafault
Tao Baod33b2f82017-09-28 21:29:11 -070034LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
35LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao646b05a2017-09-28 17:43:53 -070036LOCAL_STATIC_LIBRARIES := $(otafault_static_libs)
Jed Estepa7b9a462015-12-15 16:04:53 -080037
38include $(BUILD_STATIC_LIBRARY)
39
Tao Baod80a9982016-03-03 11:43:47 -080040# otafault_test (static executable)
41# ===============================
Jed Estepa7b9a462015-12-15 16:04:53 -080042include $(CLEAR_VARS)
43
Tao Baod33b2f82017-09-28 21:29:11 -070044LOCAL_SRC_FILES := test.cpp
Jed Estepa7b9a462015-12-15 16:04:53 -080045LOCAL_MODULE_TAGS := tests
46LOCAL_MODULE := otafault_test
Tao Baod33b2f82017-09-28 21:29:11 -070047LOCAL_STATIC_LIBRARIES := \
48 libotafault \
49 $(otafault_static_libs)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070050LOCAL_CFLAGS := -Wall -Werror
Jed Estepa7b9a462015-12-15 16:04:53 -080051LOCAL_FORCE_STATIC_EXECUTABLE := true
Jed Estepa7b9a462015-12-15 16:04:53 -080052
53include $(BUILD_EXECUTABLE)