# sanos
完備的小系統,類linux,所有東西都是自己實現的。
https://github.com/ringgaard/sanos
## Build system
1. 開始是用 host 的 make/gcc
~~~
sanos: dirs build-tools boot sys libc utils cmds sdk
# create dir
make -f Makefile.linux build-tools
# tool, change cc to tinycc
make -f Makefile.linux dirs
ls linux/tools/
ar as cc mkdfs mkpkg
# bootloader
make -f Makefile.linux boot
# kernel
make -f Makefile.linux sys
sys: osldr kernel drivers os
# libc utils cmds sdk
~~~
## make
關鍵是為了產生target,比較dependency target的時間,決定是否要build。
依次運行commands。
1. parser rule = (target, dependencies, commands)
2. check target, compare with dependency time, build target list
3. build target
## chgrp