#
# Basic KallistiOS skeleton / test program
# Copyright (C)2001-2004 Dan Potter
#   

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

# List all of your C files here, but change the extension to ".o"
OBJS = src/Game.o src/main.o src/Map.o src/SFont/SFont.o

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

# The rm-elf step is to remove the target before building, to force the
# re-creation of the rom disk.
all: rm-elf $(TARGET)

include $(KOS_BASE)/Makefile.rules

KOS_CFLAGS += -DDREAMCAST -Isrc/SFont -I$(KOS_BASE)/addons/include/SDL

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

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

$(TARGET): $(OBJS) romdisk.o
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
		$(OBJS) romdisk.o $(OBJEXTRA) -L$(KOS_BASE)/lib -lgcc -lSDL_image_124 -lpng_128 -lz_123 -lSDL_1213 -lm -lstdc++ $(KOS_LIBS)

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

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