Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 3 | # |
| 4 | # OTA Executable |
| 5 | # |
| 6 | |
| 7 | include $(CLEAR_VARS) |
| 8 | LOCAL_MODULE := otapreopt |
| 9 | LOCAL_MODULE_TAGS := optional |
Dan Willemsen | 2a001e8 | 2016-08-05 14:06:41 -0700 | [diff] [blame] | 10 | LOCAL_CFLAGS := -Wall -Werror |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 11 | |
| 12 | # Base & ASLR boundaries for boot image creation. |
| 13 | ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA |
| 14 | LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000 |
| 15 | else |
| 16 | LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA) |
| 17 | endif |
| 18 | ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA |
| 19 | LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000 |
| 20 | else |
| 21 | LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA) |
| 22 | endif |
| 23 | LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS) |
| 24 | LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA) |
| 25 | LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA) |
| 26 | |
Dan Willemsen | 2a001e8 | 2016-08-05 14:06:41 -0700 | [diff] [blame] | 27 | LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 28 | LOCAL_SHARED_LIBRARIES := \ |
| 29 | libbase \ |
| 30 | libcutils \ |
| 31 | liblog \ |
| 32 | liblogwrap \ |
| 33 | libselinux \ |
| 34 | |
| 35 | LOCAL_STATIC_LIBRARIES := libdiskusage |
| 36 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 37 | LOCAL_CLANG := true |
| 38 | include $(BUILD_EXECUTABLE) |
| 39 | |
Andreas Gampe | 99e2b26 | 2016-07-09 11:44:12 -0700 | [diff] [blame] | 40 | # OTA slot script |
| 41 | |
| 42 | include $(CLEAR_VARS) |
| 43 | LOCAL_MODULE:= otapreopt_slot |
| 44 | LOCAL_MODULE_TAGS := optional |
| 45 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 46 | LOCAL_SRC_FILES := otapreopt_slot.sh |
| 47 | LOCAL_INIT_RC := otapreopt.rc |
| 48 | |
| 49 | include $(BUILD_PREBUILT) |
| 50 | |
Andreas Gampe | 01ad598 | 2016-03-09 16:27:29 -0800 | [diff] [blame] | 51 | # OTA postinstall script |
| 52 | |
| 53 | include $(CLEAR_VARS) |
| 54 | LOCAL_MODULE:= otapreopt_script |
| 55 | LOCAL_MODULE_TAGS := optional |
| 56 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 57 | LOCAL_SRC_FILES := otapreopt_script.sh |
| 58 | |
Andreas Gampe | 99e2b26 | 2016-07-09 11:44:12 -0700 | [diff] [blame] | 59 | # Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one |
| 60 | # in a configuration. |
| 61 | LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot |
Andreas Gampe | 01ad598 | 2016-03-09 16:27:29 -0800 | [diff] [blame] | 62 | |
| 63 | include $(BUILD_PREBUILT) |