]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/sbl.git/blob - makefile
PRSDK-3257 Added EVE APP Loader for AM57xx
[keystone-rtos/sbl.git] / makefile
1 #*******************************************************************************
2 #* FILE PURPOSE: Top level makefile for Creating Component Libraries for ARM
3 #* architectures
4 #*******************************************************************************
5 #* FILE NAME: makefile
6 #*
7 #* DESCRIPTION: Defines Compiler tools paths, libraries , Build Options 
8 #*
9 #*
10 #*******************************************************************************
11 #*
12 # (Mandatory) Specify where various tools are installed.
14 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
16 #Default Do not use the shared object libraries for the test/example applications
17 export USEDYNAMIC_LIB ?= "no"
19 #export SOC ?= AM572x
20 export SOC
21 export BOOTMODE
22 export OPPMODE
23 export SECUREMODE
25 export LLD_NAME=sbl
27 # ROOT Directory
28 export ROOTDIR := ../..
30 #Check to identify between windows or linux environment
31 ifeq ($(OS), )
32   OS := linux
33 endif
35 # INCLUDE Directory
36 export INCDIR := ../..;$(PDK_INSTALL_PATH);$(ROOTDIR);$(SBL_INC_DIR)
38 # Common Macros used in make
40 ifndef RM
41 export RM = rm -f
42 endif
44 ifndef CP
45 export CP = cp -p
46 endif
48 export MKDIR = mkdir -p
50 ifndef RMDIR
51 export RMDIR = rm -rf
52 endif
54 ifndef SED
55 export SED = sed
56 endif
58 ifndef MAKE
59 export MAKE = make
60 endif
62 # PHONY Targets
63 .PHONY: all clean spi_flashwriter spi_flashwriter_clean flashwriter flashwriter_clean mmcsd_flashwriter mmcsd_flashwriter_clean example example_clean tools sbl_lib sbl_lib_clean
65 # all rule
66 all:
67         @$(MAKE) -f ./board/$(BOARD)/build/makefile all
69 spi_flashwriter:
70         @$(MAKE) -f ./tools/flashWriter/spi/src/makefile $@
72 flashwriter:
73         @$(MAKE) -f ./tools/flashWriter/qspi/src/makefile $@
75 mmcsd_flashwriter:
76         @$(MAKE) -f ./tools/flashWriter/mmcsd/src/makefile $@
78 example:
79         @$(MAKE) -f ./example/mpuMulticoreApp/makefile $@
80         @$(MAKE) -f ./example/dsp1MulticoreApp/makefile $@
81         @$(MAKE) -f ./example/ipu1MulticoreApp/makefile $@
82 ifeq ($(SOC),$(filter $(SOC), AM572x AM574x))
83         @$(MAKE) -f ./example/mpu1MulticoreApp/makefile $@
84         @$(MAKE) -f ./example/dsp2MulticoreApp/makefile $@
85         @$(MAKE) -f ./example/ipu2MulticoreApp/makefile $@
86         @$(MAKE) -f ./example/eve1MulticoreApp/makefile $@
87         @$(MAKE) -f ./example/mpuM4AppLoader/makefile $@
88         @$(MAKE) -f ./example/ipu1EveLoaderApp/makefile $@
89 endif
91 tools:
92         @$(MAKE) -C tools/btoccs
93         @$(MAKE) -C tools/byteswap
94         @$(MAKE) -C tools/ccsutil
95         @$(MAKE) -C tools/tiImageGen
97 sbl_lib:
98         @$(MAKE) -C ./sbl_lib/src
101 # Rule to clean sbl binary
102 clean:
103         @$(MAKE) -f ./board/$(BOARD)/build/makefile $@
104         @$(RMDIR) $(PDK_INSTALL_PATH)/ti/boot/$(LLD_NAME)/binary/$(BOARD)
106 spi_flashwriter_clean:
107         @$(MAKE) -f ./tools/flashWriter/spi/src/makefile $@
109 flashwriter_clean:
110         @$(MAKE) -f ./tools/flashWriter/qspi/src/makefile $@
111         @$(RMDIR) $(PDK_INSTALL_PATH)/ti/boot/sbl/tools/flashWriter/qspi/bin/$(BOARD)
113 mmcsd_flashwriter_clean:
114         @$(MAKE) -f ./tools/flashWriter/mmcsd/src/makefile $@
116 example_clean:
117         @$(MAKE) -f ./example/mpuMulticoreApp/makefile $@
118         @$(MAKE) -f ./example/dsp1MulticoreApp/makefile $@
119         @$(MAKE) -f ./example/ipu1MulticoreApp/makefile $@
120 ifeq ($(SOC),$(filter $(SOC), AM572x AM574x))
121         @$(MAKE) -f ./example/dsp2MulticoreApp/makefile $@
122         @$(MAKE) -f ./example/ipu2MulticoreApp/makefile $@
123         @$(MAKE) -f ./example/eve1MulticoreApp/makefile $@
124         @$(MAKE) -f ./example/mpuM4AppLoader/makefile $@
125         @$(MAKE) -f ./example/ipu1EveLoaderApp/makefile $@
126 endif
127         @$(RMDIR) $(PDK_INSTALL_PATH)/ti/boot/sbl/binary/sbl_multicore_app/$(BOARD)
129 sbl_lib_clean:
130         @$(MAKE) -f ./sbl_lib/src/makefile $@