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