• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cc_defaults {
2    name: "libkmod_cflags_common",
3    local_include_dirs: ["port-gnu"],
4    cflags: [
5        "-include config.h",
6        "-ffunction-sections",
7        "-fdata-sections",
8        "-Wall",
9        "-Werror",
10        "-Wno-format",
11        "-Wno-unused-parameter",
12        "-Wno-unused-variable",
13        "-Dsecure_getenv=getenv",
14        "-DHAVE_CONFIG_H",
15        "-DANOTHER_BRICK_IN_THE",
16        "-DSYSCONFDIR=\"/tmp\"",
17        "-UNDEBUG",
18    ],
19    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",
33        "libkmod/libkmod-file.c",
34        "libkmod/libkmod-module.c",
35        "libkmod/libkmod-config.c",
36        "libkmod/libkmod-index.c",
37        "libkmod/libkmod-elf.c",
38        "libkmod/libkmod-list.c",
39        "libkmod/libkmod-signature.c",
40        "shared/array.c",
41        "shared/scratchbuf.c",
42        "shared/util.c",
43        "shared/hash.c",
44        "shared/strbuf.c",
45    ],
46    visibility: ["//external/igt-gpu-tools"],
47}
48
49cc_binary_host {
50    defaults: ["libkmod_cflags_common"],
51    name: "depmod",
52    srcs: [
53        "tools/port.c",
54        "tools/depmod.c",
55        "tools/kmod.c",
56        "tools/modinfo.c",
57        "tools/rmmod.c",
58        "tools/insert.c",
59        "tools/log.c",
60        "tools/modprobe.c",
61        "tools/static-nodes.c",
62        "tools/insmod.c",
63        "tools/lsmod.c",
64        "tools/remove.c",
65    ],
66    static_libs: ["libkmod"],
67}
68