# 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