-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
97 lines (95 loc) · 2.44 KB
/
build.zig
File metadata and controls
97 lines (95 loc) · 2.44 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
const std = @import("std");
pub fn build(b: *std.Build) void {
const upstream = b.dependency("libjpeg", .{});
const lib = b.addLibrary(.{
.name = "jpeg",
.linkage = .static,
.root_module = b.createModule(.{
.target = b.standardTargetOptions(.{}),
.optimize = b.standardOptimizeOption(.{}),
.link_libc = true,
}),
});
const InlineKeyword = enum { __inline__ };
const config_header = b.addConfigHeader(.{
.style = .{ .autoconf_undef = upstream.path("jconfig.cfg") },
.include_path = "jconfig.h",
}, .{
.HAVE_PROTOTYPES = true,
.HAVE_UNSIGNED_CHAR = true,
.HAVE_UNSIGNED_SHORT = true,
.void = null,
.@"const" = null,
.CHAR_IS_UNSIGNED = null,
.HAVE_STDDEF_H = true,
.HAVE_STDLIB_H = true,
.HAVE_LOCALE_H = true,
.NEED_BSD_STRINGS = null,
.NEED_SYS_TYPES_H = null,
.NEED_FAR_POINTERS = null,
.NEED_SHORT_EXTERNAL_NAMES = null,
.INCOMPLETE_TYPES_BROKEN = null,
.RIGHT_SHIFT_IS_UNSIGNED = null,
.INLINE = InlineKeyword.__inline__,
.DEFAULT_MAX_MEM = null,
.NO_MKTEMP = null,
.RLE_SUPPORTED = null,
.TWO_FILE_COMMANDLINE = null,
.NEED_SIGNAL_CATCHER = null,
.DONT_USE_B_MODE = null,
.PROGRESS_REPORT = null,
});
lib.addConfigHeader(config_header);
lib.installConfigHeader(config_header);
lib.addCSourceFiles(.{ .root = upstream.path(""), .files = &libjpeg_srcs });
lib.installHeadersDirectory(upstream.path(""), "", .{});
b.installArtifact(lib);
}
const libjpeg_srcs = [_][]const u8{
"jmemnobs.c",
"jaricom.c",
"jcomapi.c",
"jutils.c",
"jerror.c",
"jmemmgr.c",
"jcapimin.c",
"jcapistd.c",
"jcarith.c",
"jctrans.c",
"jcparam.c",
"jdatadst.c",
"jcinit.c",
"jcmaster.c",
"jcmarker.c",
"jcmainct.c",
"jcprepct.c",
"jccoefct.c",
"jccolor.c",
"jcsample.c",
"jchuff.c",
"jcdctmgr.c",
"jfdctfst.c",
"jfdctflt.c",
"jfdctint.c",
"jdapimin.c",
"jdapistd.c",
"jdarith.c",
"jdtrans.c",
"jdatasrc.c",
"jdmaster.c",
"jdinput.c",
"jdmarker.c",
"jdhuff.c",
"jdmainct.c",
"jdcoefct.c",
"jdpostct.c",
"jddctmgr.c",
"jidctfst.c",
"jidctflt.c",
"jidctint.c",
"jdsample.c",
"jdcolor.c",
"jquant1.c",
"jquant2.c",
"jdmerge.c",
};