blob: 4d1b77beeb55d85ab605ecb623ca0c1ea4febd0a [file] [log] [blame]
Damien Martin-Guillerezf1ce35f2016-12-21 18:29:04 +01001package(
2 default_visibility = [
3 "//src:__subpackages__",
4 "//third_party/ijar:__subpackages__",
5 ],
6)
7
8licenses(["notice"]) # Apache 2.0
9
10cc_library(
11 name = "zip",
12 srcs = [
13 "zip.cc",
14 ] + select({
15 "//src:windows": [
16 "mapped_file_windows.cc",
17 ],
Damien Martin-Guillerezf1ce35f2016-12-21 18:29:04 +010018 "//conditions:default": [
19 "mapped_file_unix.cc",
20 ],
21 }),
22 hdrs = [
23 "common.h",
24 "mapped_file.h",
25 "zip.h",
26 ],
Laszlo Csomor76a76a72018-10-26 04:58:18 -070027 visibility = [
28 "//src:__subpackages__",
29 "//third_party/ijar:__subpackages__",
30 "//tools/test:__pkg__",
31 ],
Damien Martin-Guillerezf1ce35f2016-12-21 18:29:04 +010032 deps = [
33 ":platform_utils",
34 ":zlib_client",
Laszlo Csomorb2f1e192017-03-03 09:41:53 +000035 ] + select({
36 "//src:windows": [
37 "//src/main/cpp/util:errors",
ccalvarinac69da02018-06-05 15:27:26 -070038 "//src/main/cpp/util:filesystem",
ccalvarin8448f572018-04-06 12:42:09 -070039 "//src/main/cpp/util:logging",
40 "//src/main/cpp/util:strings",
Laszlo Csomorb2f1e192017-03-03 09:41:53 +000041 ],
Laszlo Csomorb2f1e192017-03-03 09:41:53 +000042 "//conditions:default": [
43 ],
44 }),
Damien Martin-Guillerezf1ce35f2016-12-21 18:29:04 +010045)
46
47cc_library(
48 name = "zlib_client",
49 srcs = ["zlib_client.cc"],
50 hdrs = [
51 "common.h",
52 "zlib_client.h",
53 ],
54 deps = ["//third_party/zlib"],
55)
56
57cc_library(
58 name = "platform_utils",
59 srcs = ["platform_utils.cc"],
60 hdrs = [
61 "common.h",
62 "platform_utils.h",
63 ],
64 visibility = ["//visibility:private"],
Laszlo Csomorb2f1e192017-03-03 09:41:53 +000065 deps = [
66 "//src/main/cpp/util:errors",
ccalvarinac69da02018-06-05 15:27:26 -070067 "//src/main/cpp/util:filesystem",
ccalvarin8448f572018-04-06 12:42:09 -070068 "//src/main/cpp/util:logging",
Laszlo Csomorb2f1e192017-03-03 09:41:53 +000069 ],
Damien Martin-Guillerezf1ce35f2016-12-21 18:29:04 +010070)
71
72cc_binary(
73 name = "zipper",
74 srcs = ["zip_main.cc"],
75 visibility = ["//visibility:public"],
76 deps = [":zip"],
77)
78
79cc_binary(
80 name = "ijar",
81 srcs = [
82 "classfile.cc",
83 "ijar.cc",
84 ],
85 visibility = ["//visibility:public"],
86 deps = [":zip"],
87)
88
89filegroup(
90 name = "srcs",
91 srcs = glob(["**"]) + ["//third_party/ijar/test:srcs"],
92 visibility = ["//third_party:__pkg__"],
Laszlo Csomor9f15d152017-03-01 15:55:34 +000093)
Xin Gao33d05f62017-06-21 17:13:23 +020094
95filegroup(
96 name = "embedded_tools",
97 srcs = glob(["**"]),
98 visibility = ["//visibility:public"],
99)