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

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

# List all of your C files here, but change the extension to ".o"
# Include "romdisk.o" if you want a rom disk.
OBJS = BarreEtAffg.o bonus.o initialisations.o interactions.o jeu.o main.o map.o menu.o Menu_Jeu.o sonore.o trajectoire.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)

KOS_CFLAGS += -DDREAMCAST -O3 -fomit-frame-pointer -ffast-math -Wno-unused -Wno-format -fno-exceptions

include $(KOS_BASE)/Makefile.rules

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

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

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

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

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