CC=mipsel-elf-gcc LD=mipsel-elf-ld OBJCOPY=mipsel-elf-objcopy CFLAGS=-Wall -Wextra LFLAGS= .phony: all clean all: fw.dat %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< %.o: %.s $(CC) $(CFLAGS) -c -o $@ $< fw.o: main.o $(LD) $(LFLAGS) -r -o $@ $^ fw: lnk.cmd boot.o fw.o $(LD) $(LFLAGS) -T lnk.cmd -o $@ boot.o fw.o fw.bin: fw $(OBJCOPY) -O binary $< $@ fw.dat: fw.bin hexdump -e '1/4 "%d\n"' -v $< >$@ clean: rm -f *.o fw fw.bin fw.dat