diff -rupN clang-trunk.orig/tools/Makefile clang-trunk/tools/Makefile
--- clang-trunk.orig/tools/Makefile	2011-11-04 13:11:00.081838000 -0400
+++ clang-trunk/tools/Makefile	2011-11-04 21:56:03.043983000 -0400
@@ -13,7 +13,12 @@ DIRS := driver libclang c-index-test arc
 include $(CLANG_LEVEL)/../../Makefile.config
 
 ifeq ($(OS), $(filter $(OS), Minix))
-DIRS := $(filter-out libclang c-index-test, arcmt-test, $(DIRS))
+DIRS := $(filter-out libclang c-index-test c-arcmt-test, $(DIRS))
+endif
+
+# Filter out shared libraries if not enabled (and dependent tests).
+ifneq ($(ENABLE_SHARED),1)
+DIRS := $(filter-out libclang c-index-test c-arcmt-test, $(DIRS))
 endif
 
 include $(CLANG_LEVEL)/Makefile
