1 Star 0 Fork 1

ddbxzz/PI

forked from p4lang-mirror/PI 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
Antonin Bas 提交于 2021-10-08 17:07 . Remove dependency on libJudy (#561)
package(
default_visibility = ["//visibility:public"],
)
filegroup(
name = "pihdrs",
srcs = glob(["include/**/*.h"]),
visibility = ["//:__subpackages__"],
)
cc_library(
name = "piutils",
srcs = glob(["src/utils/*.c"]) + ["//:pihdrs"],
hdrs = glob(["src/utils/*.h"]),
includes = ["src/utils", "include"],
deps = [],
visibility = ["//:__subpackages__"],
)
cc_library(
name = "pip4info",
srcs = ["src/p4info_int.h", ":pihdrs"]
+ glob(["src/p4info/*.c", "src/p4info/*.h"])
+ glob(["src/config_readers/*.c", "src/config_readers/*.h"]),
hdrs = glob(["include/PI/p4info/*.h"]),
includes = ["include", "src"],
copts = ["-DPI_LOG_ON"],
deps = ["//third_party/cJSON:picjson",
"//third_party:piuthash",
"//lib:pitoolkit",
":piutils"],
)
# using glob looks a bit nasty because of the files we have to exclude, but in
# the absence of a CI for the Bazel build, it is less error-prone that listing
# all files manually.
cc_library(
name = "pi",
srcs = [":pihdrs"]
+ glob(["src/*.c"], exclude=[
"src/pi_notifications_pub.c", "src/pi_rpc_server.c"])
+ glob(["src/*.h"], exclude=[
"src/p4info_int.h", "src/pi_notifications_pub.h"]),
hdrs = glob(["include/PI/*.h", "include/PI/target/*.h"])
+ ["include/PI/int/pi_int.h", "include/PI/int/serialize.h"],
includes = ["include"],
deps = [":pip4info"],
)
cc_library(
name = "pifegeneric",
srcs = ["src/frontends/generic/pi.c"],
hdrs = ["include/PI/frontends/generic/pi.h"],
includes = ["include"],
copts = ["-DPI_LOG_ON"],
deps = [":pi"],
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ddbxzz/PI.git
[email protected]:ddbxzz/PI.git
ddbxzz
PI
PI
main

搜索帮助