• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 The Android Open Source Project
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#
7#      http://www.apache.org/licenses/LICENSE-2.0
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
15LOCAL_PATH := $(call my-dir)
16
17include $(CLEAR_VARS)
18
19otafault_static_libs := \
20    libziparchive \
21    libz \
22    libselinux \
23    libbase \
24    liblog
25
26LOCAL_CFLAGS := \
27    -Werror \
28    -Wthread-safety \
29    -Wthread-safety-negative \
30    -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
31
32LOCAL_SRC_FILES := config.cpp ota_io.cpp
33LOCAL_MODULE_TAGS := eng
34LOCAL_MODULE := libotafault
35LOCAL_CLANG := true
36LOCAL_C_INCLUDES := bootable/recovery
37LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
38LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs)
39
40include $(BUILD_STATIC_LIBRARY)
41
42# otafault_test (static executable)
43# ===============================
44include $(CLEAR_VARS)
45
46LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp
47LOCAL_MODULE_TAGS := tests
48LOCAL_MODULE := otafault_test
49LOCAL_STATIC_LIBRARIES := $(otafault_static_libs)
50LOCAL_CFLAGS := -Werror
51LOCAL_C_INCLUDES := bootable/recovery
52LOCAL_FORCE_STATIC_EXECUTABLE := true
53
54include $(BUILD_EXECUTABLE)
55