blob: a3b01e1db48483ecd1dff03e2ad675c4a7ac718c [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001# Copyright 2005 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08004
Elliott Hughesc0e919c2015-02-04 14:46:36 -08005# --
6
Elliott Hughesc0e919c2015-02-04 14:46:36 -08007ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
Elliott Hughesf682b472015-02-06 12:19:48 -08008init_options += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1
Elliott Hughesc0e919c2015-02-04 14:46:36 -08009else
Elliott Hughesf682b472015-02-06 12:19:48 -080010init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_DISABLE_SELINUX=0
Elliott Hughesc0e919c2015-02-04 14:46:36 -080011endif
12
Elliott Hughesf682b472015-02-06 12:19:48 -080013init_options += -DLOG_UEVENTS=0
14
15init_cflags += \
16 $(init_options) \
17 -Wall -Wextra \
18 -Wno-unused-parameter \
19 -Werror \
Elliott Hughesc0e919c2015-02-04 14:46:36 -080020
21# --
22
Elliott Hughesf682b472015-02-06 12:19:48 -080023include $(CLEAR_VARS)
24LOCAL_CPPFLAGS := $(init_cflags)
25LOCAL_SRC_FILES:= \
26 init_parser.cpp \
27 parser.cpp \
28 util.cpp \
29
30LOCAL_MODULE := libinit
31include $(BUILD_STATIC_LIBRARY)
32
33include $(CLEAR_VARS)
34LOCAL_CPPFLAGS := $(init_cflags)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080035LOCAL_SRC_FILES:= \
Elliott Hughes24627902015-02-04 10:25:09 -080036 bootchart.cpp \
Elliott Hughesf3cf4382015-02-03 17:12:07 -080037 builtins.cpp \
38 devices.cpp \
39 init.cpp \
Elliott Hughesf3cf4382015-02-03 17:12:07 -080040 keychords.cpp \
Elliott Hughesf3cf4382015-02-03 17:12:07 -080041 property_service.cpp \
42 signal_handler.cpp \
43 ueventd.cpp \
44 ueventd_parser.cpp \
Elliott Hughesf3cf4382015-02-03 17:12:07 -080045 watchdogd.cpp \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080046
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080047LOCAL_MODULE:= init
48
49LOCAL_FORCE_STATIC_EXECUTABLE := true
50LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
51LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
52
Kenny Rootb5982bf2012-10-16 23:07:05 -070053LOCAL_STATIC_LIBRARIES := \
Elliott Hughesf682b472015-02-06 12:19:48 -080054 libinit \
55 libfs_mgr \
56 liblogwrap \
57 libcutils \
58 libutils \
59 liblog \
60 libc \
61 libselinux \
62 libmincrypt \
63 libext4_utils_static
Stephen Smalleye46f9d52012-01-13 08:48:47 -050064
Ying Wangdbb78d62014-11-24 15:43:34 -080065# Create symlinks
66LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \
67 ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \
68 ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd
Alex Ray18ccc1b2014-03-06 15:07:42 -080069
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080070include $(BUILD_EXECUTABLE)
Elliott Hughesf682b472015-02-06 12:19:48 -080071
72
73
74
75include $(CLEAR_VARS)
76LOCAL_MODULE := init_tests
77LOCAL_SRC_FILES := \
78 util_test.cpp \
79
80LOCAL_SHARED_LIBRARIES += \
81 libcutils \
82 libutils \
83
84LOCAL_STATIC_LIBRARIES := libinit
85include $(BUILD_NATIVE_TEST)