blob: 8cda879265ec432cbca1af860c8743b8fc7ef553 [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
Mark Salyzyn322445c2014-04-01 15:15:38 -070020LOCAL_CFLAGS += -Wno-unused-parameter
21
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080022ifeq ($(strip $(INIT_BOOTCHART)),true)
23LOCAL_SRC_FILES += bootchart.c
24LOCAL_CFLAGS += -DBOOTCHART=1
25endif
26
Nick Kralevich0dbda7e2012-01-18 13:38:34 -080027ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
Nick Kralevichf3c85b22014-06-02 20:56:04 -070028LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1
Nick Kralevich0dbda7e2012-01-18 13:38:34 -080029endif
30
Alex Ray18ccc1b2014-03-06 15:07:42 -080031# Enable ueventd logging
32#LOCAL_CFLAGS += -DLOG_UEVENTS=1
33
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080034LOCAL_MODULE:= init
35
Bernhard Rosenkraenzer84e07fb2014-10-04 01:34:55 +020036# Currently, init doesn't start when built with clang.
37# Needs further investigation.
38LOCAL_CLANG := false
39
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080040LOCAL_FORCE_STATIC_EXECUTABLE := true
41LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
42LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
43
Kenny Rootb5982bf2012-10-16 23:07:05 -070044LOCAL_STATIC_LIBRARIES := \
45 libfs_mgr \
Ken Sumrallbf021b42013-03-19 19:38:44 -070046 liblogwrap \
Kenny Rootb5982bf2012-10-16 23:07:05 -070047 libcutils \
Ken Sumrallbf021b42013-03-19 19:38:44 -070048 liblog \
Kenny Rootb5982bf2012-10-16 23:07:05 -070049 libc \
Geremy Condra3ad3d1c2013-02-22 18:11:41 -080050 libselinux \
51 libmincrypt \
52 libext4_utils_static
Stephen Smalleye46f9d52012-01-13 08:48:47 -050053
Ying Wangdbb78d62014-11-24 15:43:34 -080054# Create symlinks
55LOCAL_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 Ray18ccc1b2014-03-06 15:07:42 -080058
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080059include $(BUILD_EXECUTABLE)