forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.zig
33 lines (32 loc) · 844 Bytes
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const lib = b.addStaticLibrary(.{
.name = "z",
.target = b.standardTargetOptions(.{}),
.optimize = b.standardOptimizeOption(.{}),
});
lib.linkLibC();
lib.addCSourceFiles(.{
.files = &.{
"adler32.c",
"crc32.c",
"deflate.c",
"infback.c",
"inffast.c",
"inflate.c",
"inftrees.c",
"trees.c",
"zutil.c",
"compress.c",
"uncompr.c",
"gzclose.c",
"gzlib.c",
"gzread.c",
"gzwrite.c",
},
.flags = &.{"-std=c89"},
});
lib.installHeader("zconf.h", "zconf.h");
lib.installHeader("zlib.h", "zlib.h");
b.installArtifact(lib);
}