The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 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 \ |
Colin Cross | 9c5366b | 2010-04-13 19:48:59 -0700 | [diff] [blame] | 13 | keychords.c \ |
Colin Cross | 6310a82 | 2010-04-20 14:29:05 -0700 | [diff] [blame] | 14 | signal_handler.c \ |
Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 15 | init_parser.c \ |
Colin Cross | 44b65d0 | 2010-04-20 14:32:50 -0700 | [diff] [blame] | 16 | ueventd.c \ |
Arve Hjønnevåg | d97d907 | 2012-06-13 21:51:56 -0700 | [diff] [blame] | 17 | ueventd_parser.c \ |
| 18 | watchdogd.c |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 19 | |
| 20 | ifeq ($(strip $(INIT_BOOTCHART)),true) |
| 21 | LOCAL_SRC_FILES += bootchart.c |
| 22 | LOCAL_CFLAGS += -DBOOTCHART=1 |
| 23 | endif |
| 24 | |
Nick Kralevich | 0dbda7e | 2012-01-18 13:38:34 -0800 | [diff] [blame] | 25 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 26 | LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 |
| 27 | endif |
| 28 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 29 | LOCAL_MODULE:= init |
| 30 | |
| 31 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 32 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 33 | LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) |
| 34 | |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 35 | LOCAL_STATIC_LIBRARIES := \ |
| 36 | libfs_mgr \ |
Ken Sumrall | bf021b4 | 2013-03-19 19:38:44 -0700 | [diff] [blame] | 37 | liblogwrap \ |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 38 | libcutils \ |
Ken Sumrall | bf021b4 | 2013-03-19 19:38:44 -0700 | [diff] [blame] | 39 | liblog \ |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 40 | libc \ |
Geremy Condra | 3ad3d1c | 2013-02-22 18:11:41 -0800 | [diff] [blame] | 41 | libselinux \ |
| 42 | libmincrypt \ |
| 43 | libext4_utils_static |
Stephen Smalley | e46f9d5 | 2012-01-13 08:48:47 -0500 | [diff] [blame] | 44 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 45 | include $(BUILD_EXECUTABLE) |
| 46 | |
Arve Hjønnevåg | d97d907 | 2012-06-13 21:51:56 -0700 | [diff] [blame] | 47 | # Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init |
| 48 | SYMLINKS := \ |
| 49 | $(TARGET_ROOT_OUT)/sbin/ueventd \ |
| 50 | $(TARGET_ROOT_OUT)/sbin/watchdogd |
| 51 | |
Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 52 | $(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE) |
| 53 | $(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk |
Colin Cross | 33680b1 | 2010-04-22 13:34:16 -0700 | [diff] [blame] | 54 | @echo "Symlink: $@ -> ../$(INIT_BINARY)" |
Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 55 | @mkdir -p $(dir $@) |
| 56 | @rm -rf $@ |
Colin Cross | 33680b1 | 2010-04-22 13:34:16 -0700 | [diff] [blame] | 57 | $(hide) ln -sf ../$(INIT_BINARY) $@ |
Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 58 | |
| 59 | ALL_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 |
| 63 | ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ |
| 64 | $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) |