Proper selection of mkdir depending on the OS
This commit is contained in:
parent
e53e5c79fb
commit
52e7951dc2
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user