diff options
author | Bertrand Simonnet | 2015-08-11 13:05:35 -0500 |
---|---|---|
committer | Gerrit Code Review | 2015-08-11 13:05:35 -0500 |
commit | 3670eab0ba12471b8eddb894679cac824779dcb1 (patch) | |
tree | 8369a0473193ea107a18e9df6a2fc7b529290b6a | |
parent | e329a3ec1b210d65ea33d67df1928dbffdb1d2d4 (diff) | |
parent | ed6ca6f8c69745a17499e38e8d6a6554802e100a (diff) | |
download | platform-system-core-3670eab0ba12471b8eddb894679cac824779dcb1.tar.gz platform-system-core-3670eab0ba12471b8eddb894679cac824779dcb1.tar.xz platform-system-core-3670eab0ba12471b8eddb894679cac824779dcb1.zip |
Merge "metricsd: Add Android.mk."
-rw-r--r-- | metricsd/Android.mk | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/metricsd/Android.mk b/metricsd/Android.mk new file mode 100644 index 000000000..17fb27848 --- /dev/null +++ b/metricsd/Android.mk | |||
@@ -0,0 +1,112 @@ | |||
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 | |||
15 | LOCAL_PATH := $(call my-dir) | ||
16 | |||
17 | metrics_cpp_extension := .cc | ||
18 | libmetrics_sources := \ | ||
19 | c_metrics_library.cc \ | ||
20 | metrics_library.cc \ | ||
21 | serialization/metric_sample.cc \ | ||
22 | serialization/serialization_utils.cc | ||
23 | |||
24 | metrics_client_sources := \ | ||
25 | metrics_client.cc | ||
26 | |||
27 | metrics_daemon_sources := \ | ||
28 | metrics_daemon.cc \ | ||
29 | metrics_daemon_main.cc \ | ||
30 | persistent_integer.cc \ | ||
31 | uploader/metrics_hashes.cc \ | ||
32 | uploader/metrics_log_base.cc \ | ||
33 | uploader/metrics_log.cc \ | ||
34 | uploader/sender_http.cc \ | ||
35 | uploader/system_profile_cache.cc \ | ||
36 | uploader/upload_service.cc \ | ||
37 | serialization/metric_sample.cc \ | ||
38 | serialization/serialization_utils.cc | ||
39 | |||
40 | metrics_CFLAGS := -Wall \ | ||
41 | -D__BRILLO__ \ | ||
42 | -Wno-char-subscripts \ | ||
43 | -Wno-missing-field-initializers \ | ||
44 | -Wno-unused-function \ | ||
45 | -Wno-unused-parameter \ | ||
46 | -Werror \ | ||
47 | -fvisibility=default | ||
48 | metrics_CPPFLAGS := -Wno-non-virtual-dtor \ | ||
49 | -Wno-sign-promo \ | ||
50 | -Wno-strict-aliasing \ | ||
51 | -fvisibility=default | ||
52 | metrics_includes := external/gtest/include \ | ||
53 | $(LOCAL_PATH)/include | ||
54 | metrics_shared_libraries := libchrome libchromeos | ||
55 | |||
56 | # Shared library for metrics. | ||
57 | # ======================================================== | ||
58 | include $(CLEAR_VARS) | ||
59 | LOCAL_MODULE := libmetrics | ||
60 | LOCAL_C_INCLUDES := $(metrics_includes) | ||
61 | LOCAL_CFLAGS := $(metrics_CFLAGS) | ||
62 | LOCAL_CPP_EXTENSION := $(metrics_cpp_extension) | ||
63 | LOCAL_CPPFLAGS := $(metrics_CPPFLAGS) | ||
64 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include | ||
65 | LOCAL_SHARED_LIBRARIES := $(metrics_shared_libraries) | ||
66 | LOCAL_SRC_FILES := $(libmetrics_sources) | ||
67 | include $(BUILD_SHARED_LIBRARY) | ||
68 | |||
69 | # CLI client for metrics. | ||
70 | # ======================================================== | ||
71 | include $(CLEAR_VARS) | ||
72 | LOCAL_MODULE := metrics_client | ||
73 | LOCAL_C_INCLUDES := $(metrics_includes) | ||
74 | LOCAL_CFLAGS := $(metrics_CFLAGS) | ||
75 | LOCAL_CPP_EXTENSION := $(metrics_cpp_extension) | ||
76 | LOCAL_CPPFLAGS := $(metrics_CPPFLAGS) | ||
77 | LOCAL_SHARED_LIBRARIES := $(metrics_shared_libraries) \ | ||
78 | libmetrics | ||
79 | LOCAL_SRC_FILES := $(metrics_client_sources) | ||
80 | include $(BUILD_EXECUTABLE) | ||
81 | |||
82 | # Protobuf library for metrics_daemon. | ||
83 | # ======================================================== | ||
84 | include $(CLEAR_VARS) | ||
85 | LOCAL_MODULE := metrics_daemon_protos | ||
86 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES | ||
87 | generated_sources_dir := $(call local-generated-sources-dir) | ||
88 | LOCAL_EXPORT_C_INCLUDE_DIRS += \ | ||
89 | $(generated_sources_dir)/proto/system/core/metricsd | ||
90 | LOCAL_SRC_FILES := $(call all-proto-files-under,uploader/proto) | ||
91 | LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-lite | ||
92 | include $(BUILD_STATIC_LIBRARY) | ||
93 | |||
94 | # metrics daemon. | ||
95 | # ======================================================== | ||
96 | include $(CLEAR_VARS) | ||
97 | LOCAL_MODULE := metrics_daemon | ||
98 | LOCAL_C_INCLUDES := $(metrics_includes) \ | ||
99 | external/libchromeos | ||
100 | LOCAL_CFLAGS := $(metrics_CFLAGS) | ||
101 | LOCAL_CPP_EXTENSION := $(metrics_cpp_extension) | ||
102 | LOCAL_CPPFLAGS := $(metrics_CPPFLAGS) | ||
103 | LOCAL_RTTI_FLAG := -frtti | ||
104 | LOCAL_SHARED_LIBRARIES := $(metrics_shared_libraries) \ | ||
105 | libmetrics \ | ||
106 | libprotobuf-cpp-lite \ | ||
107 | libchromeos-http \ | ||
108 | libchromeos-dbus \ | ||
109 | libdbus | ||
110 | LOCAL_SRC_FILES := $(metrics_daemon_sources) | ||
111 | LOCAL_STATIC_LIBRARIES := metrics_daemon_protos | ||
112 | include $(BUILD_EXECUTABLE) | ||