#*******************************************************************************
#
#                   SiRF Technology, Inc. GPS Software                    
#                                                                         
#    Copyright (c) 1996-2015 by SiRF Technology, Inc. a CSR plc Company   
#                          All rights reserved.                           
#                                                                         
#    This Software is protected by United States copyright laws and       
#    international treaties.  You may not reverse engineer, decompile     
#    or disassemble this Software.                                        
#                                                                         
#    WARNING:                                                             
#    This Software contains SiRF Technology Inc.s confidential and        
#    proprietary information. UNAUTHORIZED COPYING, USE, DISTRIBUTION,    
#    PUBLICATION, TRANSFER, SALE, RENTAL OR DISCLOSURE IS PROHIBITED      
#    AND MAY RESULT IN SERIOUS LEGAL CONSEQUENCES.  Do not copy this      
#    Software without SiRF Technology, Inc.s  express written             
#    permission.   Use of any portion of the contents of this Software    
#    is subject to and restricted by your signed written agreement with   
#    SiRF Technology, Inc.                                                
#                                                                             
#*******************************************************************************


# Makefile for I2C SIRFflashEngineEP library
#
# NOTE:  TOOLCHAIN
#        This project was tested with Beaglebone black board
#        using gcc-linaro-arm-linux-gnueabihf toolchain.
#        Please change the variable CC and AR to the appropriate toolchain
#


TDIR = ../../../../src
COMDIR = ../../../../../../common
VPATH = $(TDIR)
OBJS = SiRFflashEngineEP.o target_i2c.o loader.o chksum.o command.o \
       pckunpck.o sndrcv.o targetInfo.o

CC = /home/user/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc
AR = /home/user/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-ar

CFLAGS= -I$(TDIR) -I$(COMDIR) -c -O2 -DCOMM_I2C

all: SiRFflashEngineEP_i2c.a

SiRFflashEngineEP_i2c.a : $(OBJS)
	$(AR) -rcvs $@ $^


%.a : $(OBJS)
	$(AR) -rcvs $@ $^

%.o : %.c
	$(CC) -c $(CFLAGS) -o $@ $^
	  
clean:
	rm -f *.o SiRFflashEngineEP_i2c.a

.PRECIOUS : %.o
