software: hide and delete .ts files
[litex.git] / software / bios / Makefile
index 128bc17ee1897c1ca2982c6ce2841c1ed7ac1cfa..10cae9632214757c60c4ac28c32534afc6614123 100644 (file)
@@ -1,7 +1,7 @@
 M2DIR=../..
-include $(M2DIR)/software/include.mak
+include $(M2DIR)/software/common.mak
 
-OBJECTS=crt0.o isr.o ddrinit.o main.o microudp.o tftp.o boot-helper.o boot.o
+OBJECTS=crt0.o isr.o sdram.o main.o microudp.o tftp.o boot-helper.o boot.o dataflow.o
 
 all: bios.bin
 
@@ -18,16 +18,26 @@ bios.elf: linker.ld $(OBJECTS) libs
 bios-rescue.elf: linker-rescue.ld $(OBJECTS) libs
 
 %.elf:
-       $(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) -L$(M2DIR)/software/libbase -lbase
+       $(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) \
+               -L$(M2DIR)/software/libbase \
+               -L$(M2DIR)/software/libcompiler-rt \
+               -lbase -lcompiler-rt
        chmod -x $@
 
+%.o: %.c
+       $(compile-dep)
+
+%.o: %.S
+       $(assemble)
+
 libs:
+       make -C $(M2DIR)/software/libcompiler-rt
        make -C $(M2DIR)/software/libbase
 
 flash: bios.bin
        m1nor bios.bin
 
 clean:
-       rm -f $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~
+       rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~
 
 .PHONY: clean libs flash