Android.mk 3.19 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)

17

Doug Zongker's avatar
Doug Zongker committed
18 19 20 21 22 23 24 25 26 27 28 29
include $(CLEAR_VARS)

LOCAL_SRC_FILES := fuse_sideload.c

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)

30
include $(CLEAR_VARS)
31 32

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

LOCAL_MODULE := recovery

LOCAL_FORCE_STATIC_EXECUTABLE := true

49 50 51
ifeq ($(HOST_OS),linux)
LOCAL_REQUIRED_MODULES := mkfs.f2fs
endif
52

53
RECOVERY_API_VERSION := 3
54
RECOVERY_FSTAB_VERSION := 2
55
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
56
LOCAL_CFLAGS += -Wno-unused-parameter
57

Dan Albert's avatar
Dan Albert committed
58 59 60 61
LOCAL_C_INCLUDES += \
    system/vold \
    system/extras/ext4_utils \
    system/core/adb \
62

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

ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
84
    LOCAL_CFLAGS += -DUSE_EXT4
85
    LOCAL_C_INCLUDES += system/extras/ext4_utils
86
    LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
87 88
endif

89
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
90

91
ifeq ($(TARGET_RECOVERY_UI_LIB),)
92
  LOCAL_SRC_FILES += default_device.cpp
93 94 95
else
  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
96 97 98

include $(BUILD_EXECUTABLE)

Kenny Root's avatar
Kenny Root committed
99 100 101 102 103 104 105
# All the APIs for testing
include $(CLEAR_VARS)
LOCAL_MODULE := libverifier
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
    asn1_decoder.cpp
include $(BUILD_STATIC_LIBRARY)
106

107
include $(CLEAR_VARS)
108 109 110
LOCAL_MODULE := verifier_test
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_TAGS := tests
111
LOCAL_CFLAGS += -Wno-unused-parameter
112 113
LOCAL_SRC_FILES := \
    verifier_test.cpp \
Kenny Root's avatar
Kenny Root committed
114
    asn1_decoder.cpp \
115 116 117 118 119
    verifier.cpp \
    ui.cpp
LOCAL_STATIC_LIBRARIES := \
    libmincrypt \
    libminui \
120
    libminzip \
121 122 123
    libcutils \
    libstdc++ \
    libc
124
include $(BUILD_EXECUTABLE)
125 126


127 128 129 130
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
131
    $(LOCAL_PATH)/tests/Android.mk \
132 133
    $(LOCAL_PATH)/tools/Android.mk \
    $(LOCAL_PATH)/edify/Android.mk \
134
    $(LOCAL_PATH)/uncrypt/Android.mk \
135 136
    $(LOCAL_PATH)/updater/Android.mk \
    $(LOCAL_PATH)/applypatch/Android.mk