make: move stm32f0-specific CFLAGS and LDFLAGS
This commit is contained in:
parent
c815803869
commit
4a176a404c
2 changed files with 3 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -15,7 +15,6 @@ all: $(BUILD)/tbm
|
|||
CFLAGS += -Iinclude
|
||||
CFLAGS += -Wall -Wundef -Wextra -Wshadow -Wimplicit-function-declaration
|
||||
CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes
|
||||
CFLAGS += -fno-common --function-sections -fdata-sections
|
||||
|
||||
obj-y += source/main.o
|
||||
obj-y += source/shell.o
|
||||
|
@ -48,6 +47,6 @@ $(BUILD)/%.o: %.c
|
|||
$(BUILD)/tbm: $(obj) $(LDSCRIPT)
|
||||
@echo "LD $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@$(LD) -o $@ $(CFLAGS) $(LDFLAGS) -T $(LDSCRIPT) $(obj) $(LIBS)
|
||||
@$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $(obj) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -2,8 +2,10 @@ PREFIX ?= arm-none-eabi
|
|||
|
||||
LDSCRIPT = support/stm32f0-discovery.ld
|
||||
|
||||
CFLAGS += -fno-common --function-sections -fdata-sections
|
||||
LDFLAGS += -static -nostartfiles
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
LDFLAGS += -T ${LDSCRIPT}
|
||||
LIBS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
|
||||
|
||||
# Set up libopencm3.
|
||||
|
|
Loading…
Add table
Reference in a new issue