blob: 2ebdd16a345a8ea5da447a452d84d17f8fd25202 [file] [log] [blame]
Alistair Delva7c6abf82019-10-24 16:44:50 -07001cc_defaults {
2 name: "libkmod_cflags_common",
Howard Chena8830dc2017-02-16 14:28:08 +08003 local_include_dirs: ["port-gnu"],
4 cflags: [
5 "-include config.h",
6 "-ffunction-sections",
7 "-fdata-sections",
8 "-Wall",
Chih-Hung Hsieh84d0ce62017-09-28 13:29:55 -07009 "-Werror",
Elliott Hughes3548f5a2018-10-29 13:51:48 -070010 "-Wno-format",
Howard Chena8830dc2017-02-16 14:28:08 +080011 "-Wno-unused-parameter",
12 "-Wno-unused-variable",
13 "-Dsecure_getenv=getenv",
14 "-DHAVE_CONFIG_H",
15 "-DANOTHER_BRICK_IN_THE",
16 "-DSYSCONFDIR=\"/tmp\"",
17 ],
Alistair Delva7c6abf82019-10-24 16:44:50 -070018 target: {
19 linux_glibc: {
20 cflags: ["-DHAVE_DECL_STRNDUPA"]
21 }
22 }
23}
24
25cc_library_static {
26 defaults: ["libkmod_cflags_common"],
27 export_include_dirs: ["libkmod"],
28 host_supported: true,
29 name: "libkmod",
30 srcs: [
31 "libkmod/libkmod.c",
32 "libkmod/libkmod-file.c",
33 "libkmod/libkmod-module.c",
34 "libkmod/libkmod-config.c",
35 "libkmod/libkmod-index.c",
36 "libkmod/libkmod-elf.c",
37 "libkmod/libkmod-list.c",
38 "libkmod/libkmod-signature.c",
39 "shared/array.c",
40 "shared/scratchbuf.c",
41 "shared/util.c",
42 "shared/hash.c",
43 "shared/strbuf.c",
44 ],
45 visibility: ["//external/igt-gpu-tools"],
46}
47
48cc_binary_host {
49 defaults: ["libkmod_cflags_common"],
50 name: "depmod",
51 srcs: [
52 "tools/port.c",
53 "tools/depmod.c",
54 "tools/kmod.c",
55 "tools/modinfo.c",
56 "tools/rmmod.c",
57 "tools/insert.c",
58 "tools/log.c",
59 "tools/modprobe.c",
60 "tools/static-nodes.c",
61 "tools/insmod.c",
62 "tools/lsmod.c",
63 "tools/remove.c",
64 ],
65 static_libs: ["libkmod"],
Howard Chena8830dc2017-02-16 14:28:08 +080066}