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
This commit is contained in:
parent
884d8922e3
commit
1801dcc999
4 changed files with 14 additions and 2 deletions
|
@ -22,6 +22,7 @@ endif
|
||||||
# Get directory this Makefile is in for relative paths.
|
# Get directory this Makefile is in for relative paths.
|
||||||
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
|
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
SHELL = cmd.exe
|
||||||
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||||
rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1))
|
rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1))
|
||||||
else
|
else
|
||||||
|
|
|
@ -12,6 +12,7 @@ SILENT = @
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
SHELL = cmd.exe
|
||||||
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||||
rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1))
|
rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1))
|
||||||
else
|
else
|
||||||
|
|
|
@ -13,6 +13,7 @@ SILENT = @
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
SHELL = cmd.exe
|
||||||
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||||
else
|
else
|
||||||
mkdir = mkdir -p $(1)
|
mkdir = mkdir -p $(1)
|
||||||
|
|
|
@ -13,6 +13,15 @@ ifndef V
|
||||||
SILENT := @
|
SILENT := @
|
||||||
endif
|
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
|
CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers
|
||||||
LDFLAGS :=
|
LDFLAGS :=
|
||||||
|
|
||||||
|
@ -38,8 +47,8 @@ $(LIB): $(OBJS)
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.c
|
$(BUILD_DIR)/%.o: %.c
|
||||||
$(info CC $(notdir $@))
|
$(info CC $(notdir $@))
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)$(call mkdir, $(dir $@))
|
||||||
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
|
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr $(BUILDDIR) $(LIB)
|
$(call rm,$(BUILDDIR) $(LIB))
|
||||||
|
|
Loading…
Reference in a new issue