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 ECODIR= $(IBL_ROOT)/util/i2cConfig
18 MODULES= hw
19 CLEAN_MODULES=$(addprefix clean_,$(MODULES))
22 CSRC= i2cparam.c
25 # enable debug info in the compile
26 UTIL=yes
28 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
30 C6X_C_DIR= $(IBL_ROOT)
31 C6X_C_DIR+=;$(IBL_ROOT)/hw/i2c
32 C6X_C_DIR+=;$(IBL_ROOT)/hw/plls
33 C6X_C_DIR+=;$(STDINC)
34 C6X_C_DIR+=;$(IBL_ROOT)/cfg/$(TARGET)
35 C6X_C_DIR+=;$(IBL_ROOT)/device/$(TARGET)
36 C6X_C_DIR+=;$(IBL_ROOT)/arch/$(ARCH)
37 export C6X_C_DIR
40 export ARCH
41 export TARGET
43 CDEFS += -DIBL_I2C_CFG_EEPROM_BUS_ADDR=$(I2C_PARAM_BUS_ADDR)
45 .PHONY: i2cparam.cmd
47 $(DEVICES): gen_cdefdep $(MODULES) $(OBJS) i2cparam.cmd
48 $(LD) -o i2cparam_$(TARGET).out -m i2cparam_$(TARGET).map i2cparam.cmd $(RTLIBS)
50 $(MODULES):
51 @echo making $@
52 make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
55 clean2: $(CLEAN_MODULES)
56 @rm -f $(OBJS)
57 @rm -f $(subst .c,.dc,$(CSRC))
60 $(CLEAN_MODULES):
61 @echo cleaning $(subst clean_, ,$@)
62 make -C $(IBL_ROOT)/$(subst clean_,,$@)/$(ARCH)/make clean
65 $(OBJS): cdefdep
68 gen_cdefdep:
69 @echo Checking command line dependencies
70 @echo $(ENDIAN) $(TARGET) $(ARCH) > cdefdep.tmp
71 @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '