Make make rebuild on header changes
This commit is contained in:
parent
a67d2a1945
commit
1cabaf2b04
3 changed files with 8 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
*.o
|
||||
*.a
|
||||
*.d
|
||||
*.elf
|
||||
*.img
|
||||
*.lst
|
||||
|
|
2
Makefile
2
Makefile
|
@ -19,7 +19,7 @@ all: $(TARGET)
|
|||
|
||||
$(TARGET): $(OBJS) $(LIBS)
|
||||
@echo " LINK $@"
|
||||
$(Q)$(CC) $(CFLAGS) -o $(TARGET).elf -Xlinker -Map=$(TARGET).map -T linker.ld -nostartfiles $(OBJS) $(LIBS)
|
||||
$(Q)$(CXX) $(CFLAGS) -o $(TARGET).elf -Xlinker -Map=$(TARGET).map -T linker.ld -nostartfiles $(OBJS) $(LIBS)
|
||||
$(Q)$(PREFIX)objdump -d $(TARGET).elf | $(PREFIX)c++filt > $(TARGET).lst
|
||||
$(Q)$(PREFIX)objcopy $(TARGET).elf -O binary $(TARGET).img
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ PREFIX ?= arm-none-eabi-
|
|||
|
||||
CC = $(PREFIX)gcc
|
||||
CPP = $(PREFIX)g++
|
||||
CXX = $(PREFIX)g++
|
||||
AS = $(CC)
|
||||
LD = $(PREFIX)ld
|
||||
AR = $(PREFIX)ar
|
||||
|
@ -39,10 +40,13 @@ else
|
|||
endif
|
||||
|
||||
AFLAGS += $(ARCH)
|
||||
CFLAGS += $(ARCH) -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-psabi -fsigned-char -fno-builtin -Ofast -DNDEBUG
|
||||
CFLAGS += $(ARCH) -MMD -MP -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-psabi -fsigned-char -fno-builtin -Ofast -DNDEBUG
|
||||
CPPFLAGS := $(CFLAGS) $(CPPFLAGS) -fno-exceptions -fno-rtti -std=c++0x -Wno-write-strings
|
||||
CFLAGS += -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections -u _printf_float -std=gnu99
|
||||
|
||||
DEPENDS := $(patsubst %.o,%.d,$(OBJS))
|
||||
-include $(DEPENDS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
%.o: %.S
|
||||
|
|
Loading…
Reference in a new issue