#***********************************************************
#
# 	Standard-Makefile written by Marten Wobst
#
#***********************************************************

ASC	= exec ../../../../armcc/asmconv.sh
AS	= ../../../../armcc/bin/arm-elf-as.exe -EL -mthumb-interwork 
LD	= ../../../../armcc/bin/arm-elf-ld.exe 
OC	= ../../../../armcc/bin/arm-elf-objcopy.exe
RE	= ../../../../armcc/bin/arm-elf-readelf.exe
CC	= ../../../../armcc/bin/arm-elf-gcc.exe  

INC	= -I . -I ../../.\

	    
LDFLG	= --script ../../../../armcc/system/lnkscript\
	  -L ../../../../armcc/lib/gcc-lib/arm-elf/3.4.0/interwork/\
	  
	   
CFLAGS  = -mthumb-interwork -mlong-calls -fverbose-asm  -Wall -mcpu=arm7tdmi -O3

EOBJS   = ../lzss_dec_bigendian_long.o\
	  ../../stdfkt/simple.o
		
	
OBJ 	= test.o

all:    $(OBJ)
	$(LD) $(OBJ) $(EOBJS) $(LDFLG) -o test.elf
	$(OC) -v -O binary test.elf test.gba
	$(RE) -l test.elf
	
%.o:   %.s 
	$(ASC)  $< >temp.s
	$(AS)   temp.s $(INC) -o $@
	
%.o:   %.c 
	$(CC)   $< $(INC) -o $@	
	
clean:
	rm -rf $(OBJ)	
	


	

