blob: 1f43ba600fb8f638de5da68265b550ef1485c1f3 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001# 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 \
Colin Cross9c5366b2010-04-13 19:48:59 -070013 keychords.c \
Colin Cross6310a822010-04-20 14:29:05 -070014 signal_handler.c \
Colin Crossf83d0b92010-04-21 12:04:20 -070015 init_parser.c \
Colin Cross44b65d02010-04-20 14:32:50 -070016 ueventd.c \
Arve Hjønnevågd97d9072012-06-13 21:51:56 -070017 ueventd_parser.c \
18 watchdogd.c
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080019
20ifeq ($(strip $(INIT_BOOTCHART)),true)
21LOCAL_SRC_FILES += bootchart.c
22LOCAL_CFLAGS += -DBOOTCHART=1
23endif
24
Nick Kralevich0dbda7e2012-01-18 13:38:34 -080025ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
26LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1
27endif
28
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080029LOCAL_MODULE:= init
30
31LOCAL_FORCE_STATIC_EXECUTABLE := true
32LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
33LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
34
Kenny Rootb5982bf2012-10-16 23:07:05 -070035LOCAL_STATIC_LIBRARIES := \
36 libfs_mgr \
Ken Sumrallbf021b42013-03-19 19:38:44 -070037 liblogwrap \
Kenny Rootb5982bf2012-10-16 23:07:05 -070038 libcutils \
Ken Sumrallbf021b42013-03-19 19:38:44 -070039 liblog \
Kenny Rootb5982bf2012-10-16 23:07:05 -070040 libc \
Geremy Condra3ad3d1c2013-02-22 18:11:41 -080041 libselinux \
42 libmincrypt \
43 libext4_utils_static
Stephen Smalleye46f9d52012-01-13 08:48:47 -050044
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080045include $(BUILD_EXECUTABLE)
46
Arve Hjønnevågd97d9072012-06-13 21:51:56 -070047# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
48SYMLINKS := \
49 $(TARGET_ROOT_OUT)/sbin/ueventd \
50 $(TARGET_ROOT_OUT)/sbin/watchdogd
51
Colin Crossf83d0b92010-04-21 12:04:20 -070052$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE)
53$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
Colin Cross33680b12010-04-22 13:34:16 -070054 @echo "Symlink: $@ -> ../$(INIT_BINARY)"
Colin Crossf83d0b92010-04-21 12:04:20 -070055 @mkdir -p $(dir $@)
56 @rm -rf $@
Colin Cross33680b12010-04-22 13:34:16 -070057 $(hide) ln -sf ../$(INIT_BINARY) $@
Colin Crossf83d0b92010-04-21 12:04:20 -070058
59ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)
60
61# We need this so that the installed files could be picked up based on the
62# local module name
63ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
64 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)