INCDIRS = -I ./ -I ./nec -I ./temp -I ./filters 
#OPTIMIZ = -O3 -finline-functions -mcpu=arm920t \
#          -fno-exceptions  -fno-builtin -ffreestanding  \
#           -mno-thumb-interwork -fno-common -mstructure-size-boundary=8 \
#           -fomit-frame-pointer
STRIP = -s


LDFLAGS = $(STRIP) $(LDBASEFLAGS)

export CCBASE=c:/devkitadv

export CUSER=-DLITTLE_ENDIAN -DGP32 $(INCDIRS) $(OPTIMIZ) -D__ASSEMBLY__
include $(CCBASE)/gp32.mk

SRCDIR = .
BINDIR = /cygdrive/c
LIBDIRS = -L ./mod

%.o : %.rc
	$(WRES) $(CPPFLAGS) $< $@

OBJS	= gpu.o io.o log.o memory.o oswangp32.o rom.o ws.o gpmain.o \
	  nec/nec.o xlatgp32.o mygraphic.o gpfilereq.o myfont8x8.o
                  
TARGET =  $(BINDIR)/oswanGP32


all:	$(TARGET).gxb


cleanobjs:
	rm -f $(OBJS)

cleanbin:
	rm -f $(TARGET)

clean:	cleanobjs cleanbin

# Dependency rules
$(TARGET).gxb: $(TARGET).elf
$(TARGET).elf: $(OBJS)
	$(LINK)	