diff --git a/src/Makefile b/src/Makefile index d18c15a..e7816c2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,7 @@ else endif PACKHEX=$(MIPS_HOME)/tools/packhex -LIBS=-lm -lsys +LIBS=-lm -lc -lsys AS=mipsel-elf-as AR=mipsel-elf-ar @@ -65,6 +65,14 @@ hello.elf: hello.c libsys.a $(FLASHGEN) $@.bin $(ENDIAN_FLAGS) cat $@.srec | $(PACKHEX) > $@.pack +hello_sim.elf: hello.c libsys_sim.a + $(CC) $(CFLAGS) -o $@ -Os hello.c -lsys_sim >$@.map + $(OBJDUMP) -d $@ > $@.dis + $(OBJCOPY) $@ -O binary $@.bin + $(OBJCOPY) -O srec $@ $@.srec + $(FLASHGEN) $@.bin $(ENDIAN_FLAGS) + cat $@.srec | $(PACKHEX) > $@.pack + blittertest.elf: blittertest.c libsys.a $(CC) $(CFLAGS) -o $@ -Os blittertest.c $(LIBS) >$@.map $(OBJDUMP) -d $@ > $@.dis