diff --git a/Makefile b/Makefile index bcacca4..906e0fc 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ all: @make -C fs @echo "\x1B[0;1;35m make\x1B[0m servers/devices" @make -C devices + @echo "\x1B[0;1;35m make\x1B[0m servers/kthd" + @make -C kthd install: @mkdir -p out @@ -16,6 +18,8 @@ install: @make install -C fs @echo "\x1B[0;1;35m make\x1B[0m install servers/devices" @make install -C devices + @echo "\x1B[0;1;35m make\x1B[0m install servers/kthd" + @make install -C kthd clean: @echo "\x1B[0;1;35m make\x1B[0m clean servers/liblux" @@ -24,3 +28,5 @@ clean: @make clean -C fs @echo "\x1B[0;1;35m make\x1B[0m clean servers/devices" @make clean -C devices + @echo "\x1B[0;1;35m make\x1B[0m clean servers/kthd" + @make clean -C kthd \ No newline at end of file diff --git a/kthd/Makefile b/kthd/Makefile new file mode 100644 index 0000000..86e9120 --- /dev/null +++ b/kthd/Makefile @@ -0,0 +1,23 @@ +PLATFORM=x86_64-lux +CCFLAGS=-Wall -c -I./src/include -O3 +LDFLAGS=-llux +CC=x86_64-lux-gcc +LD=x86_64-lux-gcc +SRC:=$(shell find ./src -type f -name "*.c") +OBJ:=$(SRC:.c=.o) + +all: kthd + +%.o: %.c + @echo "\x1B[0;1;32m cc \x1B[0m $<" + @$(CC) $(CCFLAGS) -o $@ $< + +kthd: $(OBJ) + @echo "\x1B[0;1;93m ld \x1B[0m kthd" + @$(LD) $(OBJ) -o kthd $(LDFLAGS) + +install: kthd + @cp kthd ../out/ + +clean: + @rm -f kthd $(OBJ) diff --git a/kthd/src/main.c b/kthd/src/main.c new file mode 100644 index 0000000..ae6b580 --- /dev/null +++ b/kthd/src/main.c @@ -0,0 +1,10 @@ +/* + * luxOS - a unix-like operating system + * Omar Elghoul, 2024 + * + * kthd: Kernel Thread Helper Daemon + */ + +int main() { + return 0; // stub +} \ No newline at end of file