#
# Basic KallistiOS skeleton / test program
# Copyright (C)2001-2004 Dan Potter
#
# Epiphany 0.7
# Ported to Dreamcast by Indiket

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

# List all of your C files here, but change the extension to ".o"
# Include "romdisk.o" if you want a rom disk.
OBJS = 	src/commandline_configuration.o \
		src/emdlparser.o \
		src/entity.o \
		src/entity_factory.o \
		src/entity_manager.o \
		src/epiconfig.o \
		src/epimap.o \
		src/game.o \
		src/game_timer.o \
		src/input.o \
		src/level.o \
		src/levelmap.o \
		src/main.o \
		src/menu.o \
		src/menu_entry_bool.o \
		src/menu_entry_ranged.o \
		src/menu_list_epiphany.o \
		src/menu_list_options.o \
		src/music_manager.o \
		src/myparser.o \
		src/resource_factory.o \
		src/sample.o \
		src/screen.o \
		src/sfx.o \
		src/sprite.o \
		src/surface.o \
		src/surface_manager.o \
		src/tinyxml/tinystr.o \
		src/tinyxml/tinyxml.o \
		src/tinyxml/tinyxmlerror.o \
		src/tinyxml/tinyxmlparser.o \
		src/fonts/font.o \
		src/fonts/font_factory.o \
		src/fonts/font_manager.o \
		src/fonts/SFont.o \
		src/entities/entity_boulder.o \
		src/entities/entity_brick.o \
		src/entities/entity_door.o \
		src/entities/entity_emerald.o \
		src/entities/entity_exit.o \
		src/entities/entity_explosion.o \
		src/entities/entity_falling.o \
		src/entities/entity_flintstone.o \
		src/entities/entity_gem.o \
		src/entities/entity_grass.o \
		src/entities/entity_key.o \
		src/entities/entity_monster.o \
		src/entities/entity_peperon.o \
		src/entities/entity_player.o \
		src/entities/entity_sapphire.o \
		src/entities/entity_steel.o \
		src/entities/entity_tomato.o \
		src/entities/entity_wood.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)

# Flags needed to compile: fexceptions, frtti.
# Flags of the game: DEBUG_MODE
KOS_CPPFLAGS += -fexceptions -frtti -I./src -DDREAMCAST -DDEBUG_MODE

include $(KOS_BASE)/Makefile.rules

clean:
	-rm -f $(TARGET) $(OBJS)

rm-elf:
	-rm -f $(TARGET)

$(TARGET): $(OBJS) $(PROBJS)
	$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \
		$(OBJS) $(PROBJS) $(OBJEXTRA) -L$(KOS_BASE)/lib -lSDL_mixer_126 -lSDL_129 -lm -lstdc++ $(KOS_LIBS)

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

dist:
	rm -f $(OBJS)
	$(KOS_STRIP) $(TARGET)
	
bin:
	$(KOS_OBJCOPY) -O binary -R .stack $(TARGET) epiphany.bin
