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