summaryrefslogtreecommitdiff
path: root/Android.bp
blob: 996ae85dfb137d88ad8fa4111db76adfd716fa13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/**
 * Copyright (C) 2019  Advanced Driver Information Technology.
 * This code is developed by Advanced Driver Information Technology.
 * Copyright of Advanced Driver Information Technology, Bosch and DENSO.
 *
 * This file is part of GENIVI Project Dlt - Diagnostic Log and Trace console apps.
 *
 *
 * \copyright
 * This Source Code Form is subject to the terms of the
 * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * For further information see http://www.genivi.org/.
 */

cc_defaults {
    name: "dlt_defaults",
    vendor: true,

    local_include_dirs: [
        "include/dlt",
    ],

    generated_headers: ["dlt_version_header",
                        "dlt_user_header"],

    cflags: [
        "-DDLT_DAEMON_USE_UNIX_SOCKET_IPC",
        "-DDLT_LIB_USE_UNIX_SOCKET_IPC",
        "-DCONFIGURATION_FILES_DIR=\"/vendor/etc\"",
        "-DDLT_USER_IPC_PATH=\"/data/local/tmp\"",
    ] + [
        "-Wno-unused-parameter",
        "-W",
        "-Wall",
    ],
}

// Generate dlt_version.h without Cmake
genrule {
    name: "dlt_version_header",
    tool_files: ["util/create_dlt_version_h.py"],
    srcs: [
        "CMakeLists.txt",
        "cmake/dlt_version.h.cmake",
    ],
    cmd: "$(location util/create_dlt_version_h.py) $(in) $(out)",
    out: ["dlt_version.h"],
}

// Generate dlt_user.h without Cmake
genrule {
    name: "dlt_user_header",
    tool_files: ["util/create_dlt_user_h.py"],
    srcs: [
        "include/dlt/dlt_user.h.in",
    ],
    cmd: "$(location util/create_dlt_user_h.py) $(in) $(out)",
    out: ["dlt_user.h"],
}

cc_binary {

    name: "dlt-daemon",
    defaults: ["dlt_defaults"],

    init_rc: [
        "src/daemon/dlt-daemon.rc",
    ],

    local_include_dirs: [
        "src/daemon",
        "src/gateway",
        "src/lib",
        "src/shared",
        "src/offlinelogstorage",
    ],

    srcs: [
        "src/daemon/dlt-daemon.c",
        "src/daemon/dlt_daemon_client.c",
        "src/daemon/dlt_daemon_common.c",
        "src/daemon/dlt_daemon_connection.c",
        "src/daemon/dlt_daemon_event_handler.c",
        "src/daemon/dlt_daemon_offline_logstorage.c",
        "src/daemon/dlt_daemon_serial.c",
        "src/daemon/dlt_daemon_socket.c",
        "src/daemon/dlt_daemon_unix_socket.c",
        "src/gateway/dlt_gateway.c",
        "src/lib/dlt_client.c",
        "src/shared/dlt_common.c",
        "src/shared/dlt_config_file_parser.c",
        "src/shared/dlt_offline_trace.c",
        "src/shared/dlt_protocol.c",
        "src/shared/dlt_user_shared.c",
        "src/offlinelogstorage/dlt_offline_logstorage.c",
        "src/offlinelogstorage/dlt_offline_logstorage_behavior.c",
    ],

    shared_libs: [
        "libc",
        "libutils",
        "libcutils",
    ],
}

cc_library_shared {
    name: "libdlt",
    defaults: ["dlt_defaults"],

    local_include_dirs: [
        "src/lib",
        "src/shared",
    ],

    export_include_dirs: [
        "include/dlt",
    ],

    export_generated_headers: [
        "dlt_version_header",
        "dlt_user_header"
    ],

    srcs: [
        "src/lib/dlt_client.c",
        "src/lib/dlt_env_ll.c",
        "src/lib/dlt_filetransfer.c",
        "src/lib/dlt_user.c",
        "src/shared/dlt_common.c",
        "src/shared/dlt_protocol.c",
        "src/shared/dlt_user_shared.c",
    ],
}

cc_binary {

    name: "dlt-example-user",
    defaults: ["dlt_defaults"],

    srcs: [
        "src/examples/dlt-example-user.c",
    ],

    shared_libs: [
        "libc",
        "libdlt",
    ],
}

cc_binary {

    name: "dlt-receive",
    defaults: ["dlt_defaults"],

    srcs: [
        "src/console/dlt-receive.c",
    ],

    shared_libs: [
        "libc",
        "libdlt",
    ],
}

cc_binary {

    name: "dlt-logd-converter",
    defaults: ["dlt_defaults"],

    srcs: [
        "src/android/dlt-logd-converter.cpp",
    ],
    init_rc: [
        "src/android/dlt-logd-converter.rc",
    ],

    cflags: [
        "-Wextra",
        "-Wpedantic",
        "-std=c++14",
    ],
    shared_libs: [
        "libdlt",
        "liblog",
    ],
    include_dirs: [
        "system/core/include",
    ],
}

// vim: ft=python