-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.msc
56 lines (47 loc) · 2.92 KB
/
project.msc
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
(define-module (flux-harmonic crash-the-stack)
(import (mesche fs)
(mesche list)
(mesche string)
(mesche process)
(mesche build)
(mesche project)))
(project :name "Crash The Stack"
:url "https://github.com/FluxHarmonic/crash-the-stack"
:version "0.0.1"
:description "A hacker-themed Mahjongg game."
:deps (list (mesche-lib "mesche-lang/compiler")
(mesche-lib "substratic/engine"))
:configs (list (config :name "dev"
:default t
:output-path "./bin/dev"
:c-flags "-O0 -g -ggdb -DDEV_BUILD -fsanitize=address")
(config :name "debug"
:output-path "./bin/debug"
:c-flags "-O0 -g -ggdb -DDEBUG")
(config :name "release"
:output-path "./bin/release"
:c-flags "-O2 -fPIE"))
:targets (list (target :name "main"
:default t
:runs (steps
;; Build library dependencies
(build-project "deps/mesche-lang/compiler/project.msc" :target "lib")
(build-project "deps/substratic/engine/project.msc" :target "lib")
;; Build the game source
(compile-source :source-files (list "main.c")
:mesche-main "modules/main.msc")
;; Build and link CLI source files
(link-program "crash-the-stack")))
(target :name "dist"
:runs (steps (build-target "main")
(lambda (project config outputs)
;; TODO: Clean existing dist folder?
(path-ensure "./dist")
(process-start-sync (string-append "cp "
(project-config-output-path config)
"/crash-the-stack "
"dist/"))
(process-start-sync "cp -R ./modules ./dist")
(process-start-sync "cp -R ./assets ./dist")
(process-start-sync "cp -R ./deps/substratic/engine/modules/substratic ./dist/modules")
nil)))))