194afecf4b6f437b3ee9a076242402e421c6c07a6Mike LockwoodLOCAL_PATH := $(call my-dir)
294afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood
302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampecommon_src_files := commands.cpp globals.cpp utils.cpp
4e46a75a0f6007967cd0d161959af844772cdc330Brian Carlstromcommon_cflags := -Wall -Werror
594afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood
694afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood#
794afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood# Static library used in testing and executable
894afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood#
994afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood
1094afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwoodinclude $(CLEAR_VARS)
1194afecf4b6f437b3ee9a076242402e421c6c07a6Mike LockwoodLOCAL_MODULE := libinstalld
1294afecf4b6f437b3ee9a076242402e421c6c07a6Mike LockwoodLOCAL_MODULE_TAGS := eng tests
13e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_SRC_FILES := $(common_src_files)
14e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_CFLAGS := $(common_cflags)
15e36372423000a906bafae68844ebc6c42d09335aJeff SharkeyLOCAL_SHARED_LIBRARIES := \
16e36372423000a906bafae68844ebc6c42d09335aJeff Sharkey    libbase \
17e36372423000a906bafae68844ebc6c42d09335aJeff Sharkey    liblogwrap \
184213ebe488949ff50d78944b027afd1865e8d05fColin Cross    libselinux \
19e36372423000a906bafae68844ebc6c42d09335aJeff Sharkey
20e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
2141ea424413c0381ef2aa15fc5bd5d4b88abd23c4Jeff SharkeyLOCAL_CLANG := true
2294afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwoodinclude $(BUILD_STATIC_LIBRARY)
2394afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood
2494afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood#
2594afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood# Executable
2694afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood#
2794afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwood
2894afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwoodinclude $(CLEAR_VARS)
2994afecf4b6f437b3ee9a076242402e421c6c07a6Mike LockwoodLOCAL_MODULE := installd
3094afecf4b6f437b3ee9a076242402e421c6c07a6Mike LockwoodLOCAL_MODULE_TAGS := optional
31e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_CFLAGS := $(common_cflags)
3219803807cd7ae01868fcfa50305f4a7dd13765e2Jeff SharkeyLOCAL_SRC_FILES := installd.cpp $(common_src_files)
33c03de09173f98506e73e7cf7df21fe11795d4b24Jeff SharkeyLOCAL_SHARED_LIBRARIES := \
34c03de09173f98506e73e7cf7df21fe11795d4b24Jeff Sharkey    libbase \
35c03de09173f98506e73e7cf7df21fe11795d4b24Jeff Sharkey    libcutils \
36c03de09173f98506e73e7cf7df21fe11795d4b24Jeff Sharkey    liblog \
37e36372423000a906bafae68844ebc6c42d09335aJeff Sharkey    liblogwrap \
38c03de09173f98506e73e7cf7df21fe11795d4b24Jeff Sharkey    libselinux \
39c03de09173f98506e73e7cf7df21fe11795d4b24Jeff Sharkey
40e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_STATIC_LIBRARIES := libdiskusage
41e46a75a0f6007967cd0d161959af844772cdc330Brian CarlstromLOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
4274155996d931edbd19ed5b3f71a58ceff920b451Tom CherryLOCAL_INIT_RC := installd.rc
4341ea424413c0381ef2aa15fc5bd5d4b88abd23c4Jeff SharkeyLOCAL_CLANG := true
4494afecf4b6f437b3ee9a076242402e421c6c07a6Mike Lockwoodinclude $(BUILD_EXECUTABLE)
4502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe
4673dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe#
4773dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe# OTA Executable
4873dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe#
4973dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe
5073dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeinclude $(CLEAR_VARS)
5173dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_MODULE := otapreopt
5273dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_MODULE_TAGS := optional
5373dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_CFLAGS := $(common_cflags)
5473dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe
5573dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe# Base & ASLR boundaries for boot image creation.
5673dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
5773dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe  LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000
5873dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeelse
5973dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe  LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
6073dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeendif
6173dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
6273dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe  LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000
6373dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeelse
6473dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe  LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
6573dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeendif
6673dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
6773dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
6873dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
6973dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe
7073dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_SRC_FILES := otapreopt.cpp $(common_src_files)
7173dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_SHARED_LIBRARIES := \
7273dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe    libbase \
7373dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe    libcutils \
7473dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe    liblog \
7573dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe    liblogwrap \
7673dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe    libselinux \
7773dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe
7873dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_STATIC_LIBRARIES := libdiskusage
7973dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
8073dae11162aa61396c06cbdb05b954764e944e02Andreas GampeLOCAL_CLANG := true
8173dae11162aa61396c06cbdb05b954764e944e02Andreas Gampeinclude $(BUILD_EXECUTABLE)
8273dae11162aa61396c06cbdb05b954764e944e02Andreas Gampe
8301ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe# OTA chroot tool
8401ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
8501ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampeinclude $(CLEAR_VARS)
8601ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_MODULE := otapreopt_chroot
8701ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_MODULE_TAGS := optional
8801ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_CFLAGS := $(common_cflags)
8901ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
9001ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_SRC_FILES := otapreopt_chroot.cpp
9101ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_SHARED_LIBRARIES := \
9201ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe    libbase \
9301ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe    liblog \
9401ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
9501ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
9601ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_CLANG := true
9701ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampeinclude $(BUILD_EXECUTABLE)
9801ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
9901ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe# OTA postinstall script
10001ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
10101ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampeinclude $(CLEAR_VARS)
10201ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_MODULE:= otapreopt_script
10301ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_MODULE_TAGS := optional
10401ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_MODULE_CLASS := EXECUTABLES
10501ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_SRC_FILES := otapreopt_script.sh
10601ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
10701ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe# Let this depend on otapreopt and the chroot tool, so we just have to mention one in a
10801ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe# configuration.
10901ad5984dd202311a7e301c8c771a5d4b7c76136Andreas GampeLOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot
11001ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
11101ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampeinclude $(BUILD_PREBUILT)
11201ad5984dd202311a7e301c8c771a5d4b7c76136Andreas Gampe
11302d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe# Tests.
11402d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampe
11502d0de56c75347a0cb8d5a8565dc8c4ee7616057Andreas Gampeinclude $(LOCAL_PATH)/tests/Android.mk