#
# Basic KallistiOS skeleton / test program
# (c)2001 Dan Potter
#   

# Put the filename of the output binary here
TARGET = tictactoe.elf

# List all of your C files here, but change the extension to ".o"
OBJS = pal.o tictactoe.o line.o

# If you define this, the Makefile.rules will create a romdisk.o for you
# from the named dir.
KOS_ROMDISK_DIR = romdisk

#FLAGS: -DDEBUG

all: rm-elf $(TARGET)

include $(KOS_BASE)/Makefile.rules

clean:
	-rm -f $(TARGET) $(OBJS) romdisk.*

rm-elf:
	-rm -f $(TARGET) romdisk.*

$(TARGET): $(OBJS) romdisk.o $(PROBJS)
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
		$(OBJS) romdisk.o $(PROBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -loggvorbisplay -lgcc -lm $(KOS_LIBS)

run: $(TARGET)
	$(KOS_LOADER) $(TARGET)

bin:
	$(KOS_OBJCOPY) -O binary -R .stack $(TARGET) tictactoe.bin
