For PR950:
[oota-llvm.git] / projects / Makefile
index 16ee42e4754692955ab9f83bcc7ca99677fd0d57..0997a2a3817ec02cb00271b51eea52c9349482c7 100644 (file)
@@ -8,7 +8,20 @@
 ##===----------------------------------------------------------------------===##
 LEVEL=..
 
-DIRS=
-OPTIONAL_DIRS:=$(shell ls | grep -v CVS)
+include $(LEVEL)/Makefile.config
 
-include $(LEVEL)/Makefile.common
+DIRS:= $(filter-out llvm-test,$(patsubst $(PROJ_SRC_DIR)/%/Makefile,%,$(wildcard $(PROJ_SRC_DIR)/*/Makefile)))
+
+# Sparc cannot link shared libraries (libtool problem?) which Stacker uses
+ifeq ($(ARCH), Sparc)
+DIRS := $(filter-out Stacker, $(DIRS))
+DIRS := $(filter-out sample, $(DIRS))
+endif
+
+
+# Universal builds can't build stacker, which uses llvm-gcc -S.
+ifdef UNIVERSAL
+DIRS := $(filter-out Stacker, $(DIRS))
+endif
+
+include $(PROJ_SRC_ROOT)/Makefile.rules