build: Teach Makefile build system about asan/dynamic subdir.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163413 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/Makefile.mk b/lib/asan/Makefile.mk
index 0be12d2..af9602e 100644
--- a/lib/asan/Makefile.mk
+++ b/lib/asan/Makefile.mk
@@ -8,7 +8,7 @@
 #===------------------------------------------------------------------------===#
 
 ModuleName := asan
-SubDirs :=
+SubDirs := dynamic
 
 Sources := $(foreach file,$(wildcard $(Dir)/*.cc),$(notdir $(file)))
 ObjNames := $(Sources:%.cc=%.o)
diff --git a/lib/asan/dynamic/Makefile.mk b/lib/asan/dynamic/Makefile.mk
new file mode 100644
index 0000000..897844e
--- /dev/null
+++ b/lib/asan/dynamic/Makefile.mk
@@ -0,0 +1,25 @@
+#===- lib/asan/dynamic/Makefile.mk -------------------------*- Makefile -*--===#
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+
+ModuleName := asan_dynamic
+SubDirs :=
+
+Sources := $(foreach file,$(wildcard $(Dir)/*.cc),$(notdir $(file)))
+ObjNames := $(Sources:%.cc=%.o)
+
+Implementation := Generic
+
+# FIXME: use automatic dependencies?
+Dependencies := $(wildcard $(Dir)/*.h)
+Dependencies += $(wildcard $(Dir)/../../interception/*.h)
+Dependencies += $(wildcard $(Dir)/../../interception/mach_override/*.h)
+Dependencies += $(wildcard $(Dir)/../../sanitizer_common/*.h)
+
+# Define a convenience variable for the asan dynamic functions.
+AsanDynamicFunctions := $(Sources:%.cc=%)