blob: d3429ed3ed636e9ef34d31093a6196377876d646 [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
Andreas Gampe013f02e2017-03-20 18:36:54 -070027LOCAL_SRC_FILES := otapreopt.cpp globals.cpp utils.cpp dexopt.cpp
Andreas Gampe73dae112015-11-19 14:12:14 -080028LOCAL_SHARED_LIBRARIES := \
29 libbase \
30 libcutils \
31 liblog \
32 liblogwrap \
33 libselinux \
Jeff Sharkey0274c972016-12-06 09:32:04 -070034 libutils \
Andreas Gampe73dae112015-11-19 14:12:14 -080035
36LOCAL_STATIC_LIBRARIES := libdiskusage
37LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
38LOCAL_CLANG := true
39include $(BUILD_EXECUTABLE)
40
Andreas Gampe99e2b262016-07-09 11:44:12 -070041# OTA slot script
42
43include $(CLEAR_VARS)
44LOCAL_MODULE:= otapreopt_slot
45LOCAL_MODULE_TAGS := optional
46LOCAL_MODULE_CLASS := EXECUTABLES
47LOCAL_SRC_FILES := otapreopt_slot.sh
48LOCAL_INIT_RC := otapreopt.rc
49
50include $(BUILD_PREBUILT)
51
Andreas Gampe01ad5982016-03-09 16:27:29 -080052# OTA postinstall script
53
54include $(CLEAR_VARS)
55LOCAL_MODULE:= otapreopt_script
56LOCAL_MODULE_TAGS := optional
57LOCAL_MODULE_CLASS := EXECUTABLES
58LOCAL_SRC_FILES := otapreopt_script.sh
59
Andreas Gampe90dc4922016-07-09 11:44:12 -070060# Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one
61# in a configuration.
62LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot
Andreas Gampe01ad5982016-03-09 16:27:29 -080063
64include $(BUILD_PREBUILT)