include $(ROOT)/usr/include/make/SCdefs

TARGETS = eerom.bin

ASFILES = \
        start.s

CFILES =\
	eerom.c

default: $(TARGETS)

include $(COMMONRULES)

LDIRT += eerom.elf

LLDLIBS = -lios -lioslibc -lvio

eerom.elf: $(OBJECTS)
	$(CC) -nostartfiles -mthumb-interwork -Ttext 0 -Tdata 0x84000 -o $@ $^ $(LDFLAGS) $(LDLIBS)

runtests: $(TARGETS)
	(sleep 1; ./test.py) &
	nice $(ROOT)/usr/bin/x86/sce -b eerom.bin --slowdown 200
