blob: e0eeb2e3a1e5b82c9a826e56947f019609dba41a [file] [log] [blame]
Lorenzo Colittieb92f482019-01-04 14:59:11 +09001cc_defaults {
2 name: "clatd_defaults",
Dan Willemsen1e562182018-11-16 12:52:08 -08003
4 cflags: [
5 "-Wall",
6 "-Werror",
7 "-Wunused-parameter",
8
9 // Bug: http://b/33566695
10 "-Wno-address-of-packed-member",
11 ],
12
Lorenzo Colittieb92f482019-01-04 14:59:11 +090013 // For NETID_UNSET and MARK_UNSET.
Dan Willemsen1e562182018-11-16 12:52:08 -080014 include_dirs: ["bionic/libc/dns/include"],
Lorenzo Colittieb92f482019-01-04 14:59:11 +090015
16 // For NETID_USE_LOCAL_NAMESERVERS.
Dan Willemsen1e562182018-11-16 12:52:08 -080017 header_libs: ["libnetd_client_headers"],
Lorenzo Colittieb92f482019-01-04 14:59:11 +090018}
19
20// Code used both by the daemon and by unit tests.
21filegroup {
22 name: "clatd_common",
23 srcs: [
Lorenzo Colittieb92f482019-01-04 14:59:11 +090024 "config.c",
25 "clatd.c",
26 "dns64.c",
27 "dump.c",
28 "getaddr.c",
29 "icmp.c",
30 "ipv4.c",
31 "ipv6.c",
32 "logging.c",
33 "mtu.c",
34 "netlink_callbacks.c",
35 "netlink_msg.c",
36 "ring.c",
37 "setif.c",
38 "tun.c",
39 "translate.c",
40 ],
41}
42
43// The clat daemon.
44cc_binary {
45 name: "clatd",
46 defaults: ["clatd_defaults"],
47 srcs: [
48 ":clatd_common",
49 "main.c"
50 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080051 static_libs: ["libnl"],
52 shared_libs: [
53 "libcutils",
54 "liblog",
55 "libnetutils",
56 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080057}
58
59// The configuration file.
60prebuilt_etc {
61 name: "clatd.conf",
62 src: "clatd.conf",
63}
64
65// Unit tests.
66cc_test {
67 name: "clatd_test",
Lorenzo Colittieb92f482019-01-04 14:59:11 +090068 defaults: ["clatd_defaults"],
Dan Willemsen1e562182018-11-16 12:52:08 -080069 srcs: [
Lorenzo Colittieb92f482019-01-04 14:59:11 +090070 ":clatd_common",
71 "clatd_test.cpp"
Dan Willemsen1e562182018-11-16 12:52:08 -080072 ],
Lorenzo Colittieb92f482019-01-04 14:59:11 +090073 static_libs: [
74 "libbase",
75 "libnetd_test_tun_interface",
76 "libnl",
77 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080078 shared_libs: [
Lorenzo Colittieb92f482019-01-04 14:59:11 +090079 "libcutils",
Dan Willemsen1e562182018-11-16 12:52:08 -080080 "liblog",
81 "libnetutils",
82 ],
Lorenzo Colitti33351932019-01-04 19:36:51 +090083 test_suites: ["device-tests"],
Dan Willemsen1e562182018-11-16 12:52:08 -080084}
85
86// Microbenchmark.
87cc_test {
88 name: "clatd_microbenchmark",
Lorenzo Colittieb92f482019-01-04 14:59:11 +090089 defaults: ["clatd_defaults"],
Dan Willemsen1e562182018-11-16 12:52:08 -080090 srcs: [
91 "clatd_microbenchmark.c",
Dan Willemsen1e562182018-11-16 12:52:08 -080092 "tun.c",
93 ],
Lorenzo Colitti98de5952019-01-20 11:45:03 +090094 shared_libs: [
95 "libnetutils",
96 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080097}