2009-03-04 11:32:55 +08:00
|
|
|
# Copyright 2005 The Android Open Source Project
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
builtins.c \
|
|
|
|
init.c \
|
|
|
|
devices.c \
|
|
|
|
property_service.c \
|
|
|
|
util.c \
|
|
|
|
parser.c \
|
2010-04-14 10:20:44 +08:00
|
|
|
logo.c \
|
2010-04-14 10:48:59 +08:00
|
|
|
keychords.c \
|
2010-04-21 05:29:05 +08:00
|
|
|
signal_handler.c \
|
2010-04-22 03:04:20 +08:00
|
|
|
init_parser.c \
|
2010-04-21 05:32:50 +08:00
|
|
|
ueventd.c \
|
2012-06-14 12:51:56 +08:00
|
|
|
ueventd_parser.c \
|
|
|
|
watchdogd.c
|
2009-03-04 11:32:55 +08:00
|
|
|
|
|
|
|
ifeq ($(strip $(INIT_BOOTCHART)),true)
|
|
|
|
LOCAL_SRC_FILES += bootchart.c
|
|
|
|
LOCAL_CFLAGS += -DBOOTCHART=1
|
|
|
|
endif
|
|
|
|
|
2012-01-19 05:38:34 +08:00
|
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
|
|
|
LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1
|
|
|
|
endif
|
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_MODULE:= init
|
|
|
|
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
|
|
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
|
|
|
|
|
2012-04-18 08:20:16 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := libfs_mgr libcutils libc
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2012-01-13 21:48:47 +08:00
|
|
|
ifeq ($(HAVE_SELINUX),true)
|
|
|
|
LOCAL_STATIC_LIBRARIES += libselinux
|
2012-04-18 08:20:16 +08:00
|
|
|
LOCAL_C_INCLUDES += external/libselinux/include
|
2012-01-13 21:48:47 +08:00
|
|
|
LOCAL_CFLAGS += -DHAVE_SELINUX
|
|
|
|
endif
|
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
|
2012-06-14 12:51:56 +08:00
|
|
|
# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
|
|
|
|
SYMLINKS := \
|
|
|
|
$(TARGET_ROOT_OUT)/sbin/ueventd \
|
|
|
|
$(TARGET_ROOT_OUT)/sbin/watchdogd
|
|
|
|
|
2010-04-22 03:04:20 +08:00
|
|
|
$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE)
|
|
|
|
$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
|
2010-04-23 04:34:16 +08:00
|
|
|
@echo "Symlink: $@ -> ../$(INIT_BINARY)"
|
2010-04-22 03:04:20 +08:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@rm -rf $@
|
2010-04-23 04:34:16 +08:00
|
|
|
$(hide) ln -sf ../$(INIT_BINARY) $@
|
2010-04-22 03:04:20 +08:00
|
|
|
|
|
|
|
ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)
|
|
|
|
|
|
|
|
# We need this so that the installed files could be picked up based on the
|
|
|
|
# local module name
|
|
|
|
ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
|
|
|
|
$(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
|