Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Andreas Gampe | 02d0de5 | 2015-11-11 20:43:16 -0800 | [diff] [blame] | 3 | common_src_files := commands.cpp globals.cpp utils.cpp |
Brian Carlstrom | e46a75a | 2014-06-27 16:03:06 -0700 | [diff] [blame] | 4 | common_cflags := -Wall -Werror |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 5 | |
| 6 | # |
| 7 | # Static library used in testing and executable |
| 8 | # |
| 9 | |
| 10 | include $(CLEAR_VARS) |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 11 | LOCAL_MODULE := libinstalld |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 12 | LOCAL_MODULE_TAGS := eng tests |
Brian Carlstrom | e46a75a | 2014-06-27 16:03:06 -0700 | [diff] [blame] | 13 | LOCAL_SRC_FILES := $(common_src_files) |
| 14 | LOCAL_CFLAGS := $(common_cflags) |
Jeff Sharkey | e363724 | 2015-04-08 20:56:42 -0700 | [diff] [blame] | 15 | LOCAL_SHARED_LIBRARIES := \ |
| 16 | libbase \ |
| 17 | liblogwrap \ |
Colin Cross | 4213ebe | 2015-12-21 16:21:45 -0800 | [diff] [blame] | 18 | libselinux \ |
Jeff Sharkey | e363724 | 2015-04-08 20:56:42 -0700 | [diff] [blame] | 19 | |
Brian Carlstrom | e46a75a | 2014-06-27 16:03:06 -0700 | [diff] [blame] | 20 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
Jeff Sharkey | 41ea424 | 2015-04-09 11:34:03 -0700 | [diff] [blame] | 21 | LOCAL_CLANG := true |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 22 | include $(BUILD_STATIC_LIBRARY) |
| 23 | |
| 24 | # |
| 25 | # Executable |
| 26 | # |
| 27 | |
| 28 | include $(CLEAR_VARS) |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 29 | LOCAL_MODULE := installd |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 30 | LOCAL_MODULE_TAGS := optional |
Brian Carlstrom | e46a75a | 2014-06-27 16:03:06 -0700 | [diff] [blame] | 31 | LOCAL_CFLAGS := $(common_cflags) |
Jeff Sharkey | 1980380 | 2015-04-07 12:44:51 -0700 | [diff] [blame] | 32 | LOCAL_SRC_FILES := installd.cpp $(common_src_files) |
Jeff Sharkey | c03de09 | 2015-04-07 18:14:05 -0700 | [diff] [blame] | 33 | LOCAL_SHARED_LIBRARIES := \ |
| 34 | libbase \ |
| 35 | libcutils \ |
| 36 | liblog \ |
Jeff Sharkey | e363724 | 2015-04-08 20:56:42 -0700 | [diff] [blame] | 37 | liblogwrap \ |
Jeff Sharkey | c03de09 | 2015-04-07 18:14:05 -0700 | [diff] [blame] | 38 | libselinux \ |
| 39 | |
Brian Carlstrom | e46a75a | 2014-06-27 16:03:06 -0700 | [diff] [blame] | 40 | LOCAL_STATIC_LIBRARIES := libdiskusage |
| 41 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
Tom Cherry | 7415599 | 2015-08-14 13:01:23 -0700 | [diff] [blame] | 42 | LOCAL_INIT_RC := installd.rc |
Jeff Sharkey | 41ea424 | 2015-04-09 11:34:03 -0700 | [diff] [blame] | 43 | LOCAL_CLANG := true |
Mike Lockwood | 94afecf | 2012-10-24 10:45:23 -0700 | [diff] [blame] | 44 | include $(BUILD_EXECUTABLE) |
Andreas Gampe | 02d0de5 | 2015-11-11 20:43:16 -0800 | [diff] [blame] | 45 | |
Andreas Gampe | 73dae11 | 2015-11-19 14:12:14 -0800 | [diff] [blame] | 46 | # |
| 47 | # OTA Executable |
| 48 | # |
| 49 | |
| 50 | include $(CLEAR_VARS) |
| 51 | LOCAL_MODULE := otapreopt |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | LOCAL_CFLAGS := $(common_cflags) |
| 54 | |
| 55 | # Base & ASLR boundaries for boot image creation. |
| 56 | ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA |
| 57 | LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000 |
| 58 | else |
| 59 | LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA) |
| 60 | endif |
| 61 | ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA |
| 62 | LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000 |
| 63 | else |
| 64 | LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA) |
| 65 | endif |
| 66 | LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS) |
| 67 | LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA) |
| 68 | LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA) |
| 69 | |
| 70 | LOCAL_SRC_FILES := otapreopt.cpp $(common_src_files) |
| 71 | LOCAL_SHARED_LIBRARIES := \ |
| 72 | libbase \ |
| 73 | libcutils \ |
| 74 | liblog \ |
| 75 | liblogwrap \ |
| 76 | libselinux \ |
| 77 | |
| 78 | LOCAL_STATIC_LIBRARIES := libdiskusage |
| 79 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 80 | LOCAL_CLANG := true |
| 81 | include $(BUILD_EXECUTABLE) |
| 82 | |
Andreas Gampe | 01ad598 | 2016-03-09 16:27:29 -0800 | [diff] [blame] | 83 | # OTA chroot tool |
| 84 | |
| 85 | include $(CLEAR_VARS) |
| 86 | LOCAL_MODULE := otapreopt_chroot |
| 87 | LOCAL_MODULE_TAGS := optional |
| 88 | LOCAL_CFLAGS := $(common_cflags) |
| 89 | |
| 90 | LOCAL_SRC_FILES := otapreopt_chroot.cpp |
| 91 | LOCAL_SHARED_LIBRARIES := \ |
| 92 | libbase \ |
| 93 | liblog \ |
| 94 | |
| 95 | LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| 96 | LOCAL_CLANG := true |
| 97 | include $(BUILD_EXECUTABLE) |
| 98 | |
| 99 | # OTA postinstall script |
| 100 | |
| 101 | include $(CLEAR_VARS) |
| 102 | LOCAL_MODULE:= otapreopt_script |
| 103 | LOCAL_MODULE_TAGS := optional |
| 104 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 105 | LOCAL_SRC_FILES := otapreopt_script.sh |
| 106 | |
| 107 | # Let this depend on otapreopt and the chroot tool, so we just have to mention one in a |
| 108 | # configuration. |
| 109 | LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot |
| 110 | |
| 111 | include $(BUILD_PREBUILT) |
| 112 | |
Andreas Gampe | 02d0de5 | 2015-11-11 20:43:16 -0800 | [diff] [blame] | 113 | # Tests. |
| 114 | |
| 115 | include $(LOCAL_PATH)/tests/Android.mk |