blob: 1d21b3ce1b729f14e86689db9a35e756578c486b [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
Andreas Gampe013f02e2017-03-20 18:36:54 -070026LOCAL_SRC_FILES := otapreopt.cpp globals.cpp utils.cpp dexopt.cpp
Andreas Gampe54e1a402017-03-20 18:42:49 -070027LOCAL_HEADER_LIBRARIES := dex2oat_headers
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
Andreas Gampe01ad5982016-03-09 16:27:29 -080037LOCAL_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)