toolchain/nasm: force ar and ranlib only on macOSX
[openwrt/openwrt.git] / toolchain / nasm / Makefile
index a39c71f..3116635 100644 (file)
@@ -24,6 +24,12 @@ HOST_CONFIGURE_ARGS+= \
                --disable-gdb \
                $(SOFT_FLOAT_CONFIG_OPTION) \
 
+ifeq ($(HOST_OS),Darwin)
+       HOST_MAKE_FLAGS = \
+               AR=ar \
+               RANLIB=ranlib
+endif
+
 define Host/Prepare
        $(call Host/Prepare/Default)
        ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
@@ -37,12 +43,9 @@ define Host/Configure
        $(call Host/Configure/Default)
 endef
 
-define Host/Compile
-       +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
-endef
-
 define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) \
+               $(HOST_MAKE_FLAGS) \
                prefix=$(TOOLCHAIN_DIR) \
                install
 endef