1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17include $(LOCAL_PATH)/file_lists.mk 18 19# Common variables 20# ======================================================== 21 22libweaveCommonCppExtension := .cc 23libweaveCommonCFlags := -Wall -Werror \ 24 -Wno-char-subscripts -Wno-missing-field-initializers \ 25 -Wno-unused-function -Wno-unused-parameter 26 27libweaveCommonCppFlags := \ 28 -Wno-deprecated-register \ 29 -Wno-sign-compare \ 30 -Wno-sign-promo \ 31 -Wno-non-virtual-dtor \ 32 33libweaveCommonCIncludes := \ 34 $(LOCAL_PATH)/.. \ 35 $(LOCAL_PATH)/include \ 36 $(LOCAL_PATH)/third_party/modp_b64/modp_b64 \ 37 $(LOCAL_PATH)/third_party/libuweave \ 38 external/gtest/include \ 39 40libweaveSharedLibraries := \ 41 libchrome \ 42 libexpat \ 43 libcrypto \ 44 45# libweave-external 46# ======================================================== 47include $(CLEAR_VARS) 48LOCAL_MODULE := libweave-external 49LOCAL_CPP_EXTENSION := $(libweaveCommonCppExtension) 50LOCAL_CFLAGS := $(libweaveCommonCFlags) 51LOCAL_CPPFLAGS := $(libweaveCommonCppFlags) 52LOCAL_C_INCLUDES := $(libweaveCommonCIncludes) 53LOCAL_SHARED_LIBRARIES := $(libweaveSharedLibraries) 54LOCAL_STATIC_LIBRARIES := 55LOCAL_CLANG := true 56LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/external 57 58LOCAL_SRC_FILES := \ 59 $(THIRD_PARTY_CHROMIUM_CRYPTO_SRC_FILES) \ 60 $(THIRD_PARTY_MODP_B64_SRC_FILES) \ 61 $(THIRD_PARTY_LIBUWEAVE_SRC_FILES) 62 63include $(BUILD_STATIC_LIBRARY) 64 65# libweave-common 66# ======================================================== 67include $(CLEAR_VARS) 68LOCAL_MODULE := libweave-common 69LOCAL_CPP_EXTENSION := $(libweaveCommonCppExtension) 70LOCAL_CFLAGS := $(libweaveCommonCFlags) 71LOCAL_CPPFLAGS := $(libweaveCommonCppFlags) 72LOCAL_C_INCLUDES := $(libweaveCommonCIncludes) 73LOCAL_SHARED_LIBRARIES := $(libweaveSharedLibraries) 74LOCAL_STATIC_LIBRARIES := libweave-external 75LOCAL_CLANG := true 76LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 77 78LOCAL_SRC_FILES := $(WEAVE_SRC_FILES) 79 80include $(BUILD_STATIC_LIBRARY) 81 82# libweave-test 83# ======================================================== 84include $(CLEAR_VARS) 85LOCAL_MODULE := libweave-test 86LOCAL_CPP_EXTENSION := $(libweaveCommonCppExtension) 87LOCAL_CFLAGS := $(libweaveCommonCFlags) 88LOCAL_CPPFLAGS := $(libweaveCommonCppFlags) 89LOCAL_C_INCLUDES := \ 90 $(libweaveCommonCIncludes) \ 91 external/gmock/include \ 92 93LOCAL_SHARED_LIBRARIES := $(libweaveSharedLibraries) 94LOCAL_STATIC_LIBRARIES := libgtest libgmock 95LOCAL_CLANG := true 96LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 97 98LOCAL_SRC_FILES := $(WEAVE_TEST_SRC_FILES) 99 100include $(BUILD_STATIC_LIBRARY) 101 102# libweave 103# ======================================================== 104include $(CLEAR_VARS) 105LOCAL_MODULE := libweave 106LOCAL_CPP_EXTENSION := $(libweaveCommonCppExtension) 107LOCAL_CFLAGS := $(libweaveCommonCFlags) 108LOCAL_CPPFLAGS := $(libweaveCommonCppFlags) 109LOCAL_C_INCLUDES := $(libweaveCommonCIncludes) 110LOCAL_SHARED_LIBRARIES := $(libweaveSharedLibraries) 111LOCAL_WHOLE_STATIC_LIBRARIES := libweave-common libweave-external 112LOCAL_CLANG := true 113LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 114 115LOCAL_SRC_FILES := 116 117include $(BUILD_SHARED_LIBRARY) 118 119# libweave_test 120# ======================================================== 121include $(CLEAR_VARS) 122LOCAL_MODULE := libweave_test 123LOCAL_MODULE_TAGS := eng 124LOCAL_CPP_EXTENSION := $(libweaveCommonCppExtension) 125LOCAL_CFLAGS := $(libweaveCommonCFlags) 126LOCAL_CPPFLAGS := $(libweaveCommonCppFlags) 127LOCAL_C_INCLUDES := \ 128 $(libweaveCommonCIncludes) \ 129 external/gmock/include \ 130 131LOCAL_SHARED_LIBRARIES := \ 132 $(libweaveSharedLibraries) \ 133 134LOCAL_STATIC_LIBRARIES := \ 135 libweave-common \ 136 libweave-external \ 137 libweave-test \ 138 libgtest libgmock \ 139 libchrome_test_helpers \ 140 141LOCAL_CLANG := true 142LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 143 144LOCAL_SRC_FILES := \ 145 $(WEAVE_UNITTEST_SRC_FILES) \ 146 $(THIRD_PARTY_CHROMIUM_CRYPTO_UNITTEST_SRC_FILES) 147 148include $(BUILD_NATIVE_TEST) 149