blob: d35099a8373a00d56ffffcaa0b04aba19790d2d6 [file] [log] [blame]
Mike Lockwood94afecf2012-10-24 10:45:23 -07001LOCAL_PATH := $(call my-dir)
2
Andreas Gampe02d0de52015-11-11 20:43:16 -08003common_src_files := commands.cpp globals.cpp utils.cpp
Brian Carlstrome46a75a2014-06-27 16:03:06 -07004common_cflags := -Wall -Werror
Mike Lockwood94afecf2012-10-24 10:45:23 -07005
6#
7# Static library used in testing and executable
8#
9
10include $(CLEAR_VARS)
Mike Lockwood94afecf2012-10-24 10:45:23 -070011LOCAL_MODULE := libinstalld
Mike Lockwood94afecf2012-10-24 10:45:23 -070012LOCAL_MODULE_TAGS := eng tests
Brian Carlstrome46a75a2014-06-27 16:03:06 -070013LOCAL_SRC_FILES := $(common_src_files)
14LOCAL_CFLAGS := $(common_cflags)
Jeff Sharkeye3637242015-04-08 20:56:42 -070015LOCAL_SHARED_LIBRARIES := \
16 libbase \
17 liblogwrap \
Colin Cross4213ebe2015-12-21 16:21:45 -080018 libselinux \
Jeff Sharkeye3637242015-04-08 20:56:42 -070019
Brian Carlstrome46a75a2014-06-27 16:03:06 -070020LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
Jeff Sharkey41ea4242015-04-09 11:34:03 -070021LOCAL_CLANG := true
Mike Lockwood94afecf2012-10-24 10:45:23 -070022include $(BUILD_STATIC_LIBRARY)
23
24#
25# Executable
26#
27
28include $(CLEAR_VARS)
Mike Lockwood94afecf2012-10-24 10:45:23 -070029LOCAL_MODULE := installd
Mike Lockwood94afecf2012-10-24 10:45:23 -070030LOCAL_MODULE_TAGS := optional
Brian Carlstrome46a75a2014-06-27 16:03:06 -070031LOCAL_CFLAGS := $(common_cflags)
Jeff Sharkey19803802015-04-07 12:44:51 -070032LOCAL_SRC_FILES := installd.cpp $(common_src_files)
Jeff Sharkeyc03de092015-04-07 18:14:05 -070033LOCAL_SHARED_LIBRARIES := \
34 libbase \
35 libcutils \
36 liblog \
Jeff Sharkeye3637242015-04-08 20:56:42 -070037 liblogwrap \
Jeff Sharkeyc03de092015-04-07 18:14:05 -070038 libselinux \
39
Brian Carlstrome46a75a2014-06-27 16:03:06 -070040LOCAL_STATIC_LIBRARIES := libdiskusage
41LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
Tom Cherry74155992015-08-14 13:01:23 -070042LOCAL_INIT_RC := installd.rc
Jeff Sharkey41ea4242015-04-09 11:34:03 -070043LOCAL_CLANG := true
Mike Lockwood94afecf2012-10-24 10:45:23 -070044include $(BUILD_EXECUTABLE)
Andreas Gampe02d0de52015-11-11 20:43:16 -080045
Andreas Gampe73dae112015-11-19 14:12:14 -080046#
47# OTA Executable
48#
49
50include $(CLEAR_VARS)
51LOCAL_MODULE := otapreopt
52LOCAL_MODULE_TAGS := optional
53LOCAL_CFLAGS := $(common_cflags)
54
55# Base & ASLR boundaries for boot image creation.
56ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
57 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000
58else
59 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
60endif
61ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
62 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000
63else
64 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
65endif
66LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
67LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
68LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
69
70LOCAL_SRC_FILES := otapreopt.cpp $(common_src_files)
71LOCAL_SHARED_LIBRARIES := \
72 libbase \
73 libcutils \
74 liblog \
75 liblogwrap \
76 libselinux \
77
78LOCAL_STATIC_LIBRARIES := libdiskusage
79LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
80LOCAL_CLANG := true
81include $(BUILD_EXECUTABLE)
82
Andreas Gampe01ad5982016-03-09 16:27:29 -080083# OTA chroot tool
84
85include $(CLEAR_VARS)
86LOCAL_MODULE := otapreopt_chroot
87LOCAL_MODULE_TAGS := optional
88LOCAL_CFLAGS := $(common_cflags)
89
90LOCAL_SRC_FILES := otapreopt_chroot.cpp
91LOCAL_SHARED_LIBRARIES := \
92 libbase \
93 liblog \
94
95LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
96LOCAL_CLANG := true
97include $(BUILD_EXECUTABLE)
98
99# OTA postinstall script
100
101include $(CLEAR_VARS)
102LOCAL_MODULE:= otapreopt_script
103LOCAL_MODULE_TAGS := optional
104LOCAL_MODULE_CLASS := EXECUTABLES
105LOCAL_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.
109LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot
110
111include $(BUILD_PREBUILT)
112
Andreas Gampe02d0de52015-11-11 20:43:16 -0800113# Tests.
114
115include $(LOCAL_PATH)/tests/Android.mk