blob: 54f6b5f285c85f76d8c68bff59fc1b1a83a1d16e [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
Dan Willemsene05dc6d2016-07-25 17:13:45 -07009LOCAL_CFLAGS := -Wall -Werror
Andreas Gampe73dae112015-11-19 14:12:14 -080010
11# Base & ASLR boundaries for boot image creation.
12ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
13 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000
14else
15 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
16endif
17ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
18 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000
19else
20 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
21endif
22LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
23LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
24LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
25
Dan Willemsene05dc6d2016-07-25 17:13:45 -070026LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp
Andreas Gampe73dae112015-11-19 14:12:14 -080027LOCAL_SHARED_LIBRARIES := \
28 libbase \
29 libcutils \
30 liblog \
31 liblogwrap \
32 libselinux \
33
34LOCAL_STATIC_LIBRARIES := libdiskusage
Andreas Gampe01ad5982016-03-09 16:27:29 -080035LOCAL_CLANG := true
36include $(BUILD_EXECUTABLE)
37
Andreas Gampe99e2b262016-07-09 11:44:12 -070038# OTA slot script
39
40include $(CLEAR_VARS)
41LOCAL_MODULE:= otapreopt_slot
42LOCAL_MODULE_TAGS := optional
43LOCAL_MODULE_CLASS := EXECUTABLES
44LOCAL_SRC_FILES := otapreopt_slot.sh
45LOCAL_INIT_RC := otapreopt.rc
46
47include $(BUILD_PREBUILT)
48
Andreas Gampe01ad5982016-03-09 16:27:29 -080049# OTA postinstall script
50
51include $(CLEAR_VARS)
52LOCAL_MODULE:= otapreopt_script
53LOCAL_MODULE_TAGS := optional
54LOCAL_MODULE_CLASS := EXECUTABLES
55LOCAL_SRC_FILES := otapreopt_script.sh
56
Andreas Gampe99e2b262016-07-09 11:44:12 -070057# Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one
58# in a configuration.
59LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot
Andreas Gampe01ad5982016-03-09 16:27:29 -080060
61include $(BUILD_PREBUILT)