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 libmincrypt \ 44 libext4_utils_static 45 46include $(BUILD_EXECUTABLE) 47 48# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init 49SYMLINKS := \ 50 $(TARGET_ROOT_OUT)/sbin/ueventd \ 51 $(TARGET_ROOT_OUT)/sbin/watchdogd 52 53$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE) 54$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk 55 @echo "Symlink: $@ -> ../$(INIT_BINARY)" 56 @mkdir -p $(dir $@) 57 @rm -rf $@ 58 $(hide) ln -sf ../$(INIT_BINARY) $@ 59 60ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) 61 62# We need this so that the installed files could be picked up based on the 63# local module name 64ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ 65 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) 66