summaryrefslogtreecommitdiff
path: root/mk/strdup.d
diff options
context:
space:
mode:
Diffstat (limited to 'mk/strdup.d')
-rw-r--r--mk/strdup.d10
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/strdup.d b/mk/strdup.d
new file mode 100644
index 00000000..995f7a9a
--- /dev/null
+++ b/mk/strdup.d
@@ -0,0 +1,10 @@
+libc_P.200809: libc.a(strdup.o)
+libc_X.400: libc.a(strdup.o)
+libc.a(strdup.o): $(OBJDIR)/strdup.o
+ @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$%
+
+$(OBJDIR)/strdup.o: src/string/strdup.c
+$(OBJDIR)/strdup.o: src/_safety.h
+$(OBJDIR)/strdup.o:
+ @mkdir -p $(@D)
+ $(CC) -c -o $@ $(CFLAGS) src/string/strdup.c