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