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
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
24 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
26 C6X_C_DIR= $(IBL_ROOT)
27 C6X_C_DIR+=;$(IBL_ROOT)/hw/i2c
28 C6X_C_DIR+=;$(IBL_ROOT)/hw/plls
29 C6X_C_DIR+=;$(STDINC)
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 export C6X_C_DIR
36 export ARCH
37 export TARGET
39 CDEFS += -DIBL_I2C_CFG_EEPROM_BUS_ADDR=$(I2C_PARAM_BUS_ADDR)
41 .PHONY: i2cparam.cmd
43 $(DEVICES): gen_cdefdep $(MODULES) $(OBJS) i2cparam.cmd
44 $(LD) -o i2cparam_$(TARGET).out -m i2cparam_$(TARGET).map i2cparam.cmd $(RTLIBS)
46 $(MODULES):
47 @echo making $@
48 make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
51 clean2: $(CLEAN_MODULES)
52 @rm -f $(OBJS)
53 @rm -f $(subst .c,.dc,$(CSRC))
56 $(CLEAN_MODULES):
57 @echo cleaning $(subst clean_, ,$@)
58 make -C $(IBL_ROOT)/$(subst clean_,,$@)/$(ARCH)/make clean
61 $(OBJS): cdefdep
64 gen_cdefdep:
65 @echo Checking command line dependencies
66 @echo $(ENDIAN) $(TARGET) $(ARCH) > cdefdep.tmp
67 @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '