@@ -3,44 +3,76 @@ load("//tools/project:build_defs.bzl", "project")
33
44project (license = "gpl3-https" )
55
6+ genrule (
7+ name = "toxcore_headers" ,
8+ srcs = ["//c-toxcore/toxcore:public" ],
9+ outs = [
10+ "tox/toxcore/os_log.h" ,
11+ "tox/toxcore/os_memory.h" ,
12+ "tox/toxcore/os_network.h" ,
13+ "tox/toxcore/os_random.h" ,
14+ "tox/toxcore/os_system.h" ,
15+ "tox/toxcore/tox.h" ,
16+ "tox/toxcore/tox_attributes.h" ,
17+ "tox/toxcore/tox_dispatch.h" ,
18+ "tox/toxcore/tox_events.h" ,
19+ "tox/toxcore/tox_log.h" ,
20+ "tox/toxcore/tox_log_impl.h" ,
21+ "tox/toxcore/tox_log_level.h" ,
22+ "tox/toxcore/tox_memory.h" ,
23+ "tox/toxcore/tox_memory_impl.h" ,
24+ "tox/toxcore/tox_network.h" ,
25+ "tox/toxcore/tox_network_impl.h" ,
26+ "tox/toxcore/tox_options.h" ,
27+ "tox/toxcore/tox_random.h" ,
28+ "tox/toxcore/tox_random_impl.h" ,
29+ "tox/toxcore/tox_system.h" ,
30+ "tox/toxcore/tox_system_impl.h" ,
31+ "tox/toxcore/tox_time.h" ,
32+ "tox/toxcore/tox_time_impl.h" ,
33+ ],
34+ cmd = "cp $(locations //c-toxcore/toxcore:public) $(GENDIR)/c-toxcore/tox/toxcore/" ,
35+ visibility = ["//visibility:public" ],
36+ )
37+
638genrule (
739 name = "public_headers" ,
840 srcs = [
41+ "tox.h" ,
42+ "toxav.h" ,
43+ "toxencryptsave.h" ,
944 "//c-toxcore/toxav:toxav.h" ,
10- "//c-toxcore/toxcore:tox.h" ,
11- "//c-toxcore/toxcore:tox_dispatch.h" ,
12- "//c-toxcore/toxcore:tox_events.h" ,
13- "//c-toxcore/toxcore:tox_options.h" ,
14- "//c-toxcore/toxcore:tox_private.h" ,
15- "//c-toxcore/toxcore:tox_types.h" ,
1645 "//c-toxcore/toxencryptsave:toxencryptsave.h" ,
1746 ],
1847 outs = [
19- "tox/toxav.h" ,
2048 "tox/tox.h" ,
21- "tox/tox_dispatch.h" ,
22- "tox/tox_events.h" ,
23- "tox/tox_options.h" ,
24- "tox/tox_private.h" ,
25- "tox/tox_types.h" ,
49+ "tox/toxav.h" ,
50+ "tox/toxav/toxav.h" ,
2651 "tox/toxencryptsave.h" ,
52+ "tox/toxencryptsave/toxencryptsave.h" ,
2753 ],
2854 cmd = """
29- cp $(location //c-toxcore/toxav:toxav.h) $(GENDIR)/c-toxcore/tox/toxav.h
30- cp $(location //c-toxcore/toxcore:tox.h) $(GENDIR)/c-toxcore/tox/tox.h
31- cp $(location //c-toxcore/toxcore:tox_dispatch.h) $(GENDIR)/c-toxcore/tox/tox_dispatch.h
32- cp $(location //c-toxcore/toxcore:tox_events.h) $(GENDIR)/c-toxcore/tox/tox_events.h
33- cp $(location //c-toxcore/toxcore:tox_options.h) $(GENDIR)/c-toxcore/tox/tox_options.h
34- cp $(location //c-toxcore/toxcore:tox_private.h) $(GENDIR)/c-toxcore/tox/tox_private.h
35- cp $(location //c-toxcore/toxcore:tox_types.h) $(GENDIR)/c-toxcore/tox/tox_types.h
36- cp $(location //c-toxcore/toxencryptsave:toxencryptsave.h) $(GENDIR)/c-toxcore/tox/toxencryptsave.h
55+ cp $(location toxav.h) $(GENDIR)/c-toxcore/tox/toxav.h
56+ cp $(location tox.h) $(GENDIR)/c-toxcore/tox/tox.h
57+ cp $(location toxencryptsave.h) $(GENDIR)/c-toxcore/tox/toxencryptsave.h
58+ cp $(location //c-toxcore/toxav:toxav.h) $(GENDIR)/c-toxcore/tox/toxav/toxav.h
59+ cp $(location //c-toxcore/toxencryptsave:toxencryptsave.h) $(GENDIR)/c-toxcore/tox/toxencryptsave/toxencryptsave.h
3760 """ ,
3861 visibility = ["//visibility:public" ],
3962)
4063
64+ filegroup (
65+ name = "public" ,
66+ srcs = [
67+ ":public_headers" ,
68+ ":toxcore_headers" ,
69+ ],
70+ visibility = ["//visibility:public" ],
71+ )
72+
4173cc_library (
4274 name = "c-toxcore" ,
43- hdrs = [":public_headers " ],
75+ hdrs = [":public " ],
4476 includes = ["." ],
4577 visibility = ["//visibility:public" ],
4678 deps = [
0 commit comments