summaryrefslogtreecommitdiffstats
path: root/tools/rbspeex/Makefile
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-05-11 17:22:44 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-05-11 20:34:12 +0200
commit4f3fa9accbd77f8c85f87ae057d2420ce7666ff7 (patch)
tree8fced5134d1d2fea634ab93063cf3647df632efc /tools/rbspeex/Makefile
parent8a4075d454a64cc51ea7e496f346fd96d5970eff (diff)
downloadrockbox-4f3fa9accbd77f8c85f87ae057d2420ce7666ff7.tar.gz
rockbox-4f3fa9accbd77f8c85f87ae057d2420ce7666ff7.tar.bz2
rockbox-4f3fa9accbd77f8c85f87ae057d2420ce7666ff7.zip
Change mkdir -p to work on Windows.
Windows mkdir doesn't know about the -p option and requires paths to use \ as path separator. Try to detect when building on Windows and use the Windows internal function instead of relying on a compatible mkdir in the path. Change-Id: I47d47d45edeb38c672321f77d6e91268bf744dba
Diffstat (limited to 'tools/rbspeex/Makefile')
-rw-r--r--tools/rbspeex/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile
index f7f080847d..24a0cedd8c 100644
--- a/tools/rbspeex/Makefile
+++ b/tools/rbspeex/Makefile
@@ -11,6 +11,12 @@ ifndef V
SILENT = @
endif
+ifeq ($(OS),Windows_NT)
+mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
+else
+mkdir = mkdir -p $(1)
+endif
+
SPEEXSRC = ../../lib/rbcodec/codecs/libspeex
INCLUDES = -I $(SPEEXSRC)
@@ -124,5 +130,5 @@ clean:
$(BUILD_DIR):
@echo MKDIR $(BUILD_DIR)
- $(SILENT)mkdir $(BUILD_DIR)
+ $(SILENT)$(call mkdir, $(BUILD_DIR))