| # Copyright 2005 The Android Open Source Project |
| # |
| # This file was modified by Dolby Laboratories, Inc. The portions of the |
| # code that are surrounded by "DOLBY..." are copyrighted and |
| # licensed separately, as follows: |
| # |
| # (C) 2011-2013 Dolby Laboratories, Inc. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| LOCAL_PATH:= $(call my-dir) |
| include $(CLEAR_VARS) |
| |
| LOCAL_SRC_FILES:= \ |
| builtins.c \ |
| init.c \ |
| devices.c \ |
| property_service.c \ |
| util.c \ |
| parser.c \ |
| keychords.c \ |
| signal_handler.c \ |
| init_parser.c \ |
| ueventd.c \ |
| ueventd_parser.c \ |
| watchdogd.c \ |
| vendor_init.c |
| |
| LOCAL_CFLAGS += -Wno-unused-parameter |
| |
| ifeq ($(strip $(INIT_BOOTCHART)),true) |
| LOCAL_SRC_FILES += bootchart.c |
| LOCAL_CFLAGS += -DBOOTCHART=1 |
| endif |
| |
| ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1 |
| endif |
| ifdef DOLBY_UDC |
| LOCAL_CFLAGS += -DDOLBY_UDC |
| endif #DOLBY_UDC_END |
| ifdef DOLBY_DAP |
| LOCAL_CFLAGS += -DDOLBY_DAP |
| endif #DOLBY_END |
| |
| # Enable ueventd logging |
| #LOCAL_CFLAGS += -DLOG_UEVENTS=1 |
| |
| LOCAL_MODULE:= init |
| |
| LOCAL_FORCE_STATIC_EXECUTABLE := true |
| LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) |
| |
| LOCAL_STATIC_LIBRARIES := \ |
| libfs_mgr \ |
| liblogwrap \ |
| libcutils \ |
| liblog \ |
| libc \ |
| libselinux \ |
| libmincrypt \ |
| libext4_utils_static |
| |
| LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk |
| ifneq ($(strip $(TARGET_PLATFORM_DEVICE_BASE)),) |
| LOCAL_CFLAGS += -D_PLATFORM_BASE="\"$(TARGET_PLATFORM_DEVICE_BASE)\"" |
| endif |
| ifneq ($(strip $(TARGET_INIT_VENDOR_LIB)),) |
| LOCAL_WHOLE_STATIC_LIBRARIES += $(TARGET_INIT_VENDOR_LIB) |
| endif |
| |
| include $(BUILD_EXECUTABLE) |
| |
| # Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init |
| SYMLINKS := \ |
| $(TARGET_ROOT_OUT)/sbin/ueventd \ |
| $(TARGET_ROOT_OUT)/sbin/watchdogd |
| |
| $(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE) |
| $(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk |
| @echo "Symlink: $@ -> ../$(INIT_BINARY)" |
| @mkdir -p $(dir $@) |
| @rm -rf $@ |
| $(hide) ln -sf ../$(INIT_BINARY) $@ |
| |
| 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) |