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 | |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 27 | LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp binder/android/os/IInstalld.aidl |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 28 | LOCAL_SHARED_LIBRARIES := \ |
| 29 | libbase \ |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 30 | libbinder \ |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 31 | libcutils \ |
| 32 | liblog \ |
| 33 | liblogwrap \ |
| 34 | libselinux \ |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 35 | libutils \ |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 36 | |
| 37 | LOCAL_STATIC_LIBRARIES := libdiskusage |
| 38 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 39 | LOCAL_CLANG := true |
| 40 | include $(BUILD_EXECUTABLE) |
| 41 | |
Andreas Gampe | 01ad598 | 2016-03-09 16:27:29 -0800 | [diff] [blame] | 42 | # OTA postinstall script |
| 43 | |
| 44 | include $(CLEAR_VARS) |
| 45 | LOCAL_MODULE:= otapreopt_script |
| 46 | LOCAL_MODULE_TAGS := optional |
| 47 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 48 | LOCAL_SRC_FILES := otapreopt_script.sh |
| 49 | |
Andreas Gampe | 90dc492 | 2016-07-09 11:44:12 -0700 | [diff] [blame] | 50 | # Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one |
| 51 | # in a configuration. |
| 52 | LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot |
Andreas Gampe | 01ad598 | 2016-03-09 16:27:29 -0800 | [diff] [blame] | 53 | |
| 54 | include $(BUILD_PREBUILT) |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 55 | |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 56 | common_src_files := commands.cpp globals.cpp utils.cpp binder/android/os/IInstalld.aidl |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 57 | common_cflags := -Wall -Werror |
| 58 | |
| 59 | # |
| 60 | # Static library used in testing and executable |
| 61 | # |
| 62 | |
| 63 | include $(CLEAR_VARS) |
| 64 | LOCAL_MODULE := libinstalld |
| 65 | LOCAL_MODULE_TAGS := eng tests |
| 66 | LOCAL_SRC_FILES := $(common_src_files) |
| 67 | LOCAL_CFLAGS := $(common_cflags) |
| 68 | LOCAL_SHARED_LIBRARIES := \ |
| 69 | libbase \ |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 70 | libbinder \ |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 71 | liblogwrap \ |
| 72 | libselinux \ |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 73 | libutils \ |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 74 | |
| 75 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 76 | LOCAL_CLANG := true |
| 77 | include $(BUILD_STATIC_LIBRARY) |
| 78 | |
| 79 | # |
| 80 | # Executable |
| 81 | # |
| 82 | |
| 83 | include $(CLEAR_VARS) |
| 84 | LOCAL_MODULE := installd |
| 85 | LOCAL_MODULE_TAGS := optional |
| 86 | LOCAL_CFLAGS := $(common_cflags) |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame^] | 87 | LOCAL_SRC_FILES := $(common_src_files) installd.cpp |
Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 88 | |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 89 | LOCAL_SHARED_LIBRARIES := \ |
| 90 | libbase \ |
Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 91 | libbinder \ |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 92 | libcutils \ |
| 93 | liblog \ |
| 94 | liblogwrap \ |
| 95 | libselinux \ |
Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 96 | libutils |
Jeff Sharkey | 00b6f68 | 2016-12-04 14:02:00 -0700 | [diff] [blame] | 97 | |
| 98 | LOCAL_STATIC_LIBRARIES := libdiskusage |
| 99 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 100 | LOCAL_INIT_RC := installd.rc |
| 101 | LOCAL_CLANG := true |
| 102 | include $(BUILD_EXECUTABLE) |