blob: 7f28a3c69a7302f3eef9ddc9a26e97236e7cae2c [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: [
24 "checksum.c",
25 "config.c",
26 "clatd.c",
27 "dns64.c",
28 "dump.c",
29 "getaddr.c",
30 "icmp.c",
31 "ipv4.c",
32 "ipv6.c",
33 "logging.c",
34 "mtu.c",
35 "netlink_callbacks.c",
36 "netlink_msg.c",
37 "ring.c",
38 "setif.c",
39 "tun.c",
40 "translate.c",
41 ],
42}
43
44// The clat daemon.
45cc_binary {
46 name: "clatd",
47 defaults: ["clatd_defaults"],
48 srcs: [
49 ":clatd_common",
50 "main.c"
51 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080052 static_libs: ["libnl"],
53 shared_libs: [
54 "libcutils",
55 "liblog",
56 "libnetutils",
57 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080058}
59
60// The configuration file.
61prebuilt_etc {
62 name: "clatd.conf",
63 src: "clatd.conf",
64}
65
66// Unit tests.
67cc_test {
68 name: "clatd_test",
Lorenzo Colittieb92f482019-01-04 14:59:11 +090069 defaults: ["clatd_defaults"],
Dan Willemsen1e562182018-11-16 12:52:08 -080070 srcs: [
Lorenzo Colittieb92f482019-01-04 14:59:11 +090071 ":clatd_common",
72 "clatd_test.cpp"
Dan Willemsen1e562182018-11-16 12:52:08 -080073 ],
Lorenzo Colittieb92f482019-01-04 14:59:11 +090074 static_libs: [
75 "libbase",
76 "libnetd_test_tun_interface",
77 "libnl",
78 ],
Dan Willemsen1e562182018-11-16 12:52:08 -080079 shared_libs: [
Lorenzo Colittieb92f482019-01-04 14:59:11 +090080 "libcutils",
Dan Willemsen1e562182018-11-16 12:52:08 -080081 "liblog",
82 "libnetutils",
83 ],
84}
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",
92 "checksum.c",
93 "tun.c",
94 ],
95}