summaryrefslogtreecommitdiff
path: root/mk/printf.d
diff options
context:
space:
mode:
Diffstat (limited to 'mk/printf.d')
-rw-r--r--mk/printf.d10
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/printf.d b/mk/printf.d
new file mode 100644
index 00000000..11be9f9e
--- /dev/null
+++ b/mk/printf.d
@@ -0,0 +1,10 @@
+libc_C.1: libc.a(printf.o)
+libc.a(printf.o): $(OBJDIR)/printf.o
+ @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$%
+
+$(OBJDIR)/printf.o: src/stdio/printf.c
+$(OBJDIR)/printf.o: src/stdio/_stdio.h
+$(OBJDIR)/printf.o:
+ @echo " [CC] $@"
+ @mkdir -p $(@D)
+ @$(CC) -c -o $@ $(CFLAGS) src/stdio/printf.c