From 6d82e300c5220f9ac89e2e83f297bf6ddd97fa8b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 29 Oct 2023 19:32:48 +0300 Subject: [PATCH] fix --- README.md | 2 +- TODO | 4 +++- shell/Makefile | 11 +++++++++++ shell/sh.c | 3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 shell/Makefile create mode 100644 shell/sh.c diff --git a/README.md b/README.md index dd4fa06..2e92f4f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# micro-coreutils +# micro-utils diff --git a/TODO b/TODO index ad52bd5..feac854 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,6 @@ nice renice nohup chmod -chown split truncate date @@ -68,3 +67,6 @@ Findutils: grep find xargs + +Shell: + lsh - lavash diff --git a/shell/Makefile b/shell/Makefile new file mode 100644 index 0000000..76c8c29 --- /dev/null +++ b/shell/Makefile @@ -0,0 +1,11 @@ +C_SOURCES:=$(wildcard ./*.c) +C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES)) +TARGETS:=$(C_TARGETS) + +CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra +CC?=cc + +all: ../bin $(TARGETS) + +../bin/%: %.c + $(CC) $(CFLAGS) -o $@ $< diff --git a/shell/sh.c b/shell/sh.c new file mode 100644 index 0000000..061ed7e --- /dev/null +++ b/shell/sh.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +}