diff options
Diffstat (limited to 'c/src/lib/libbsp/mips/shared/gdbstub/Makefile')
-rw-r--r-- | c/src/lib/libbsp/mips/shared/gdbstub/Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/mips/shared/gdbstub/Makefile b/c/src/lib/libbsp/mips/shared/gdbstub/Makefile new file mode 100644 index 0000000000..9057011b4e --- /dev/null +++ b/c/src/lib/libbsp/mips/shared/gdbstub/Makefile @@ -0,0 +1,38 @@ +CC = mips64orion-idt-elf-gcc +CFLAGS = -g -Wa,-ahld -Wall -membedded-data -O3 +AS = mips64orion-idt-elf-as +ASFLAGS = -ahld +LD = mips64orion-idt-elf-ld +LDFLAGS = -t -s + +# Inference rules + +.SUFFIXES: $(SUFFIXES) .out .ld + +.ld.out: + $(LD) $(LDFLAGS) -T $< -Map $*.map -o $*.out +.c.o: + $(CC) $(CFLAGS) -c $< >$*.L + +.S.o: + $(CC) $(CFLAGS) -c $< >$*.L + +.s.o: + $(AS) $(ASFLAGS) -o $*.o $< >$*.L + +# Targets + +r46kstub.hex: r46kstub.out + mips64orion-idt-elf-objcopy -S -R .bss -R .data -R .reginfo \ + -O srec r46kstub.out r46kstub.hex + +clean: + rm -f *.L *.map *.o *.out *.hex + +# Dependencies + +r46kstub.out: r46kstub.ld r46kstub.o stubinit.o + +r46kstub.o: mips_opcode.h r4600.h limits.h gdb_if.h r46kstub.c + +stubinit.o: r4600.h ioaddr.h gdb_if.h stubinit.S |