Android.mk 3.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

15 16
LOCAL_PATH := $(call my-dir)

Doug Zongker's avatar
Doug Zongker committed
17 18
include $(CLEAR_VARS)

Tao Bao's avatar
Tao Bao committed
19
LOCAL_SRC_FILES := fuse_sideload.cpp
Tao Bao's avatar
Tao Bao committed
20
LOCAL_CLANG := true
Doug Zongker's avatar
Doug Zongker committed
21 22 23 24 25 26 27 28
LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE

LOCAL_MODULE := libfusesideload

LOCAL_STATIC_LIBRARIES := libcutils libc libmincrypt
include $(BUILD_STATIC_LIBRARY)

29
include $(CLEAR_VARS)
30 31

LOCAL_SRC_FILES := \
32 33
    adb_install.cpp \
    asn1_decoder.cpp \
Doug Zongker's avatar
Doug Zongker committed
34
    bootloader.cpp \
35
    device.cpp \
Tao Bao's avatar
Tao Bao committed
36
    fuse_sdcard_provider.cpp \
Doug Zongker's avatar
Doug Zongker committed
37
    install.cpp \
38
    recovery.cpp \
Doug Zongker's avatar
Doug Zongker committed
39
    roots.cpp \
40
    screen_ui.cpp \
41
    ui.cpp \
42
    verifier.cpp \
43
    wear_ui.cpp \
44
    wear_touch.cpp \
45 46 47 48 49

LOCAL_MODULE := recovery

LOCAL_FORCE_STATIC_EXECUTABLE := true

50
ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
51 52 53
ifeq ($(HOST_OS),linux)
LOCAL_REQUIRED_MODULES := mkfs.f2fs
endif
54
endif
55

56
RECOVERY_API_VERSION := 3
57
RECOVERY_FSTAB_VERSION := 2
58
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
59
LOCAL_CFLAGS += -Wno-unused-parameter
Tao Bao's avatar
Tao Bao committed
60
LOCAL_CLANG := true
61

Dan Albert's avatar
Dan Albert committed
62 63 64 65
LOCAL_C_INCLUDES += \
    system/vold \
    system/extras/ext4_utils \
    system/core/adb \
66

67
LOCAL_STATIC_LIBRARIES := \
68
    libbatterymonitor \
69
    libext4_utils_static \
70
    libsparse_static \
71 72 73 74 75
    libminzip \
    libz \
    libmtdutils \
    libmincrypt \
    libminadbd \
Doug Zongker's avatar
Doug Zongker committed
76
    libfusesideload \
77 78
    libminui \
    libpng \
79
    libfs_mgr \
80
    libbase \
81
    libcutils \
82
    libutils \
Ying Wang's avatar
Ying Wang committed
83
    liblog \
Kenny Root's avatar
Kenny Root committed
84
    libselinux \
85
    libm \
86
    libc
87

88 89
LOCAL_HAL_STATIC_LIBRARIES := libhealthd

90
ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
91
    LOCAL_CFLAGS += -DUSE_EXT4
92
    LOCAL_C_INCLUDES += system/extras/ext4_utils
93
    LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
94 95
endif

96
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
97

98
ifeq ($(TARGET_RECOVERY_UI_LIB),)
99
  LOCAL_SRC_FILES += default_device.cpp
100 101 102
else
  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
103 104 105

include $(BUILD_EXECUTABLE)

Kenny Root's avatar
Kenny Root committed
106 107
# All the APIs for testing
include $(CLEAR_VARS)
Tao Bao's avatar
Tao Bao committed
108
LOCAL_CLANG := true
Kenny Root's avatar
Kenny Root committed
109 110 111 112
LOCAL_MODULE := libverifier
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
    asn1_decoder.cpp \
113 114
    verifier.cpp \
    ui.cpp
115
include $(BUILD_STATIC_LIBRARY)
116

117 118 119 120
include $(LOCAL_PATH)/minui/Android.mk \
    $(LOCAL_PATH)/minzip/Android.mk \
    $(LOCAL_PATH)/minadbd/Android.mk \
    $(LOCAL_PATH)/mtdutils/Android.mk \
Kenny Root's avatar
Kenny Root committed
121
    $(LOCAL_PATH)/tests/Android.mk \
122 123
    $(LOCAL_PATH)/tools/Android.mk \
    $(LOCAL_PATH)/edify/Android.mk \
124
    $(LOCAL_PATH)/uncrypt/Android.mk \
125
    $(LOCAL_PATH)/otafault/Android.mk \
126
    $(LOCAL_PATH)/updater/Android.mk \
127
    $(LOCAL_PATH)/update_verifier/Android.mk \
128
    $(LOCAL_PATH)/applypatch/Android.mk