Joe Onorato | 5dcbc6c | 2017-08-29 15:13:58 -0700 | [diff] [blame^] | 1 | # Copyright (C) 2017 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 | |
| 15 | LOCAL_PATH:= $(call my-dir) |
| 16 | |
| 17 | # ========= |
| 18 | # statsd |
| 19 | # ========= |
| 20 | |
| 21 | include $(CLEAR_VARS) |
| 22 | |
| 23 | LOCAL_MODULE := statsd |
| 24 | |
| 25 | LOCAL_SRC_FILES := \ |
| 26 | ../../core/java/android/os/IStatsManager.aidl \ |
| 27 | src/StatsService.cpp \ |
| 28 | src/LogEntryPrinter.cpp \ |
| 29 | src/LogReader.cpp \ |
| 30 | src/main.cpp |
| 31 | |
| 32 | LOCAL_CFLAGS += \ |
| 33 | -Wall \ |
| 34 | -Werror \ |
| 35 | -Wno-missing-field-initializers \ |
| 36 | -Wno-unused-variable \ |
| 37 | -Wno-unused-function \ |
| 38 | -Wno-unused-parameter |
| 39 | |
| 40 | ifeq (debug,) |
| 41 | LOCAL_CFLAGS += \ |
| 42 | -g -O0 |
| 43 | else |
| 44 | # optimize for size (protobuf glop can get big) |
| 45 | LOCAL_CFLAGS += \ |
| 46 | -Os |
| 47 | endif |
| 48 | |
| 49 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/../../core/java |
| 50 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/src |
| 51 | |
| 52 | LOCAL_SHARED_LIBRARIES := \ |
| 53 | libbase \ |
| 54 | libbinder \ |
| 55 | libcutils \ |
| 56 | libincident \ |
| 57 | liblog \ |
| 58 | libselinux \ |
| 59 | libutils |
| 60 | |
| 61 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 62 | |
| 63 | #LOCAL_INIT_RC := statsd.rc |
| 64 | |
| 65 | include $(BUILD_EXECUTABLE) |
| 66 | |
| 67 | # ============== |
| 68 | # statsd_test |
| 69 | # ============== |
| 70 | |
| 71 | include $(CLEAR_VARS) |
| 72 | |
| 73 | LOCAL_MODULE := statsd_test |
| 74 | LOCAL_COMPATIBILITY_SUITE := device-tests |
| 75 | LOCAL_MODULE_TAGS := tests |
| 76 | |
| 77 | LOCAL_CFLAGS += \ |
| 78 | -Wall \ |
| 79 | -Werror \ |
| 80 | -Wno-missing-field-initializers \ |
| 81 | -Wno-unused-variable \ |
| 82 | -Wno-unused-function \ |
| 83 | -Wno-unused-parameter |
| 84 | |
| 85 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/src |
| 86 | |
| 87 | LOCAL_SRC_FILES := \ |
| 88 | ../../core/java/android/os/IStatsManager.aidl \ |
| 89 | src/StatsService.cpp \ |
| 90 | src/LogEntryPrinter.cpp \ |
| 91 | src/LogReader.cpp \ |
| 92 | tests/LogReader_test.cpp \ |
| 93 | |
| 94 | LOCAL_STATIC_LIBRARIES := \ |
| 95 | libgmock \ |
| 96 | |
| 97 | LOCAL_SHARED_LIBRARIES := \ |
| 98 | libbase \ |
| 99 | libbinder \ |
| 100 | libcutils \ |
| 101 | liblog \ |
| 102 | libselinux \ |
| 103 | libutils |
| 104 | |
| 105 | include $(BUILD_NATIVE_TEST) |
| 106 | |