1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

Makefile.include: Use LDLIBS & LIBDEPS

This commit is contained in:
Saleem Rashid 2017-12-11 19:42:51 +00:00 committed by Pavol Rusnak
parent 36eac04e61
commit 7c630141d4

View File

@ -82,13 +82,18 @@ LDFLAGS += --static \
-Wl,--end-group \
-L$(TOP_DIR) \
-L$(TOOLCHAIN_DIR)/lib \
-L$(TOOLCHAIN_DIR)/lib/stm32/f2 \
-T$(LDSCRIPT) \
-nostartfiles \
-Wl,--gc-sections \
$(CPUFLAGS) \
$(FPUFLAGS)
LDLIBS += -ltrezor
LIBDEPS += $(TOP_DIR)/libtrezor.a
LDLIBS += -lopencm3_stm32f2
LIBDEPS += $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a
all: $(NAME).bin
flash: $(NAME).bin
@ -127,8 +132,8 @@ $(NAME).srec: $(NAME).elf
$(NAME).list: $(NAME).elf
$(OBJDUMP) -S $(NAME).elf > $(NAME).list
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a $(TOP_DIR)/libtrezor.a
$(LD) -o $(NAME).elf $(OBJS) -ltrezor -lopencm3_stm32f2 $(LDFLAGS)
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
$(LD) -o $(NAME).elf $(OBJS) $(LDLIBS) $(LDFLAGS)
%.o: %.s Makefile
$(AS) $(CPUFLAGS) -o $@ $<