Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.2.0
22 changes: 22 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cc_library(
# Named to produce "libzopfli.{a,so}"
# avoiding https://github.com/bazelbuild/bazel-central-registry/issues/716
name = "zopfli",
srcs = glob(["src/zopfli/*.c"], exclude = ["**/*_bin.c"]),
hdrs = glob(["src/zopfli/*.h"]),
# From the README:
# Build instructions:
linkopts = ["-lm"],
strip_include_prefix = "src/",
visibility = ["//visibility:public"],
)

cc_binary(
name = "bin",
srcs = ["src/zopfli/zopfli_bin.c"],
# To build zopfli, compile all .c source files under src/zopfli to a single binary
# with C, and link to the standard C math library, e.g.:
# gcc src/zopfli/*.c -O2 -W -Wall -Wextra -Wno-unused-function -ansi -pedantic -lm -o zopfli
copts = ["-O2", "-W", "-Wall", "-Wextra", "-Wno-unused-function", "-ansi", "-pedantic"],
deps = [":zopfli"],
)
5 changes: 5 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"Bazel module declaration"
module(
name = "zopfli",
version = "1.0.3",
)
1 change: 1 addition & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Marker that this is the root of a Bazel workspace