-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows users of the Bazel build tool https://bazel.build to build zopfli as a library dependency or a binary within their Bazel workspace.
- Loading branch information
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
"Bazel module declaration" | ||
module( | ||
name = "zopfli", | ||
version = "1.0.3", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Marker that this is the root of a Bazel workspace |