GNUmakefile 684 Bytes

BBDEPTH = ../..
include $(BBDEPTH)/BBdefs

LASINCS = -I$(ROOT)/usr/include/PR -I..
LCINCS = -I$(ROOT)/usr/include/PR -I..
OPTIMIZER = -O -g

VPATH=..

ASFILES= test.s

LDFLAGS = -Ttext 0xbfc00000 -N

TARGETS= test.dat test1.dat

LDIRT += $(TARGETS:.dat=.bin) $(TARGETS:.dat=.elf)

.SUFFIXES: .bin .dat .elf

include $(BBDEPTH)/BBrules

default: $(TARGETS)

.s.elf:
	$(ASF) -o $*.o $<
	$(LD) $(LDFLAGS) crt0.o $*.o -o $*.elf

.elf.bin:
	mips-linux-objcopy -O binary -R .mdebug -R .reginfo $*.elf $*.bin

.bin.dat:
	od -v -w4 -An -tx1 $*.bin | tr -d " " > $*.dat

.c.elf:
	$(CCF) -c -o $*.o $<
	$(LD) $(LDFLAGS) crt0.o $*.o -o $*.elf

$(TARGETS) : crt0.o ../cpusim.h

install exports: