]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/util/i2cConfig/makestg2
Debugged the IBL two stage load process
[keystone-rtos/ibl.git] / src / util / i2cConfig / makestg2
1 #**************************************************************************
2 #* FILE PURPOSE: 2nd stage makefile for the i2c parameter writer
3 #**************************************************************************
4 #* FILE NAME: makestg2
5 #*
6 #* DESCRIPTION: Builds the i2c parameter writer for a specific target
7 #*
8 #**************************************************************************
10 DEVICES= c6455 c6472 c6474 c6474l c6457
12 ifndef IBL_ROOT
13  IBL_ROOT=../..
14 endif
16 ifeq ($(ENDIAN),big)
17  IEXT=be
18 else
19  IEXT=le
20 endif
22 ECODIR= $(IBL_ROOT)/util/i2cConfig
24 MODULES= hw
25 CLEAN_MODULES=$(addprefix clean_,$(MODULES))
28 CSRC= i2cparam.c
31 # enable debug info in the compile
32 UTIL=yes
34 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
36 C6X_C_DIR=  $(IBL_ROOT)
37 C6X_C_DIR+=;$(IBL_ROOT)/hw/i2c
38 C6X_C_DIR+=;$(IBL_ROOT)/hw/plls
39 C6X_C_DIR+=;$(STDINC)
40 C6X_C_DIR+=;$(IBL_ROOT)/cfg/$(TARGET)
41 C6X_C_DIR+=;$(IBL_ROOT)/device/$(TARGET)
42 C6X_C_DIR+=;$(IBL_ROOT)/arch/$(ARCH)
43 export C6X_C_DIR
46 export ARCH
47 export TARGET
49 CDEFS += -DIBL_I2C_CFG_EEPROM_BUS_ADDR=$(I2C_PARAM_BUS_ADDR)
51 .PHONY: i2cparam.cmd
53 $(DEVICES): gen_cdefdep $(MODULES) $(OBJS) i2cparam.cmd
54         $(LD) -o i2cparam_$(TARGET)_$(IEXT).out -m i2cparam_$(TARGET)_$(IEXT).map i2cparam.$(IEXT).oc ../../hw/c64x/make/i2c.$(IEXT).oc ../../hw/c64x/make/pll.$(IEXT).oc i2cparam.cmd $(RTLIBS)
56 $(MODULES):
57         @echo making $@
58         make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
61 clean2: $(CLEAN_MODULES)
62         @rm -f $(OBJS)
63         @rm -f $(subst .c,.dc,$(CSRC))
64         
66 $(CLEAN_MODULES):
67         @echo cleaning $(subst clean_, ,$@)
68         make -C $(IBL_ROOT)/$(subst clean_,,$@)/$(ARCH)/make clean
71 $(OBJS): cdefdep
74 gen_cdefdep:
75         @echo Checking command line dependencies
76         @echo $(TARGET) $(ARCH) > cdefdep.tmp
77         @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '
79