Makefile.
This commit is contained in:
parent
15f1dab417
commit
3efae0c623
30
Makefile
Normal file
30
Makefile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
all: global-compilation
|
||||||
|
|
||||||
|
OPT_CACHE = --global-cache-dir /tmp/.global-cache-dir
|
||||||
|
OPT_MODE = ReleaseSmall
|
||||||
|
#OPT_MODE = ReleaseFast
|
||||||
|
#OPT_MODE = ReleaseSafe
|
||||||
|
#OPT_MODE = Debug
|
||||||
|
OPT_STRIP = --strip
|
||||||
|
opts = -O $(OPT_MODE) $(OPT_CACHE) $(OPT_STRIP)
|
||||||
|
|
||||||
|
individual_apps != ls src/*.zig |\
|
||||||
|
grep -v lib.zig |\
|
||||||
|
grep -v zig-cache |\
|
||||||
|
grep -v test.zig |\
|
||||||
|
sed "s_src/__" |\
|
||||||
|
sed "s/.zig$$//"
|
||||||
|
|
||||||
|
$(individual_apps):
|
||||||
|
@echo $@
|
||||||
|
@zig build-exe $(opts) src/$@.zig
|
||||||
|
|
||||||
|
individual-compilation:
|
||||||
|
@echo "individual apps: $(individual_apps)"
|
||||||
|
@for i in $(individual_apps); do echo "$${i}"; zig build-exe $(opts) src/$${i}.zig; done
|
||||||
|
|
||||||
|
global-compilation: src/main.zig
|
||||||
|
zig build-exe $(opts) src/main.zig
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: $(global-compilation) $(individual-compilation)
|
Loading…
Reference in New Issue
Block a user