Home | History | Annotate | Download | only in init
      1 # Copyright 2005 The Android Open Source Project
      2 
      3 LOCAL_PATH:= $(call my-dir)
      4 include $(CLEAR_VARS)
      5 
      6 LOCAL_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 
     21 ifeq ($(strip $(INIT_BOOTCHART)),true)
     22 LOCAL_SRC_FILES += bootchart.c
     23 LOCAL_CFLAGS    += -DBOOTCHART=1
     24 endif
     25 
     26 ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
     27 LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1
     28 endif
     29 
     30 LOCAL_MODULE:= init
     31 
     32 LOCAL_FORCE_STATIC_EXECUTABLE := true
     33 LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
     34 LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
     35 
     36 LOCAL_STATIC_LIBRARIES := \
     37 	libfs_mgr \
     38 	liblogwrap \
     39 	libcutils \
     40 	liblog \
     41 	libc \
     42 	libselinux \
     43 	libmincrypt \
     44 	libext4_utils_static
     45 
     46 include $(BUILD_EXECUTABLE)
     47 
     48 # Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
     49 SYMLINKS := \
     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 
     60 ALL_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
     64 ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
     65     $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
     66