blob: 3ded400f67bd7879e6aaa7de5cd1623030547f1d [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 Gampe99e2b262016-07-09 11:44:12 -070040# OTA slot script
41
42include $(CLEAR_VARS)
43LOCAL_MODULE:= otapreopt_slot
44LOCAL_MODULE_TAGS := optional
45LOCAL_MODULE_CLASS := EXECUTABLES
46LOCAL_SRC_FILES := otapreopt_slot.sh
47LOCAL_INIT_RC := otapreopt.rc
48
49include $(BUILD_PREBUILT)
50
Andreas Gampe01ad5982016-03-09 16:27:29 -080051# OTA postinstall script
52
53include $(CLEAR_VARS)
54LOCAL_MODULE:= otapreopt_script
55LOCAL_MODULE_TAGS := optional
56LOCAL_MODULE_CLASS := EXECUTABLES
57LOCAL_SRC_FILES := otapreopt_script.sh
58
Andreas Gampe99e2b262016-07-09 11:44:12 -070059# Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one
60# in a configuration.
61LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot
Andreas Gampe01ad5982016-03-09 16:27:29 -080062
63include $(BUILD_PREBUILT)