#
OWNER=bin
GROUP=bin
CTAGS= ctags -x >tags
CFLAGS= -O
LDFLAGS= -s -O
CC=../../../../armcc/bin/arm-agb-elf-gcc.exe  
RE=../../../../armcc/bin/arm-agb-elf-readelf.exe
AS=../../../../armcc/bin/arm-agb-elf-as.exe -EL -mthumb-interwork 
ASC=exec ../../../../armcc/asmconv.sh
LD=../../../../armcc/bin/arm-agb-elf-ld.exe 
OC=../../../../armcc/bin/arm-agb-elf-objcopy.exe
GET=
SRCS=
ASMS=
OBJS=
SHAR=shar
MANDIR=/usr/man/manl/printenv.l
BINDIR=/usr/local/bin
DEPEND= makedepend $(CFLAGS)

all:    test

# To get things out of the revision ntrol system
$(SRCS): $(GET) $@
	 $(CC) $(CFLAGS) -c $*.c

test: $(OBJS)
	../../../tools_source/bin2s/bin2s.exe -l test.mod >test.mod.i
	$(ASC) play_mod.s >temp.s
	$(AS) temp.s -o play_mod.o -I ../. -I ../../.
	$(LD) play_mod.o ../../stdfkt/stdm0io.o ../../stdfkt/simple.o ../sound_mix.o ../sound_mod.o ../sound_mod_effekts.o ../sound_mod_effekts_thumb.o ../../stdmath/fast_div.o $(OBJS) --script ../../../../armcc/system/lnkscript -o play_mod.elf  -L ../../../../armcc/lib/gcc-lib/arm-agb-elf/3.3.2/interwork/  
	$(OC) -v -O binary play_mod.elf play_mod.gba
	$(RE) -l play_mod.elf
	rm temp.s
