summaryrefslogtreecommitdiff
path: root/mk/strdup.d
diff options
context:
space:
mode:
Diffstat (limited to 'mk/strdup.d')
-rw-r--r--mk/strdup.d9
1 files changed, 9 insertions, 0 deletions
diff --git a/mk/strdup.d b/mk/strdup.d
new file mode 100644
index 00000000..dc172f44
--- /dev/null
+++ b/mk/strdup.d
@@ -0,0 +1,9 @@
+libc_C.0: 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