-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForgefile.hsl
30 lines (27 loc) · 970 Bytes
/
Forgefile.hsl
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
include ~/toolsets/gcc/gcc-app.hsl
var sources type list;
var includes type list;
var cflags type list;
var libraries type list;
var ldflags type list;
project 2048 : toolset "gcc-c-app" : $sources, $includes, $cflags, $libraries, $ldflags, "2048";
2048.prologue() {
var exit_code type int;
$exit_code = 1;
if (hefesto.sys.cd("accacia/src")) {
$exit_code = hefesto.sys.forge("accacia", "Forgefile.hsl", "--obj-output-dir=../obj --bin-output-dir=../lib");
hefesto.sys.cd("../..");
}
if ($exit_code != 0) {
hefesto.project.abort(1);
}
$includes = hefesto.sys.get_option("includes");
$includes.add_item("accacia/src");
$cflags = hefesto.sys.get_option("cflags");
$libraries = hefesto.sys.get_option("libraries");
$libraries.add_item("accacia/lib/");
$ldflags = hefesto.sys.get_option("ldflags");
$ldflags.add_item("-lncurses");
$ldflags.add_item("-laccacia");
$sources.ls(".*\\.c$");
}