GNUmakefile 960 Bytes
include $(ROOT)/usr/include/make/commondefs
include $(ROOT)/usr/include/make/PRdefs

FLASH_FILE = testapp.nand

OBJCOPY = mips-linux-objcopy
REMOVE_SECTS = -R .reginfo -R .note -R .comment -R .mdebug

TARGETS = testapp.hex
ASFILES = ../entry.s skapi.s 
CFILES  =  ../message.c testapp.c

OPTIMIZER=

LCOPTS += -mips3 -g -G 0
LASOPTS += -mips3 -g -G 0
ifdef ENTRY_ADDR
LLDOPTS += -Ttext $(ENTRY_ADDR) -N
else
LLDOPTS += -Ttext 0x80004000 -N
endif
LDIRT += cpu.log*

ifeq ($(BIG_APP), 1)
LASOPTS += -DBIG_APP
LCOPTS += -DBIG_APP
endif

# log messages into dram
ifeq ($(LOG_MEM), 1)
LCOPTS += -DLOG_MEM
endif

LDIRT += testapp.elf testapp.bin ../entry.o ../message.o

.PRECIOUS: %.bin

default: $(TARGETS)

#test: default copy

testapp.elf: $(OBJECTS)
	$(CCF) -o testapp.elf $(OBJECTS) $(LDFLAGS)

%.bin: %.elf
	$(OBJCOPY) -O binary -S $(REMOVE_SECTS) $< $@

%.hex: %.bin
	od -v -w4 -An -tx1 $< | tr -d " " > $@
	
install exports headers:

include $(COMMONRULES)