mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 11:21:11 +00:00
Makefile.include: Use LDLIBS & LIBDEPS
This commit is contained in:
parent
36eac04e61
commit
7c630141d4
@ -82,13 +82,18 @@ LDFLAGS += --static \
|
|||||||
-Wl,--end-group \
|
-Wl,--end-group \
|
||||||
-L$(TOP_DIR) \
|
-L$(TOP_DIR) \
|
||||||
-L$(TOOLCHAIN_DIR)/lib \
|
-L$(TOOLCHAIN_DIR)/lib \
|
||||||
-L$(TOOLCHAIN_DIR)/lib/stm32/f2 \
|
|
||||||
-T$(LDSCRIPT) \
|
-T$(LDSCRIPT) \
|
||||||
-nostartfiles \
|
-nostartfiles \
|
||||||
-Wl,--gc-sections \
|
-Wl,--gc-sections \
|
||||||
$(CPUFLAGS) \
|
$(CPUFLAGS) \
|
||||||
$(FPUFLAGS)
|
$(FPUFLAGS)
|
||||||
|
|
||||||
|
LDLIBS += -ltrezor
|
||||||
|
LIBDEPS += $(TOP_DIR)/libtrezor.a
|
||||||
|
|
||||||
|
LDLIBS += -lopencm3_stm32f2
|
||||||
|
LIBDEPS += $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a
|
||||||
|
|
||||||
all: $(NAME).bin
|
all: $(NAME).bin
|
||||||
|
|
||||||
flash: $(NAME).bin
|
flash: $(NAME).bin
|
||||||
@ -127,8 +132,8 @@ $(NAME).srec: $(NAME).elf
|
|||||||
$(NAME).list: $(NAME).elf
|
$(NAME).list: $(NAME).elf
|
||||||
$(OBJDUMP) -S $(NAME).elf > $(NAME).list
|
$(OBJDUMP) -S $(NAME).elf > $(NAME).list
|
||||||
|
|
||||||
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a $(TOP_DIR)/libtrezor.a
|
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
|
||||||
$(LD) -o $(NAME).elf $(OBJS) -ltrezor -lopencm3_stm32f2 $(LDFLAGS)
|
$(LD) -o $(NAME).elf $(OBJS) $(LDLIBS) $(LDFLAGS)
|
||||||
|
|
||||||
%.o: %.s Makefile
|
%.o: %.s Makefile
|
||||||
$(AS) $(CPUFLAGS) -o $@ $<
|
$(AS) $(CPUFLAGS) -o $@ $<
|
||||||
|
Loading…
Reference in New Issue
Block a user