litex/misoc/software/bios/Makefile

41 lines
817 B
Makefile
Raw Normal View History

include ../include/generated/variables.mak
include $(MISOC_DIRECTORY)/software/common.mak
2012-02-05 14:01:28 -05:00
OBJECTS=isr.o sdram.o main.o boot-helper-$(CPU).o boot.o dataflow.o
2012-02-05 14:01:28 -05:00
all: bios.bin
# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)
%.bin: %.elf
$(OBJCOPY) -O binary $< $@
chmod -x $@
$(PYTHON) -m misoc.tools.mkmscimg $@
2012-02-05 14:01:28 -05:00
bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS)
2012-02-05 14:01:28 -05:00
%.elf:
2013-07-11 12:36:26 -04:00
$(LD) $(LDFLAGS) -T $< -N -o $@ \
../libbase/crt0-$(CPU).o \
2013-07-11 12:36:26 -04:00
$(OBJECTS) \
-L../libnet \
-L../libbase \
-L../libcompiler_rt \
-lnet -lbase-nofloat -lcompiler_rt
2012-02-05 14:01:28 -05:00
chmod -x $@
main.o: $(BIOS_DIRECTORY)/main.c
2013-02-17 08:29:11 -05:00
$(compile-dep)
%.o: $(BIOS_DIRECTORY)/%.c
$(compile-dep)
%.o: $(BIOS_DIRECTORY)/%.S
$(assemble)
2012-02-05 14:01:28 -05:00
clean:
2013-05-28 10:15:30 -04:00
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin .*~ *~
2012-02-17 12:16:29 -05:00
.PHONY: all main.o clean