blob: 80348269e6c77fccdd37faa1b96bf6caea4cb7f2 [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\"",
Steve Muckle2b5f4082019-12-30 16:42:12 -080017 "-UNDEBUG",
Howard Chena8830dc2017-02-16 14:28:08 +080018 ],
Alistair Delva7c6abf82019-10-24 16:44:50 -070019 target: {
20 linux_glibc: {
21 cflags: ["-DHAVE_DECL_STRNDUPA"]
22 }
23 }
24}
25
26cc_library_static {
27 defaults: ["libkmod_cflags_common"],
28 export_include_dirs: ["libkmod"],
29 host_supported: true,
30 name: "libkmod",
31 srcs: [
32 "libkmod/libkmod.c",
Haibo Huangf9d235a2020-10-28 22:24:00 -070033 "libkmod/libkmod-builtin.c",
Alistair Delva7c6abf82019-10-24 16:44:50 -070034 "libkmod/libkmod-file.c",
35 "libkmod/libkmod-module.c",
36 "libkmod/libkmod-config.c",
37 "libkmod/libkmod-index.c",
38 "libkmod/libkmod-elf.c",
39 "libkmod/libkmod-list.c",
40 "libkmod/libkmod-signature.c",
41 "shared/array.c",
42 "shared/scratchbuf.c",
43 "shared/util.c",
44 "shared/hash.c",
45 "shared/strbuf.c",
46 ],
47 visibility: ["//external/igt-gpu-tools"],
48}
49
50cc_binary_host {
51 defaults: ["libkmod_cflags_common"],
52 name: "depmod",
53 srcs: [
54 "tools/port.c",
55 "tools/depmod.c",
56 "tools/kmod.c",
57 "tools/modinfo.c",
58 "tools/rmmod.c",
59 "tools/insert.c",
60 "tools/log.c",
61 "tools/modprobe.c",
62 "tools/static-nodes.c",
63 "tools/insmod.c",
64 "tools/lsmod.c",
65 "tools/remove.c",
66 ],
67 static_libs: ["libkmod"],
Howard Chena8830dc2017-02-16 14:28:08 +080068}