1# 2# Copyright (C) 2015 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17LOCAL_PATH := $(call my-dir) 18 19libnativepower_CommonCFlags := -Wall -Werror -Wno-unused-parameter 20libnativepower_CommonCFlags += -Wno-sign-promo # for libchrome 21libnativepower_CommonCIncludes := $(LOCAL_PATH)/../include 22libnativepower_CommonSharedLibraries := \ 23 libbinder \ 24 libbinderwrapper \ 25 libbrillo \ 26 libchrome \ 27 libpowermanager \ 28 libutils \ 29 30# libnativepower shared library 31# ======================================================== 32 33include $(CLEAR_VARS) 34LOCAL_MODULE := libnativepower 35LOCAL_CPP_EXTENSION := .cc 36LOCAL_CFLAGS := $(libnativepower_CommonCFlags) 37LOCAL_C_INCLUDES := $(libnativepower_CommonCIncludes) 38LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include 39LOCAL_SHARED_LIBRARIES := $(libnativepower_CommonSharedLibraries) 40LOCAL_SRC_FILES := \ 41 power_manager_client.cc \ 42 wake_lock.cc \ 43 44include $(BUILD_SHARED_LIBRARY) 45 46# libnativepower_tests executable 47# ======================================================== 48 49include $(CLEAR_VARS) 50LOCAL_MODULE := libnativepower_tests 51ifdef BRILLO 52 LOCAL_MODULE_TAGS := eng 53endif 54LOCAL_CPP_EXTENSION := .cc 55LOCAL_CFLAGS := $(libnativepower_CommonCFlags) 56LOCAL_C_INCLUDES := $(libnativepower_CommonCIncludes) 57LOCAL_STATIC_LIBRARIES := libgtest libBionicGtestMain 58LOCAL_SHARED_LIBRARIES := \ 59 $(libnativepower_CommonSharedLibraries) \ 60 libbinderwrapper_test_support \ 61 libnativepower \ 62 libnativepower_test_support \ 63 64LOCAL_SRC_FILES := \ 65 power_manager_client_unittest.cc \ 66 wake_lock_unittest.cc \ 67 68include $(BUILD_NATIVE_TEST) 69