Skip to content

Commit

Permalink
kthd: stub for kernel thread helper daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 30, 2024
1 parent 6e0ef8f commit a37d289
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
23 changes: 23 additions & 0 deletions kthd/Makefile
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions kthd/src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* luxOS - a unix-like operating system
* Omar Elghoul, 2024
*
* kthd: Kernel Thread Helper Daemon
*/

int main() {
return 0; // stub
}

0 comments on commit a37d289

Please sign in to comment.