Skip to content

Commit

Permalink
Merge pull request #9 from jaqx0r/bazel-build
Browse files Browse the repository at this point in the history
build: Set up bazel to replace SCons.
  • Loading branch information
jaqx0r committed Feb 6, 2024
2 parents fe3cb48 + 0f8d447 commit 15e5569
Show file tree
Hide file tree
Showing 27 changed files with 1,983 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ ylwrap
/input/filtergen/t/factorise
/coverage.info
/coverage_html/
/bazel-bin
/bazel-filtergen
/bazel-out
/bazel-testlogs
44 changes: 44 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package(default_visibility = [":__subpackages__"])

cc_library(
name = "core",
srcs = [
"error.c",
"fg-util.c",
"filter.c",
"icmpent.c",
],
hdrs = [
"error.h",
"filter.h",
"icmpent.h",
"util.h",
],
deps = ["//input:sourcepos"],
)

cc_library(
name = "factoriser",
srcs = ["factoriser.c"],
hdrs = ["factoriser.h"],
)

cc_binary(
name = "filtergen",
srcs = [
"fg-iptrestore.c",
"filtergen.c",
"gen.c",
],
defines = ["VERSION=\\\"TODO\\\""],
deps = [
"//input/filtergen:in_filtergen",
"//input/iptables-save:in_iptables_save",
"//output/cisco:out_cisco",
"//output/filtergen:out_filtergen",
"//output/ipchains:out_ipchains",
"//output/ipfilter:out_ipfilter",
"//output/iptables:out_iptables",
"//output/iptablesrestore:out_iptablesrestore",
],
)
9 changes: 9 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################

bazel_dep(name = "rules_bison", version = "0.2.2")
bazel_dep(name = "rules_flex", version = "0.2.1")
Loading

0 comments on commit 15e5569

Please sign in to comment.