-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuilder.zig
77 lines (67 loc) · 2.29 KB
/
builder.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
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
//:_______________________________________________________________________
// ᛟ minim | Copyright (C) Ivan Mar (sOkam!) | GNU LGPLv3 or later :
//:_______________________________________________________________________
// @deps confy
const confy = @import("./src/lib/confy.zig");
const Name = confy.Name;
const Package = confy.Package;
const Git = confy.Git;
//______________________________________
// @section Package Information
//____________________________
const version = "0.0.0";
const name = "minim";
const description = "ᛟ minim | Programming Language";
const license = "LGPLv3-or-later";
const author = Name{ .short= "heysokam", .human= ".sOkam!" };
//________________________
const P = confy.Package.Info{
.version = version,
.name = Name{ .short= name, .human= description },
.author = author,
.license = license,
.git = Git.Info{ .owner= author.short, .repo= name },
};
const cfg = struct {
const verbose = false;
};
const deps = struct {
const zstd = confy.Dependency{.name= "zstd", .url= "https://github.com/heysokam/zstd" };
const slate = confy.Dependency{.name= "slate", .url= "https://github.com/heysokam/slate" };
const ztest = confy.Dependency{.name= "ztest", .url= "https://github.com/heysokam/ztest" };
const minim = [_]confy.Dependency{deps.zstd, deps.slate};
const tests = deps.minim ++ [_]confy.Dependency{deps.ztest};
};
pub fn main () !u8 {
// Initialize the confy builder
var builder = try confy.init(); defer builder.term();
//______________________________________
// @section Build Targets
//____________________________
// var minim = confy.StaticLib(.{
// .kind = .static,
// .trg = P.name.short,
// .entry = "src/minim.zig",
// .version = P.version,
// }, builder);
const M = try confy.Program(.{
.trg = "M",
.entry = "src/M.zig",
.version = P.version,
.deps = &deps.minim,
.cfg = .{.verbose= cfg.verbose },
}, &builder);
var tests = try confy.UnitTest(.{
.trg = "tests",
.entry = "src/tests.zig",
.version = P.version,
.deps = &deps.tests,
.cfg = .{.verbose= cfg.verbose },
// .flags = .{.ld= &.{"-lclang"}},
}, &builder);
P.report();
try M.build();
try tests.build();
// try M.run();
return 0;
}