summaryrefslogtreecommitdiffstats
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-28 16:20:17 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-28 16:20:17 -0400
commitc92305221770bb1316d026c200d569ca4e930e42 (patch)
treebf3e496991e74bd6f2415cf156a7226729f0058b /lib/libc/Makefile
parent69f2ee15025ccedaae0308c50b7d0d400b854c5b (diff)
downloadjove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.gz
jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.bz2
jove-os-c92305221770bb1316d026c200d569ca4e930e42.zip
merge libc files, new init methods for libjove
Diffstat (limited to 'lib/libc/Makefile')
-rw-r--r--lib/libc/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
new file mode 100644
index 0000000..8163b2e
--- /dev/null
+++ b/lib/libc/Makefile
@@ -0,0 +1,15 @@
+include $(CONFIG)
+
+CDIRS := stdio ctype string
+
+CFILES += $(foreach dir,$(CDIRS),$(wildcard $(dir)/*.c))
+
+OFILES := $(patsubst %.c,%.o,$(CFILES))
+
+CFLAGS := -ffreestanding -nostdlib
+
+all: ${OFILES}
+ ar rcs $(OUT)/libc.a $(OFILES)
+
+%.o:%.c
+ $(CC) $(CFLAGS) -c $< -o $@