Debug option added to makefiles
[keystone-rtos/ibl.git] / src / util / i2cWrite / makestg2
1 #*********************************************************************************
2 #* FILE PURPOSE: Build the I2C EEPROM writer 
3 #*********************************************************************************
4 #* FILE NAME: makestg2
5 #*
6 #* DESCRIPTION: Builds the i2c writer
7 #*
8 #*********************************************************************************
11 DEVICES= c6455 c6472 c6474
13 ifndef IBL_ROOT
14  IBL_ROOT=../..
15 endif
17 ECODIR= $(IBL_ROOT)/util/i2cWrite
19 MODULES= hw
20 CLEAN_MODULES=$(addprefix clean_,$(MODULES))
22 CSRC= i2cWrite.c
24 # enable debug info in the compile
25 UTIL=yes
27 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
29 C6X_C_DIR=   $(IBL_ROOT)/hw/i2c
30 C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
31 C6X_C_DIR+= ;$(IBL_ROOT)/device/$(TARGET)
32 C6X_C_DIR+= ;$(IBL_ROOT)/arch/$(ARCH)
33 C6X_C_DIR+= ;$(STDINC)
34 export C6X_C_DIR
36 export ARCH
37 export TARGET
39 $(DEVICES): gen_cdefdep $(MODULES) $(OBJS) i2cWrite.cmd
40         $(LD) -o i2cWrite.out -m i2cWrite.map i2cWrite.cmd $(RTLIBS)
43 $(MODULES):
44         @echo making $@
45         make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
48 clean2: $(CLEAN_MODULES)
49         @rm -f $(OBJS)
50         @rm -f $(subst .c,.dc,$(CSRC))
52 $(CLEAN_MODULES):
53         @echo cleaning $(subst clean_, ,$@)
54         make -C $(IBL_ROOT)/$(subst clean,,$@)/$(ARCH)/make clean
56 $(OBJS): cdefdep
59 gen_cdefdep:
60         @echo Checking command line dependencies
61         @echo $(ENDIAN) $(ARCH) > cdefdep.tmp
62         @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '