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 /utils/tomcrypt/Makefile | |
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
Diffstat (limited to 'utils/tomcrypt/Makefile')
-rw-r--r-- | utils/tomcrypt/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
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 SILENT := @ endif +ifeq ($(OS),Windows_NT) +SHELL = cmd.exe +mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) +rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) +else +mkdir = mkdir -p $(1) +rm = rm -rf $(1) +endif + CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers LDFLAGS := @@ -38,8 +47,8 @@ $(LIB): $(OBJS) $(BUILD_DIR)/%.o: %.c $(info CC $(notdir $@)) - $(SILENT)mkdir -p $(dir $@) + $(SILENT)$(call mkdir, $(dir $@)) $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $< clean: - rm -fr $(BUILDDIR) $(LIB) + $(call rm,$(BUILDDIR) $(LIB)) |