annotate config.nims @ 486:9231df12b222

fix: build from scratch not working, remove temp shader files from compilation
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 11:43:22 +0700
parents b4a972bd37d5
children 94c38e4b5782
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
1 import os
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
2
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
3 const buildbase = "build"
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
4
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
5 proc compilerFlags() =
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
6 switch("path", "src")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
7 switch("mm", "orc")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
8 switch("experimental", "strictEffects")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
9 switch("threads", "on")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
10 switch("app", "gui")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
11
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
12 proc compilerFlagsDebug() =
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
13 switch("debugger", "native")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
14 switch("checks", "on")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
15 switch("assertions", "on")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
16
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
17 proc compilerFlagsRelease() =
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
18 switch("define", "release")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
19 switch("checks", "off")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
20 switch("assertions", "off")
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
21
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
22 task build_linux_debug, "build linux debug":
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
23 compilerFlags()
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
24 compilerFlagsDebug()
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
25 buildbase.joinPath("debug/linux").mkDir()
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
26 setCommand "c"
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
27
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
28 task build_linux_release, "build linux release":
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
29 compilerFlags()
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
30 compilerFlagsRelease()
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
31 buildbase.joinPath("release/linux").mkDir()
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 474
diff changeset
32 setCommand "c"
480
14e5151f68d1 did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents: 479
diff changeset
33
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
34 task build_windows_debug, "build windows debug":
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
35 compilerFlags()
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
36 compilerFlagsDebug()
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
37 switch("define", "mingw")
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
38 buildbase.joinPath("debug/windows").mkDir()
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
39 setCommand "c"
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
40
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
41 task build_windows_release, "build windows release":
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
42 compilerFlags()
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
43 compilerFlagsRelease()
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
44 switch("define", "mingw")
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
45 buildbase.joinPath("release/windows").mkDir()
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
46 setCommand "c"
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 480
diff changeset
47
480
14e5151f68d1 did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents: 479
diff changeset
48 compilerFlags()