summaryrefslogtreecommitdiff
path: root/src/sys/lib
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-13 23:43:16 -0400
committerIan Moffett <ian@osmora.org>2025-09-13 23:43:16 -0400
commit7e555f1ba2ca26632fda82ff3542e5e415af19cd (patch)
tree461fe4651244a6fde0b9b1155060a1c9a500e1d2 /src/sys/lib
parentbb5cc59c93b07c87177eafdce9afe43be461b00b (diff)
build: Add Makefile to sys/lib/
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/lib')
-rw-r--r--src/sys/lib/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/sys/lib/Makefile b/src/sys/lib/Makefile
new file mode 100644
index 0000000..46e4aec
--- /dev/null
+++ b/src/sys/lib/Makefile
@@ -0,0 +1,25 @@
+include ../conf/sys.mk
+
+.SILENT:
+override PROMPT := printf "%s\t\t%s\n"
+
+TARGET_LIB = ../target/libstring.a
+CFLAGS = -I../include/ -I../include/lib/ -I../target/header/ $(MI_CFLAGS) -O0
+CFILES = $(shell find . -name "*.c")
+
+DEPS = $(CFILES:.c=.d)
+OBJECTS = $(CFILES:%.c=%.o)
+
+.PHONY: all
+all: $(OBJECTS)
+ $(PROMPT) " MI.AR " $<
+ ar rcs $(TARGET_LIB) $(OBJECTS)
+
+-include $(DEPS)
+%.o: %.c
+ $(PROMPT) " MI.CC " $<
+ $(CC) -c $(CFLAGS) $< -o $@
+
+.PHONY: clean
+clean:
+ rm -f $(DEPS) $(OBJECTS)