blob: c2d0df45f2ba1f077d838060c40d5549ee8c1191 [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
9LOCAL_MODULE_TAGS := optional
Dan Willemsen2a001e82016-08-05 14:06:41 -070010LOCAL_CFLAGS := -Wall -Werror
Andreas Gampe73dae112015-11-19 14:12:14 -080011
12# Base & ASLR boundaries for boot image creation.
13ifndef LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA
14 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := -0x1000000
15else
16 LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
17endif
18ifndef LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA
19 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := 0x1000000
20else
21 LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA := $(LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
22endif
23LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
24LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
25LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
26
Jeff Sharkey0274c972016-12-06 09:32:04 -070027LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp binder/android/os/IInstalld.aidl
Andreas Gampe73dae112015-11-19 14:12:14 -080028LOCAL_SHARED_LIBRARIES := \
29 libbase \
Jeff Sharkey0274c972016-12-06 09:32:04 -070030 libbinder \
Andreas Gampe73dae112015-11-19 14:12:14 -080031 libcutils \
32 liblog \
33 liblogwrap \
34 libselinux \
Jeff Sharkey0274c972016-12-06 09:32:04 -070035 libutils \
Andreas Gampe73dae112015-11-19 14:12:14 -080036
37LOCAL_STATIC_LIBRARIES := libdiskusage
38LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
39LOCAL_CLANG := true
40include $(BUILD_EXECUTABLE)
41
Andreas Gampe01ad5982016-03-09 16:27:29 -080042# OTA postinstall script
43
44include $(CLEAR_VARS)
45LOCAL_MODULE:= otapreopt_script
46LOCAL_MODULE_TAGS := optional
47LOCAL_MODULE_CLASS := EXECUTABLES
48LOCAL_SRC_FILES := otapreopt_script.sh
49
Andreas Gampe90dc4922016-07-09 11:44:12 -070050# Let this depend on otapreopt, the chroot tool and the slot script, so we just have to mention one
51# in a configuration.
52LOCAL_REQUIRED_MODULES := otapreopt otapreopt_chroot otapreopt_slot
Andreas Gampe01ad5982016-03-09 16:27:29 -080053
54include $(BUILD_PREBUILT)
Jeff Sharkey00b6f682016-12-04 14:02:00 -070055
Jeff Sharkey0274c972016-12-06 09:32:04 -070056common_src_files := commands.cpp globals.cpp utils.cpp binder/android/os/IInstalld.aidl
Jeff Sharkey00b6f682016-12-04 14:02:00 -070057common_cflags := -Wall -Werror
58
59#
60# Static library used in testing and executable
61#
62
63include $(CLEAR_VARS)
64LOCAL_MODULE := libinstalld
65LOCAL_MODULE_TAGS := eng tests
66LOCAL_SRC_FILES := $(common_src_files)
67LOCAL_CFLAGS := $(common_cflags)
68LOCAL_SHARED_LIBRARIES := \
69 libbase \
Jeff Sharkey0274c972016-12-06 09:32:04 -070070 libbinder \
Jeff Sharkey00b6f682016-12-04 14:02:00 -070071 liblogwrap \
72 libselinux \
Jeff Sharkey0274c972016-12-06 09:32:04 -070073 libutils \
Jeff Sharkey00b6f682016-12-04 14:02:00 -070074
75LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
76LOCAL_CLANG := true
77include $(BUILD_STATIC_LIBRARY)
78
79#
80# Executable
81#
82
83include $(CLEAR_VARS)
84LOCAL_MODULE := installd
85LOCAL_MODULE_TAGS := optional
86LOCAL_CFLAGS := $(common_cflags)
Jeff Sharkey0274c972016-12-06 09:32:04 -070087LOCAL_SRC_FILES := $(common_src_files) installd.cpp
Jeff Sharkey90874002016-12-05 11:18:55 -070088
Jeff Sharkey00b6f682016-12-04 14:02:00 -070089LOCAL_SHARED_LIBRARIES := \
90 libbase \
Jeff Sharkey90874002016-12-05 11:18:55 -070091 libbinder \
Jeff Sharkey00b6f682016-12-04 14:02:00 -070092 libcutils \
93 liblog \
94 liblogwrap \
95 libselinux \
Jeff Sharkey90874002016-12-05 11:18:55 -070096 libutils
Jeff Sharkey00b6f682016-12-04 14:02:00 -070097
98LOCAL_STATIC_LIBRARIES := libdiskusage
99LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
100LOCAL_INIT_RC := installd.rc
101LOCAL_CLANG := true
102include $(BUILD_EXECUTABLE)