diff --git a/utils/coremark/Makefile b/utils/coremark/Makefile index 06a05c8753f87..bc2c67cf9f3a6 100644 --- a/utils/coremark/Makefile +++ b/utils/coremark/Makefile @@ -70,8 +70,8 @@ endif define Build/Compile $(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/posix/core_portme.mak - mkdir $(PKG_BUILD_DIR)/$(ARCH) - $(CP) -r $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH) + [ -d "$(PKG_BUILD_DIR)/$(ARCH)" ] || mkdir $(PKG_BUILD_DIR)/$(ARCH) + $(CP) $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)/ $(MAKE) -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \ PORT_CFLAGS="$(TARGET_CFLAGS)" XCFLAGS="$(EXTRA_CFLAGS)" compile endef