1# Copyright 2005 The Android Open Source Project 2 3LOCAL_PATH:= $(call my-dir) 4 5# -- 6 7ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 8init_options += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1 9else 10init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_DISABLE_SELINUX=0 11endif 12 13init_options += -DLOG_UEVENTS=0 14 15init_cflags += \ 16 $(init_options) \ 17 -Wall -Wextra \ 18 -Wno-unused-parameter \ 19 -Werror \ 20 21init_clang := true 22 23# -- 24 25include $(CLEAR_VARS) 26LOCAL_CPPFLAGS := $(init_cflags) 27LOCAL_SRC_FILES:= \ 28 init_parser.cpp \ 29 log.cpp \ 30 parser.cpp \ 31 util.cpp \ 32 33LOCAL_STATIC_LIBRARIES := libbase 34LOCAL_MODULE := libinit 35LOCAL_CLANG := $(init_clang) 36include $(BUILD_STATIC_LIBRARY) 37 38include $(CLEAR_VARS) 39LOCAL_CPPFLAGS := $(init_cflags) 40LOCAL_SRC_FILES:= \ 41 bootchart.cpp \ 42 builtins.cpp \ 43 devices.cpp \ 44 init.cpp \ 45 keychords.cpp \ 46 property_service.cpp \ 47 signal_handler.cpp \ 48 ueventd.cpp \ 49 ueventd_parser.cpp \ 50 watchdogd.cpp \ 51 52LOCAL_MODULE:= init 53LOCAL_C_INCLUDES += \ 54 system/extras/ext4_utils \ 55 system/core/mkbootimg 56 57LOCAL_FORCE_STATIC_EXECUTABLE := true 58LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 59LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) 60 61LOCAL_STATIC_LIBRARIES := \ 62 libinit \ 63 libfs_mgr \ 64 libsquashfs_utils \ 65 liblogwrap \ 66 libcutils \ 67 libbase \ 68 libext4_utils_static \ 69 libutils \ 70 liblog \ 71 libc \ 72 libselinux \ 73 libmincrypt \ 74 libc++_static \ 75 libdl \ 76 libsparse_static \ 77 libz 78 79# Create symlinks 80LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \ 81 ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \ 82 ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd 83 84LOCAL_CLANG := $(init_clang) 85include $(BUILD_EXECUTABLE) 86 87 88 89 90include $(CLEAR_VARS) 91LOCAL_MODULE := init_tests 92LOCAL_SRC_FILES := \ 93 init_parser_test.cpp \ 94 util_test.cpp \ 95 96LOCAL_SHARED_LIBRARIES += \ 97 libcutils \ 98 libbase \ 99 100LOCAL_STATIC_LIBRARIES := libinit 101LOCAL_CLANG := $(init_clang) 102include $(BUILD_NATIVE_TEST) 103