mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-22 11:32:41 -05:00
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
This commit is contained in:
parent
8a4075d454
commit
4f3fa9accb
3 changed files with 24 additions and 7 deletions
|
|
@ -12,6 +12,12 @@ ifndef V
|
|||
SILENT = @
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||
else
|
||||
mkdir = mkdir -p $(1)
|
||||
endif
|
||||
|
||||
ifdef RBARCH
|
||||
CFLAGS += -arch $(RBARCH)
|
||||
endif
|
||||
|
|
@ -59,7 +65,7 @@ $(TARGET_DIR)libucl$(RBARCH).a: $(OBJS)
|
|||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@echo CC $<
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
$(SILENT)$(call mkdir, $(dir $@))
|
||||
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue