1# Copyright 2005 The Android Open Source Project 2 3LOCAL_PATH:= $(call my-dir) 4include $(CLEAR_VARS) 5 6LOCAL_SRC_FILES:= \ 7 builtins.c \ 8 init.c \ 9 devices.c \ 10 property_service.c \ 11 util.c \ 12 parser.c \ 13 logo.c \ 14 keychords.c \ 15 signal_handler.c \ 16 init_parser.c \ 17 ueventd.c \ 18 ueventd_parser.c \ 19 watchdogd.c 20 21ifeq ($(strip $(INIT_BOOTCHART)),true) 22LOCAL_SRC_FILES += bootchart.c 23LOCAL_CFLAGS += -DBOOTCHART=1 24endif 25 26ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 27LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 28endif 29 30LOCAL_MODULE:= init 31 32LOCAL_FORCE_STATIC_EXECUTABLE := true 33LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 34LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) 35 36LOCAL_STATIC_LIBRARIES := \ 37 libfs_mgr \ 38 liblogwrap \ 39 libcutils \ 40 liblog \ 41 libc \ 42 libselinux 43 44include $(BUILD_EXECUTABLE) 45 46# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init 47SYMLINKS := \ 48 $(TARGET_ROOT_OUT)/sbin/ueventd \ 49 $(TARGET_ROOT_OUT)/sbin/watchdogd 50 51$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE) 52$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk 53 @echo "Symlink: $@ -> ../$(INIT_BINARY)" 54 @mkdir -p $(dir $@) 55 @rm -rf $@ 56 $(hide) ln -sf ../$(INIT_BINARY) $@ 57 58ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) 59 60# We need this so that the installed files could be picked up based on the 61# local module name 62ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ 63 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) 64