Home | History | Annotate | Download | only in client
      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 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 libnativepower_CommonCFlags := -Wall -Werror -Wno-unused-parameter
     20 libnativepower_CommonCFlags += -Wno-sign-promo  # for libchrome
     21 libnativepower_CommonCIncludes := $(LOCAL_PATH)/../include
     22 libnativepower_CommonSharedLibraries := \
     23   libbinder \
     24   libbinderwrapper \
     25   libbrillo \
     26   libchrome \
     27   libpowermanager \
     28   libutils \
     29 
     30 # libnativepower shared library
     31 # ========================================================
     32 
     33 include $(CLEAR_VARS)
     34 LOCAL_MODULE := libnativepower
     35 LOCAL_CPP_EXTENSION := .cc
     36 LOCAL_CFLAGS := $(libnativepower_CommonCFlags)
     37 LOCAL_C_INCLUDES := $(libnativepower_CommonCIncludes)
     38 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include
     39 LOCAL_SHARED_LIBRARIES := $(libnativepower_CommonSharedLibraries)
     40 LOCAL_SRC_FILES := \
     41   power_manager_client.cc \
     42   wake_lock.cc \
     43 
     44 include $(BUILD_SHARED_LIBRARY)
     45 
     46 # libnativepower_tests executable
     47 # ========================================================
     48 
     49 include $(CLEAR_VARS)
     50 LOCAL_MODULE := libnativepower_tests
     51 ifdef BRILLO
     52   LOCAL_MODULE_TAGS := eng
     53 endif
     54 LOCAL_CPP_EXTENSION := .cc
     55 LOCAL_CFLAGS := $(libnativepower_CommonCFlags)
     56 LOCAL_C_INCLUDES := $(libnativepower_CommonCIncludes)
     57 LOCAL_STATIC_LIBRARIES := libgtest libBionicGtestMain
     58 LOCAL_SHARED_LIBRARIES := \
     59   $(libnativepower_CommonSharedLibraries) \
     60   libbinderwrapper_test_support \
     61   libnativepower \
     62   libnativepower_test_support \
     63 
     64 LOCAL_SRC_FILES := \
     65   power_manager_client_unittest.cc \
     66   wake_lock_unittest.cc \
     67 
     68 include $(BUILD_NATIVE_TEST)
     69