]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/tests/MPMMTest/Makefile
xnu-4903.221.2.tar.gz
[apple/xnu.git] / tools / tests / MPMMTest / Makefile
index d241564602fc8debfdc79797e5b64801e25c1f68..369fbcace7331d5fe3d0835810a8b412d2a0e7e2 100644 (file)
@@ -17,9 +17,15 @@ ifdef RC_ARCHS
   endif
 endif
 
-ARCH_32 := $(filter-out %64, $(ARCHS))
+# These are convenience functions for filtering based on substrings, as the
+# normal filter functions only accept one wildcard.
+FILTER_OUT_SUBSTRING=$(strip $(foreach string,$(2),$(if $(findstring $(1),$(string)),,$(string))))
+FILTER_SUBSTRING=$(strip $(foreach string,$(2),$(if $(findstring $(1),$(string)),$(string),)))
+
+ARCH_32:=$(call FILTER_OUT_SUBSTRING,64,$(ARCHS))
+ARCH_64:=$(call FILTER_SUBSTRING,64,$(ARCHS))
+
 ARCH_32_FLAGS := $(patsubst %, -arch %, $(ARCH_32))
-ARCH_64 := $(filter %64, $(ARCHS))
 ARCH_64_FLAGS := $(patsubst %, -arch %, $(ARCH_64))
 
 DSTROOT?=$(shell /bin/pwd)