From a8b2282eb88f24c3c5f461e1557fa2cf76ebc251 Mon Sep 17 00:00:00 2001 From: turret Date: Sun, 19 Nov 2023 18:57:55 -0600 Subject: Initial commit - create subsystem system using clone syscall, shared memory, shared file descriptors - printk-like logging facility (TODO: console loglevel) - initcall system (like linux kernel) TODO: determine license factors: linker.ld, linux kernel licensing (some ideas are more liberally taken rather than paraphrased) --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8a8503e --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +CC = gcc +CFLAGS = -std=c99 -O3 -g -Wall -Wextra -Wpedantic -masm=intel +CFLAGS += -Iinclude -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L +CFLAGS += -Wno-unused-result +LDFLAGS = -Tlinker.ld -no-pie + +SRC = $(wildcard *.c **/*.c) +OBJ = $(SRC:.c=.o) + +.PHONY: all clean + +all: app + +%.o: %.c + $(CC) -o $@ -c $< $(CFLAGS) + +app: $(OBJ) + $(CC) -o app $^ $(LDFLAGS) + +clean: + rm -rf $(OBJ) app -- cgit v1.2.3