Proper selection of mkdir depending on the OS

This commit is contained in:
Alex Taradov 2019-09-30 19:03:06 -07:00
parent e53e5c79fb
commit 52e7951dc2
4 changed files with 30 additions and 4 deletions

View File

@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
ifeq ($(OS), Windows_NT)
MKDIR = gmkdir
else
MKDIR = mkdir
endif
CFLAGS += -W -Wall --std=gnu99 -Os
CFLAGS += -fno-diagnostics-show-caret
CFLAGS += -fdata-sections -ffunction-sections
@ -61,7 +67,7 @@ $(BUILD)/$(BIN).bin: $(BUILD)/$(BIN).elf
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
directory:
@gmkdir -p $(BUILD)
@$(MKDIR) -p $(BUILD)
size: $(BUILD)/$(BIN).elf
@echo size:
@ -72,3 +78,4 @@ clean:
@-rm -rf $(BUILD)
-include $(wildcard $(BUILD)/*.d)

View File

@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
ifeq ($(OS), Windows_NT)
MKDIR = gmkdir
else
MKDIR = mkdir
endif
CFLAGS += -W -Wall --std=gnu99 -Os
CFLAGS += -fno-diagnostics-show-caret
CFLAGS += -fdata-sections -ffunction-sections
@ -61,7 +67,7 @@ $(BUILD)/$(BIN).bin: $(BUILD)/$(BIN).elf
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
directory:
@gmkdir -p $(BUILD)
@$(MKDIR) -p $(BUILD)
size: $(BUILD)/$(BIN).elf
@echo size:
@ -72,3 +78,4 @@ clean:
@-rm -rf $(BUILD)
-include $(wildcard $(BUILD)/*.d)

View File

@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
ifeq ($(OS), Windows_NT)
MKDIR = gmkdir
else
MKDIR = mkdir
endif
CFLAGS += -W -Wall --std=gnu11 -Os
CFLAGS += -fno-diagnostics-show-caret
CFLAGS += -fdata-sections -ffunction-sections
@ -64,7 +70,7 @@ $(BUILD)/$(BIN).bin: $(BUILD)/$(BIN).elf
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
directory:
@gmkdir -p $(BUILD)
@$(MKDIR) -p $(BUILD)
size: $(BUILD)/$(BIN).elf
@echo size:

View File

@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
ifeq ($(OS), Windows_NT)
MKDIR = gmkdir
else
MKDIR = mkdir
endif
CFLAGS += -W -Wall -Wextra --std=gnu99 -O2
CFLAGS += -fno-diagnostics-show-caret
CFLAGS += -fdata-sections -ffunction-sections
@ -61,7 +67,7 @@ $(BUILD)/$(BIN).bin: $(BUILD)/$(BIN).elf
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
directory:
@gmkdir -p $(BUILD)
@$(MKDIR) -p $(BUILD)
size: $(BUILD)/$(BIN).elf
@echo size: