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