diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2012-09-22 12:44:57 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2012-09-22 12:44:57 +1000 |
commit | d2e583a99eca00082f2e3a973ab201aeb3f1a32b (patch) | |
tree | 03052f30eac2b5a629b2d9b7c71462eaef9be985 | |
parent | 0398d7c580005891cedc86a68ad289ce30783bd8 (diff) | |
download | ffi-d2e583a99eca00082f2e3a973ab201aeb3f1a32b.tar.gz |
Use ARCHFLAGS when compiling libffi
-rw-r--r-- | ext/ffi_c/libffi.darwin.mk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/ffi_c/libffi.darwin.mk b/ext/ffi_c/libffi.darwin.mk index 212cd9e..d046a72 100644 --- a/ext/ffi_c/libffi.darwin.mk +++ b/ext/ffi_c/libffi.darwin.mk @@ -9,15 +9,17 @@ INCFLAGS += -I"$(BUILD_DIR)" # Work out which arches we need to compile the lib for ARCHES := -ifneq ($(findstring -arch ppc,$(CFLAGS)),) +ARCHFLAGS ?= $(filter -arch %, $(CFLAGS)) + +ifneq ($(findstring -arch ppc,$(ARCHFLAGS)),) ARCHES += ppc endif -ifneq ($(findstring -arch i386,$(CFLAGS)),) +ifneq ($(findstring -arch i386,$(ARCHFLAGS)),) ARCHES += i386 endif -ifneq ($(findstring -arch x86_64,$(CFLAGS)),) +ifneq ($(findstring -arch x86_64,$(ARCHFLAGS)),) ARCHES += x86_64 endif |