Update build script to compile library modules independently

This commit is contained in:
Dimitri Lozeve 2021-10-24 21:47:20 +02:00
parent f9719d087e
commit e5221c948b
2 changed files with 30 additions and 5 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
*\~
TAGS
build-deps
build-deps-bin
data/

View file

@ -1,9 +1,32 @@
#!/usr/bin/env gxi
(import :std/build-script)
(import :std/make)
(defbuild-script
(def lib-build-spec
'("uniplot/braille"
"uniplot/lineplot"
(static-exe: "uniplot"))
optimize: #t)
"uniplot/lineplot"))
(def bin-build-spec
'((static-exe: "uniplot")))
(def srcdir
(path-normalize (path-directory (this-source-file))))
(def (main . args)
(match args
(["lib"]
(make srcdir: srcdir
optimize: #t
debug: 'src
static: #t
lib-build-spec))
(["bin"]
(make srcdir: srcdir
optimize: #t
debug: #f
static: #t
build-deps: "build-deps-bin"
bin-build-spec))
([]
(main "lib")
(main "bin"))))