2009-03-04 04:32:55 +01:00
|
|
|
# Copyright 2005 The Android Open Source Project
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
2015-02-04 23:46:36 +01:00
|
|
|
# --
|
|
|
|
|
|
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
2015-04-28 21:39:41 +02:00
|
|
|
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_PERMISSIVE_SELINUX=1
|
2015-02-04 23:46:36 +01:00
|
|
|
else
|
2015-04-28 21:39:41 +02:00
|
|
|
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_PERMISSIVE_SELINUX=0
|
2015-02-04 23:46:36 +01:00
|
|
|
endif
|
|
|
|
|
2015-02-06 21:19:48 +01:00
|
|
|
init_options += -DLOG_UEVENTS=0
|
|
|
|
|
|
|
|
init_cflags += \
|
|
|
|
$(init_options) \
|
|
|
|
-Wall -Wextra \
|
|
|
|
-Wno-unused-parameter \
|
|
|
|
-Werror \
|
2015-02-04 23:46:36 +01:00
|
|
|
|
2015-03-30 23:37:11 +02:00
|
|
|
init_clang := true
|
|
|
|
|
2015-02-04 23:46:36 +01:00
|
|
|
# --
|
|
|
|
|
2015-02-06 21:19:48 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CPPFLAGS := $(init_cflags)
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
init_parser.cpp \
|
2015-03-28 07:20:44 +01:00
|
|
|
log.cpp \
|
2015-02-06 21:19:48 +01:00
|
|
|
parser.cpp \
|
|
|
|
util.cpp \
|
|
|
|
|
2015-03-16 18:08:46 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := libbase
|
2015-02-06 21:19:48 +01:00
|
|
|
LOCAL_MODULE := libinit
|
2015-03-30 23:37:11 +02:00
|
|
|
LOCAL_CLANG := $(init_clang)
|
2015-02-06 21:19:48 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CPPFLAGS := $(init_cflags)
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_SRC_FILES:= \
|
2015-02-04 19:25:09 +01:00
|
|
|
bootchart.cpp \
|
2015-02-04 02:12:07 +01:00
|
|
|
builtins.cpp \
|
|
|
|
devices.cpp \
|
|
|
|
init.cpp \
|
|
|
|
keychords.cpp \
|
|
|
|
property_service.cpp \
|
|
|
|
signal_handler.cpp \
|
|
|
|
ueventd.cpp \
|
|
|
|
ueventd_parser.cpp \
|
|
|
|
watchdogd.cpp \
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_MODULE:= init
|
2015-05-08 17:30:33 +02:00
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
system/extras/ext4_utils \
|
|
|
|
system/core/mkbootimg
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
|
|
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
|
|
|
|
|
2012-10-17 08:07:05 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2015-02-06 21:19:48 +01:00
|
|
|
libinit \
|
|
|
|
libfs_mgr \
|
2015-04-09 02:59:19 +02:00
|
|
|
libsquashfs_utils \
|
2015-02-06 21:19:48 +01:00
|
|
|
liblogwrap \
|
|
|
|
libcutils \
|
2015-03-16 18:08:46 +01:00
|
|
|
libbase \
|
2015-03-26 16:49:42 +01:00
|
|
|
libext4_utils_static \
|
|
|
|
libutils \
|
2015-02-06 21:19:48 +01:00
|
|
|
liblog \
|
|
|
|
libc \
|
|
|
|
libselinux \
|
|
|
|
libmincrypt \
|
2015-03-26 16:49:42 +01:00
|
|
|
libc++_static \
|
2015-04-14 01:29:05 +02:00
|
|
|
libdl \
|
|
|
|
libsparse_static \
|
|
|
|
libz
|
2012-01-13 14:48:47 +01:00
|
|
|
|
2014-11-25 00:43:34 +01:00
|
|
|
# Create symlinks
|
|
|
|
LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \
|
|
|
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \
|
|
|
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd
|
2014-03-07 00:07:42 +01:00
|
|
|
|
2015-03-30 23:37:11 +02:00
|
|
|
LOCAL_CLANG := $(init_clang)
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2015-02-06 21:19:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := init_tests
|
|
|
|
LOCAL_SRC_FILES := \
|
2015-02-07 05:15:18 +01:00
|
|
|
init_parser_test.cpp \
|
2015-02-06 21:19:48 +01:00
|
|
|
util_test.cpp \
|
|
|
|
|
|
|
|
LOCAL_SHARED_LIBRARIES += \
|
|
|
|
libcutils \
|
2015-03-16 18:08:46 +01:00
|
|
|
libbase \
|
2015-02-06 21:19:48 +01:00
|
|
|
|
|
|
|
LOCAL_STATIC_LIBRARIES := libinit
|
2015-03-30 23:37:11 +02:00
|
|
|
LOCAL_CLANG := $(init_clang)
|
2015-02-06 21:19:48 +01:00
|
|
|
include $(BUILD_NATIVE_TEST)
|