Makefile: sort out CFLAGS and LDFLAGS
This commit is contained in:
parent
5ca5e6972b
commit
3e33f2e0f1
4 changed files with 39 additions and 20 deletions
|
@ -56,7 +56,7 @@ $(eval $(call COMPILE_RULES,$(2)))
|
|||
$(1).elf: $$($(2)OBJS)
|
||||
@mkdir -p $$(dir $$@)
|
||||
@echo + LD "->" $$(patsubst $$(CURDIR)/%,%,$(1).elf)
|
||||
@$$(LD) $$($(2)_LDFLAGS) -o $$@ --start-group $$($(2)OBJS) --end-group
|
||||
@$$(LD) $$($(2)LDFLAGS) -o $$@ --start-group $$($(2)OBJS) --end-group
|
||||
$(1).bin: $(1).elf
|
||||
@echo + OBJCOPY "->" $$(patsubst $$(CURDIR)/%,%,$(1))
|
||||
@$$(OBJCOPY) -S --set-section-flags .bss=alloc,contents -O binary $(1).elf $(1).bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue