blob: d29e5bac32eecd3089e31a89b93c6c41c47d899a [file] [log] [blame]
Mike Lockwood94afecf2012-10-24 10:45:23 -07001LOCAL_PATH := $(call my-dir)
2
Andreas Gampe73dae112015-11-19 14:12:14 -08003#
4# OTA Executable
5#
6
7include $(CLEAR_VARS)
8LOCAL_MODULE := otapreopt
9LOCAL_MODULE_TAGS := optional
Dan Willemsen2a001e82016-08-05 14:06:41 -070010LOCAL_CFLAGS := -Wall -Werror
Andreas Gampe73dae112015-11-19 14:12:14 -080011
12# Base & ASLR boundaries for boot image creation.
13ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
14 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000
15else
16 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
17endif
18ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
19 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000
20else
21 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
22endif
23LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
24LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
25LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
26
Dan Willemsen2a001e82016-08-05 14:06:41 -070027LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp
Andreas Gampe73dae112015-11-19 14:12:14 -080028LOCAL_SHARED_LIBRARIES := \
29 libbase \
30 libcutils \
31 liblog \
32 liblogwrap \
33 libselinux \
34
35LOCAL_STATIC_LIBRARIES := libdiskusage
36LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
37LOCAL_CLANG := true
38include $(BUILD_EXECUTABLE)
39
Andreas Gampe01ad5982016-03-09 16:27:29 -080040# OTA postinstall script
41
42include $(CLEAR_VARS)
43LOCAL_MODULE:= otapreopt_script
44LOCAL_MODULE_TAGS := optional
45LOCAL_MODULE_CLASS := EXECUTABLES
46LOCAL_SRC_FILES := otapreopt_script.sh
47
Andreas Gampe90dc4922016-07-09 11:44:12 -070048# Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one
49# in a configuration.
50LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot
Andreas Gampe01ad5982016-03-09 16:27:29 -080051
52include $(BUILD_PREBUILT)