Mercurial > games > semicongine
annotate config.nims @ 482:1670f8e70964
add: clean examples, update build configs
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 10 Jan 2023 00:24:37 +0700 |
parents | 14e5151f68d1 |
children | b45a5d338cd0 |
rev | line source |
---|---|
479 | 1 import os |
2 | |
3 const buildbase = "build" | |
4 | |
5 proc compilerFlags() = | |
6 switch("path", "src") | |
7 switch("mm", "orc") | |
8 switch("experimental", "strictEffects") | |
9 switch("threads", "on") | |
10 switch("app", "gui") | |
11 | |
12 proc compilerFlagsDebug() = | |
13 switch("debugger", "native") | |
14 switch("checks", "on") | |
15 switch("assertions", "on") | |
16 | |
17 proc compilerFlagsRelease() = | |
18 switch("define", "release") | |
19 switch("checks", "off") | |
20 switch("assertions", "off") | |
21 | |
482
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
22 proc compilerFlagsDebugWindows() = |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
23 switch("cc", "vcc") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
24 switch("passC", "/MDd") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
25 switch("passL", "ucrtd.lib") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
26 |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
27 proc compilerFlagsReleaseWindows() = |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
28 switch("cc", "vcc") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
29 switch("passC", "/MD") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
30 switch("passL", "ucrt.lib") |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
31 |
479 | 32 task build_linux_debug, "build linux debug": |
482
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
33 compilerFlags() |
479 | 34 compilerFlagsDebug() |
35 buildbase.joinPath("debug/linux").mkDir() | |
36 setCommand "c" | |
37 | |
38 task build_linux_release, "build linux release": | |
482
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
39 compilerFlags() |
479 | 40 compilerFlagsRelease() |
41 buildbase.joinPath("release/linux").mkDir() | |
42 setCommand "c" | |
480
14e5151f68d1
did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents:
479
diff
changeset
|
43 |
482
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
44 task build_windows_debug, "build windows debug": |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
45 compilerFlags() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
46 compilerFlagsDebug() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
47 compilerFlagsDebugWindows() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
48 buildbase.joinPath("debug/windows").mkDir() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
49 setCommand "c" |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
50 |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
51 task build_windows_release, "build windows release": |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
52 compilerFlags() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
53 compilerFlagsRelease() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
54 compilerFlagsReleaseWindows() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
55 buildbase.joinPath("release/windows").mkDir() |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
56 setCommand "c" |
1670f8e70964
add: clean examples, update build configs
Sam <sam@basx.dev>
parents:
480
diff
changeset
|
57 |
480
14e5151f68d1
did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents:
479
diff
changeset
|
58 compilerFlags() |