aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-10-29 11:26:44 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-10-29 11:26:44 +0300
commitc4fcc92183c55db868d0d6ae53e6009fb2e53ee5 (patch)
treead5ef50aa07465e11f779c4482e20e6071182e9c /lib
parentmakefile: add libk target (diff)
downloadkernel-c4fcc92183c55db868d0d6ae53e6009fb2e53ee5.tar.xz
makefile: add i686/arch.a target
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile13
-rw-r--r--lib/targets.mk6
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..3a5fff9
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,13 @@
+include ../${ARCH}/toolchain.mk
+include ../rules.mk
+
+CCFLAGS += -I. -I..
+
+libk,SRCS = memcpy.c memset.c stdio/printf.c string/itoa.c
+libk,OBJS = $(libk,SRCS:%.c=%.o)
+libk.a: ${libk,OBJS}
+ @echo ' AR $@'
+ @${AR} ${ARFLAGS} $@ $^
+
+clean:
+ @rm -rf ${libk,OBJS}
diff --git a/lib/targets.mk b/lib/targets.mk
deleted file mode 100644
index cbf9da8..0000000
--- a/lib/targets.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-libk,SRCS = lib/memcpy.c lib/memset.c lib/stdio/printf.c lib/string/itoa.c
-libk,OBJS = $(libk,SRCS:%.c=%.o)
-libk.a: ${libk,OBJS}
- @echo ' AR $@'
- @${AR} ${ARFLAGS} $@ $^
-