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 | |
Elliott Hughes | d3e37d1 | 2015-02-02 16:43:32 -0800 | [diff] [blame] | 20 | LOCAL_CFLAGS += \ |
| 21 | -std=gnu11 \ |
| 22 | -Wall \ |
| 23 | -Werror -Wno-error=deprecated-declarations \ |
| 24 | -Wno-unused-parameter \ |
Mark Salyzyn | 322445c | 2014-04-01 15:15:38 -0700 | [diff] [blame] | 25 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 26 | ifeq ($(strip $(INIT_BOOTCHART)),true) |
| 27 | LOCAL_SRC_FILES += bootchart.c |
| 28 | LOCAL_CFLAGS += -DBOOTCHART=1 |
| 29 | endif |
| 30 | |
Nick Kralevich | 0dbda7e | 2012-01-18 13:38:34 -0800 | [diff] [blame] | 31 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
Nick Kralevich | f3c85b2 | 2014-06-02 20:56:04 -0700 | [diff] [blame] | 32 | LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1 |
Nick Kralevich | 0dbda7e | 2012-01-18 13:38:34 -0800 | [diff] [blame] | 33 | endif |
| 34 | |
Alex Ray | 18ccc1b | 2014-03-06 15:07:42 -0800 | [diff] [blame] | 35 | # Enable ueventd logging |
| 36 | #LOCAL_CFLAGS += -DLOG_UEVENTS=1 |
| 37 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 38 | LOCAL_MODULE:= init |
| 39 | |
| 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) |