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