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 | |
Mark Salyzyn | 322445c | 2014-04-01 15:15:38 -0700 | [diff] [blame] | 20 | LOCAL_CFLAGS += -Wno-unused-parameter |
| 21 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 22 | ifeq ($(strip $(INIT_BOOTCHART)),true) |
| 23 | LOCAL_SRC_FILES += bootchart.c |
| 24 | LOCAL_CFLAGS += -DBOOTCHART=1 |
| 25 | endif |
| 26 | |
Nick Kralevich | 0dbda7e | 2012-01-18 13:38:34 -0800 | [diff] [blame] | 27 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
Nick Kralevich | f3c85b2 | 2014-06-02 20:56:04 -0700 | [diff] [blame] | 28 | LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1 |
Nick Kralevich | 0dbda7e | 2012-01-18 13:38:34 -0800 | [diff] [blame] | 29 | endif |
| 30 | |
Alex Ray | 18ccc1b | 2014-03-06 15:07:42 -0800 | [diff] [blame] | 31 | # Enable ueventd logging |
| 32 | #LOCAL_CFLAGS += -DLOG_UEVENTS=1 |
| 33 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 34 | LOCAL_MODULE:= init |
| 35 | |
Bernhard Rosenkraenzer | 84e07fb | 2014-10-04 01:34:55 +0200 | [diff] [blame] | 36 | # Currently, init doesn't start when built with clang. |
| 37 | # Needs further investigation. |
| 38 | LOCAL_CLANG := false |
| 39 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 40 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 41 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 42 | LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) |
| 43 | |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 44 | LOCAL_STATIC_LIBRARIES := \ |
| 45 | libfs_mgr \ |
Ken Sumrall | bf021b4 | 2013-03-19 19:38:44 -0700 | [diff] [blame] | 46 | liblogwrap \ |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 47 | libcutils \ |
Ken Sumrall | bf021b4 | 2013-03-19 19:38:44 -0700 | [diff] [blame] | 48 | liblog \ |
Kenny Root | b5982bf | 2012-10-16 23:07:05 -0700 | [diff] [blame] | 49 | libc \ |
Geremy Condra | 3ad3d1c | 2013-02-22 18:11:41 -0800 | [diff] [blame] | 50 | libselinux \ |
| 51 | libmincrypt \ |
| 52 | libext4_utils_static |
Stephen Smalley | e46f9d5 | 2012-01-13 08:48:47 -0500 | [diff] [blame] | 53 | |
Ying Wang | dbb78d6 | 2014-11-24 15:43:34 -0800 | [diff] [blame] | 54 | # Create symlinks |
| 55 | LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \ |
| 56 | ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \ |
| 57 | ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd |
Alex Ray | 18ccc1b | 2014-03-06 15:07:42 -0800 | [diff] [blame] | 58 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 59 | include $(BUILD_EXECUTABLE) |