summaryrefslogtreecommitdiffstats
path: root/flash/bootloader/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'flash/bootloader/Makefile')
-rw-r--r--flash/bootloader/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/flash/bootloader/Makefile b/flash/bootloader/Makefile
index e7bd17aae9..edc32113c6 100644
--- a/flash/bootloader/Makefile
+++ b/flash/bootloader/Makefile
@@ -46,7 +46,7 @@ endif
SRC := $(wildcard *.c)
-OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
+OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/sh_nrv2e_d8.o
ifdef NO_ROM
LINKFILE = $(OBJDIR)/no_rom.lds
@@ -64,9 +64,12 @@ ifndef NO_ROM
$(TOOLSDIR)/scramble $(OBJDIR)/$(TARGET).bin $(OBJDIR)/$(TARGET).ajz
endif
-$(OBJDIR)/$(TARGET).elf : $(OBJS)
- $(CC) -Os -nostdlib -o $(OBJDIR)/$(TARGET).elf -L$(OBJDIR) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
+$(OBJDIR)/$(TARGET).elf : $(OBJS)
+ $(CC) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
+# cross-reference, saves code duplication
+$(OBJDIR)/sh_nrv2e_d8.o : ../../firmware/decompressor/sh_nrv2e_d8.S
+ $(CC) $(CFLAGS) -c $< -o $@
clean:
-rm -f \