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
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
SIZE = arm-none-eabi-size
|
SIZE = arm-none-eabi-size
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
MKDIR = gmkdir
|
||||||
|
else
|
||||||
|
MKDIR = mkdir
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -W -Wall --std=gnu99 -Os
|
CFLAGS += -W -Wall --std=gnu99 -Os
|
||||||
CFLAGS += -fno-diagnostics-show-caret
|
CFLAGS += -fno-diagnostics-show-caret
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
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 $@
|
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
|
||||||
|
|
||||||
directory:
|
directory:
|
||||||
@gmkdir -p $(BUILD)
|
@$(MKDIR) -p $(BUILD)
|
||||||
|
|
||||||
size: $(BUILD)/$(BIN).elf
|
size: $(BUILD)/$(BIN).elf
|
||||||
@echo size:
|
@echo size:
|
||||||
@ -72,3 +78,4 @@ clean:
|
|||||||
@-rm -rf $(BUILD)
|
@-rm -rf $(BUILD)
|
||||||
|
|
||||||
-include $(wildcard $(BUILD)/*.d)
|
-include $(wildcard $(BUILD)/*.d)
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
|
|||||||
OBJCOPY = arm-none-eabi-objcopy
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
SIZE = arm-none-eabi-size
|
SIZE = arm-none-eabi-size
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
MKDIR = gmkdir
|
||||||
|
else
|
||||||
|
MKDIR = mkdir
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -W -Wall --std=gnu99 -Os
|
CFLAGS += -W -Wall --std=gnu99 -Os
|
||||||
CFLAGS += -fno-diagnostics-show-caret
|
CFLAGS += -fno-diagnostics-show-caret
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
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 $@
|
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
|
||||||
|
|
||||||
directory:
|
directory:
|
||||||
@gmkdir -p $(BUILD)
|
@$(MKDIR) -p $(BUILD)
|
||||||
|
|
||||||
size: $(BUILD)/$(BIN).elf
|
size: $(BUILD)/$(BIN).elf
|
||||||
@echo size:
|
@echo size:
|
||||||
@ -72,3 +78,4 @@ clean:
|
|||||||
@-rm -rf $(BUILD)
|
@-rm -rf $(BUILD)
|
||||||
|
|
||||||
-include $(wildcard $(BUILD)/*.d)
|
-include $(wildcard $(BUILD)/*.d)
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
|
|||||||
OBJCOPY = arm-none-eabi-objcopy
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
SIZE = arm-none-eabi-size
|
SIZE = arm-none-eabi-size
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
MKDIR = gmkdir
|
||||||
|
else
|
||||||
|
MKDIR = mkdir
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -W -Wall --std=gnu11 -Os
|
CFLAGS += -W -Wall --std=gnu11 -Os
|
||||||
CFLAGS += -fno-diagnostics-show-caret
|
CFLAGS += -fno-diagnostics-show-caret
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
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 $@
|
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
|
||||||
|
|
||||||
directory:
|
directory:
|
||||||
@gmkdir -p $(BUILD)
|
@$(MKDIR) -p $(BUILD)
|
||||||
|
|
||||||
size: $(BUILD)/$(BIN).elf
|
size: $(BUILD)/$(BIN).elf
|
||||||
@echo size:
|
@echo size:
|
||||||
|
|||||||
@ -9,6 +9,12 @@ CC = arm-none-eabi-gcc
|
|||||||
OBJCOPY = arm-none-eabi-objcopy
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
SIZE = arm-none-eabi-size
|
SIZE = arm-none-eabi-size
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
MKDIR = gmkdir
|
||||||
|
else
|
||||||
|
MKDIR = mkdir
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -W -Wall -Wextra --std=gnu99 -O2
|
CFLAGS += -W -Wall -Wextra --std=gnu99 -O2
|
||||||
CFLAGS += -fno-diagnostics-show-caret
|
CFLAGS += -fno-diagnostics-show-caret
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
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 $@
|
@$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
|
||||||
|
|
||||||
directory:
|
directory:
|
||||||
@gmkdir -p $(BUILD)
|
@$(MKDIR) -p $(BUILD)
|
||||||
|
|
||||||
size: $(BUILD)/$(BIN).elf
|
size: $(BUILD)/$(BIN).elf
|
||||||
@echo size:
|
@echo size:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user