193e01944080de9274d04b7b6949d2874f8b2322
[keystone-rtos/ibl.git] / src / make / makestg2
1 #*****************************************************************************
2 #* FILE PURPOSE: 2nd stage makefile for the intermediate boot loader
3 #*****************************************************************************
4 #* FILE NAME: makestg2
5 #*
6 #* DESCRIPTION: This makefile is invoked with build specific options
7 #*
8 #******************************************************************************
10 ifndef IBL_ROOT
11         IBL_ROOT=..
12 endif
14 MODULES= main device ethboot nandboot driver hw interp ecc
15 CLEAN_MODULES=$(addprefix clean_,$(MODULES))
18 include $(IBL_ROOT)/make/$(ARCH)/makedefs.mk
20 export ARCH
21 export TARGET
24 c6455: $(MODULES)
25         $(LD) -o ibl_$@/ibl_$@.out -m ibl_$@/ibl_$@.map  ibl_$@/ibl.cmd $(RTLIBS)
28 c6472: $(MODULES) utils
29         $(LD) -o ibl_$@/ibl_$@.out -m ibl_$@/ibl_$@.map  ibl_$@/ibl.cmd $(RTLIBS)
30         hex6x ibl_$@/ibl.rmd ibl_$@/ibl_$@.out
31         $(CP) ibl.b ibl_$@
32         ../util/btoccs/b2i2c ibl_$@/ibl.b ibl_$@/ibl.i2c.b
33         ../util/btoccs/b2ccs ibl_$@/ibl.i2c.b ibl_$@/ibl.i2c.ccs
34         ../util/romparse_$@/romparse ibl_$@/i2crom.map
35         $(CP) i2crom.ccs ibl_$@
36         $(RM) -f i2crom.ccs ibl.b
39 $(MODULES):
40         @echo making $@
41         make -C $(IBL_ROOT)/$@/$(ARCH)/make $@
43 utils:
44         make -C $(IBL_ROOT)/util/btoccs
45         make -C $(IBL_ROOT)/util/romparse_$(TARGET)
47 clean: $(CLEAN_MODULES)
48         
50 $(CLEAN_MODULES):
51         @echo cleaning $(subst clean_, ,$@)
52         make -C $(IBL_ROOT)/$(subst clean_,,$@)/$(ARCH)/make clean
53