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