aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2020-08-09 21:55:42 +0200
committerMarvin Borner2020-08-09 21:55:42 +0200
commitf163a5d5f6802f63092229f0f9326e5fb44b7908 (patch)
treef24ccfe1b9bd340875d534e1aa19ef8676fd4d7b /lib/Makefile
parentb6d3d341c19440f8447d8d6c6567b7ff78db3174 (diff)
Added malloc/free syscall
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 730ed6d..ef56b3a 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -18,11 +18,18 @@ CSFLAGS = -mpreferred-stack-boundary=2 -fno-asynchronous-unwind-tables -Os
CFLAGS = $(CSFLAGS) -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builtin -mgeneral-regs-only -std=c99 -m32 -pedantic-errors -Iinc/
-all: compile
-
%.o: %.c
@$(CC) -c $(CFLAGS) $< -o $@
-compile: $(COBJS)
+libc: CFLAGS += -Duserspace
+libc: $(COBJS)
+ @mkdir -p ../build/
+ @$(AR) qc ../build/libc.a $+
+
+libk: CFLAGS += -Dkernel
+libk: $(COBJS)
@mkdir -p ../build/
- @$(AR) qc ../build/libc.a $(COBJS)
+ @$(AR) qc ../build/libk.a $+
+
+clean:
+ @find . -name "*.o" -type f -delete