diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-10-21 19:12:08 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-10-21 21:33:39 +0200 |
commit | 1801dcc99985566de4c74721543661a80a78cdc8 (patch) | |
tree | 729a9ad66ad3897726178e27063ce773e87d877a | |
parent | 884d8922e37586c1916ee124e78721e6dd946606 (diff) | |
download | rockbox-1801dcc99985566de4c74721543661a80a78cdc8.tar.gz rockbox-1801dcc99985566de4c74721543661a80a78cdc8.zip |
rbutil: Fix native Windows build for tools.
- When make on Windows finds sh.exe it will try to use that. We use
cmd.exe calls when detecting Windows, so make sure we use cmd.exe as
shell.
- Add missing Windows compatibility to tomcrypt Makefile.
Change-Id: Iaef133ca27472a5ddf449174d540983f15c66aea
-rw-r--r-- | rbutil/libtools.make | 1 | ||||
-rw-r--r-- | tools/rbspeex/Makefile | 1 | ||||
-rw-r--r-- | tools/ucl/src/Makefile | 1 | ||||
-rw-r--r-- | utils/tomcrypt/Makefile | 13 |
4 files changed, 14 insertions, 2 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index dadc1a0545..7f9fa15f5b 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make | |||
@@ -22,6 +22,7 @@ endif | |||
22 | # Get directory this Makefile is in for relative paths. | 22 | # Get directory this Makefile is in for relative paths. |
23 | TOP := $(dir $(lastword $(MAKEFILE_LIST))) | 23 | TOP := $(dir $(lastword $(MAKEFILE_LIST))) |
24 | ifeq ($(OS),Windows_NT) | 24 | ifeq ($(OS),Windows_NT) |
25 | SHELL = cmd.exe | ||
25 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) | 26 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) |
26 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) | 27 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) |
27 | else | 28 | else |
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile index b33534695c..03f88f34cd 100644 --- a/tools/rbspeex/Makefile +++ b/tools/rbspeex/Makefile | |||
@@ -12,6 +12,7 @@ SILENT = @ | |||
12 | endif | 12 | endif |
13 | 13 | ||
14 | ifeq ($(OS),Windows_NT) | 14 | ifeq ($(OS),Windows_NT) |
15 | SHELL = cmd.exe | ||
15 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) | 16 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) |
16 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) | 17 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) |
17 | else | 18 | else |
diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile index 14ba2c2b04..7fffe59a7b 100644 --- a/tools/ucl/src/Makefile +++ b/tools/ucl/src/Makefile | |||
@@ -13,6 +13,7 @@ SILENT = @ | |||
13 | endif | 13 | endif |
14 | 14 | ||
15 | ifeq ($(OS),Windows_NT) | 15 | ifeq ($(OS),Windows_NT) |
16 | SHELL = cmd.exe | ||
16 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) | 17 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) |
17 | else | 18 | else |
18 | mkdir = mkdir -p $(1) | 19 | mkdir = mkdir -p $(1) |
diff --git a/utils/tomcrypt/Makefile b/utils/tomcrypt/Makefile index 4ca8c4e843..3382819a66 100644 --- a/utils/tomcrypt/Makefile +++ b/utils/tomcrypt/Makefile | |||
@@ -13,6 +13,15 @@ ifndef V | |||
13 | SILENT := @ | 13 | SILENT := @ |
14 | endif | 14 | endif |
15 | 15 | ||
16 | ifeq ($(OS),Windows_NT) | ||
17 | SHELL = cmd.exe | ||
18 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) | ||
19 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) | ||
20 | else | ||
21 | mkdir = mkdir -p $(1) | ||
22 | rm = rm -rf $(1) | ||
23 | endif | ||
24 | |||
16 | CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers | 25 | CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers |
17 | LDFLAGS := | 26 | LDFLAGS := |
18 | 27 | ||
@@ -38,8 +47,8 @@ $(LIB): $(OBJS) | |||
38 | 47 | ||
39 | $(BUILD_DIR)/%.o: %.c | 48 | $(BUILD_DIR)/%.o: %.c |
40 | $(info CC $(notdir $@)) | 49 | $(info CC $(notdir $@)) |
41 | $(SILENT)mkdir -p $(dir $@) | 50 | $(SILENT)$(call mkdir, $(dir $@)) |
42 | $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $< | 51 | $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $< |
43 | 52 | ||
44 | clean: | 53 | clean: |
45 | rm -fr $(BUILDDIR) $(LIB) | 54 | $(call rm,$(BUILDDIR) $(LIB)) |