# Zelda Roth
# Ported to Dreamcast by Neoblast

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

# List all of your C files here, but change the extension to ".o"
# Include "romdisk.o" if you want a rom disk.
OBJS = Audio.o Bouclier.o Caisse.o Carte.o Encyclopedie.o Ennemi.o Generique.o Jeu.o Joueur.o Keyboard.o Listable.o main.o Menu.o Monde.o Objet.o Personnage.o Pnj.o Projectile.o Snipe.o Statut.o Texte.o ZoneRect.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 for use in DC:
KOS_CFLAGS += -DDREAMCAST

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 -lgcc -lSDL_gfx -lSDL_image_124 -lSDL_mixer_126 -lSDL_129 -lpng_128 -lz_123 -lm -lstdc++ $(KOS_LIBS)

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

dist:
	rm -f $(OBJS)
	$(KOS_STRIP) $(TARGET)

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