litex/misoc/software/bios/Makefile

38 lines
715 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
%.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
$(compile)
2013-02-17 08:29:11 -05:00
%.o: $(BIOS_DIRECTORY)/%.c
$(compile)
%.o: $(BIOS_DIRECTORY)/%.S
$(assemble)
2012-02-05 14:01:28 -05:00
clean:
$(RM) $(OBJECTS) bios.elf bios.bin .*~ *~
2012-02-17 12:16:29 -05:00
.PHONY: all clean main.o