diff options
Diffstat (limited to 'makefiles')
-rw-r--r-- | makefiles/Makefile.clang | 15 | ||||
-rw-r--r-- | makefiles/Makefile.gcc | 17 | ||||
-rw-r--r-- | makefiles/Makefile.tools | 6 |
3 files changed, 38 insertions, 0 deletions
diff --git a/makefiles/Makefile.clang b/makefiles/Makefile.clang index 1105043..591a325 100644 --- a/makefiles/Makefile.clang +++ b/makefiles/Makefile.clang @@ -26,6 +26,21 @@ LDSHR = -shared -Wl,-soname,$(SONAME) ARFLG := cru ############################################################################### +# Mac OS X Universal Binaries +############################################################################### + +ifeq ($(TARGET),Darwin) + ifneq ($(UNIVERSAL),) + UNIVERSAL_FLAGS := $(foreach arch,$(UNIVERSAL),-arch $(arch) ) + + CFLAGS += $(UNIVERSAL_FLAGS) + LDFLAGS += $(UNIVERSAL_FLAGS) + CXXFLAGS += $(UNIVERSAL_FLAGS) + ARFLAGS += -s + endif +endif + +############################################################################### # Other settings ############################################################################### diff --git a/makefiles/Makefile.gcc b/makefiles/Makefile.gcc index 3115889..7d11b24 100644 --- a/makefiles/Makefile.gcc +++ b/makefiles/Makefile.gcc @@ -58,6 +58,23 @@ ifeq ($(COMPONENT_TYPE),riscos-module) endif ############################################################################### +# Mac OS X Universal Binaries +############################################################################### + +ifeq ($(TARGET),Darwin) + ifneq ($(UNIVERSAL),) + UNIVERSAL_FLAGS := $(foreach arch,$(UNIVERSAL),-arch $(arch) ) + CC_CAN_BUILD_AND_DEP := no + CC_CANNOT_DEP := yes + + CFLAGS += $(UNIVERSAL_FLAGS) + LDFLAGS += $(UNIVERSAL_FLAGS) + CXXFLAGS += $(UNIVERSAL_FLAGS) + ARFLAGS += -s + endif +endif + +############################################################################### # Other settings ############################################################################### diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools index a5148a2..6ac78a5 100644 --- a/makefiles/Makefile.tools +++ b/makefiles/Makefile.tools @@ -372,6 +372,12 @@ else ifeq ($(word 1,$(ccvsn)),clang) toolchain := clang endif + ifeq ($(word 1,$(ccvsn)),Apple) + ifeq ($(word 2,$(ccvsn)),clang) + # Apple clang + toolchain := clang + endif + endif endif ifeq ($(toolchain),) |