# Eier - Sarah-Maries Eierjagd 0.1
# Copyright (c) 2005, Patrick Gerdsmeier <patrick@gerdsmeier.net>
# DC porting by Ron, updated by Indiket

INC=-I../include 

OPT= -O3 -fstrict-aliasing -fexpensive-optimizations -foptimize-register-move  -freduce-all-givs -frename-registers -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns -fno-sched-interblock -fsched-spec-load -fsingle-precision-constant -fstrength-reduce -fstrict-aliasing -ffast-math -fno-common  -fno-builtin -fno-exceptions -fargument-noalias-global -fomit-frame-pointer# -Wall -g  -ffreestanding

KOS_CFLAGS = $(INC) -ml -m4-single-only -D_arch_dreamcast -D_arch_sub_pristine -D_SDL \
$(OPT) \
-I$(KOS_BASE)/../../sh-elf/sh-elf/include -I$(KOS_BASE)/../kos-ports/include -I$(KOS_BASE)/include -I$(KOS_BASE)/kernel/arch/dreamcast/include -I$(KOS_BASE)/addons/include-I$(KOS_BASE)/include -I$(KOS_BASE)/addons/include -I$(KOS_BASE)/../kos-ports/include  -I$(KOS_BASE)/../kos-ports/include/zlib-1.2.3 -I$(KOS_BASE)/../kos-ports/SDL-1.2.9/include -I$(KOS_BASE)/../kos-ports/SDL_image-1.2.4


KOS_CPPFLAGS+= ${KOS_CFLAGS} $(INC)

TARGET = Eier.elf

.PHONY: all all-before all-after clean clean-custom

all: all-before $(TARGET) all-after

include dreamcast.mak

OBJS = main.o graphics.o
   
 
include $(KOS_BASE)/Makefile.rules

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

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

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