blob: d0b18c9d981c535da105170dcc6149351adc121e [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001#
Dan Handleye83b0ca2014-01-14 18:17:09 +00002# Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
Achin Gupta4f6ad662013-10-25 09:08:21 +01003#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are met:
6#
7# Redistributions of source code must retain the above copyright notice, this
8# list of conditions and the following disclaimer.
9#
10# Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
13#
14# Neither the name of ARM nor the names of its contributors may be used
15# to endorse or promote products derived from this software without specific
16# prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.
29#
30
31# Decrease the verbosity of the make script
32# can be made verbose by passing V=1 at the make command line
33ifdef V
James Morrisseyeaaeece2013-11-01 13:56:59 +000034 KBUILD_VERBOSE = ${V}
Achin Gupta4f6ad662013-10-25 09:08:21 +010035else
36 KBUILD_VERBOSE = 0
37endif
38
Achin Gupta7421b462014-02-01 18:53:26 +000039# Checkpatch ignores
40CHECK_IGNORE = --ignore COMPLEX_MACRO
41
42CHECKPATCH_ARGS = --no-tree --no-signoff ${CHECK_IGNORE}
43CHECKCODE_ARGS = --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
Ian Spray36eaaf32014-01-30 17:25:28 +000044
James Morrisseyeaaeece2013-11-01 13:56:59 +000045ifeq "${KBUILD_VERBOSE}" "0"
Achin Gupta4f6ad662013-10-25 09:08:21 +010046 Q=@
Ian Spray36eaaf32014-01-30 17:25:28 +000047 CHECKCODE_ARGS += --no-summary --terse
Achin Gupta4f6ad662013-10-25 09:08:21 +010048else
49 Q=
50endif
51
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +000052export Q
53
Achin Gupta4f6ad662013-10-25 09:08:21 +010054DEBUG ?= 0
James Morrisseyeaaeece2013-11-01 13:56:59 +000055
56ifneq (${DEBUG}, 0)
57 BUILD_TYPE := debug
58else
59 BUILD_TYPE := release
60endif
61
Jon Medhurst407a95c2014-02-12 15:54:48 +000062BL_COMMON_SOURCES := misc_helpers.S \
63 cache_helpers.S \
64 tlb_helpers.S \
65 xlat_helpers.c \
66 std.c \
67 bl_common.c \
68 platform_helpers.S \
69 io_storage.c
Ryan Harkind7a6b0f2014-01-13 14:40:13 +000070
Ryan Harkin25cff832014-01-13 12:37:03 +000071ARCH ?= aarch64
Achin Gupta4f6ad662013-10-25 09:08:21 +010072
Ryan Harkin25cff832014-01-13 12:37:03 +000073# By default, build all platforms available
74PLAT ?= all
Achin Gupta375f5382014-02-18 18:12:48 +000075# By default, build no SPD component
76SPD ?= none
Achin Gupta4f6ad662013-10-25 09:08:21 +010077
Ryan Harkin25cff832014-01-13 12:37:03 +000078BUILD_BASE := ./build
79BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${BUILD_TYPE}
Achin Gupta4f6ad662013-10-25 09:08:21 +010080
Ryan Harkin25cff832014-01-13 12:37:03 +000081PLATFORMS := $(shell ls -I common plat/)
Achin Gupta375f5382014-02-18 18:12:48 +000082SPDS := $(shell ls -I none services/spd)
Ryan Harkin72ee3312014-01-15 16:55:07 +000083HELP_PLATFORMS := $(shell echo ${PLATFORMS} | sed 's/ /|/g')
84
Ryan Harkin25cff832014-01-13 12:37:03 +000085ifeq (${PLAT},)
86 $(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform.")
87endif
88ifeq ($(findstring ${PLAT},${PLATFORMS} all),)
89 $(error "Error: Invalid platform. The following platforms are available: ${PLATFORMS}")
90endif
91
92ifeq (${PLAT},all)
93all: ${PLATFORMS}
94else
Jon Medhurst407a95c2014-02-12 15:54:48 +000095all: msg_start fip
Ryan Harkin25cff832014-01-13 12:37:03 +000096endif
Achin Gupta4f6ad662013-10-25 09:08:21 +010097
Ryan Harkin25cff832014-01-13 12:37:03 +000098msg_start:
99 @echo "Building ${PLAT}"
Achin Gupta4f6ad662013-10-25 09:08:21 +0100100
Ryan Harkin25cff832014-01-13 12:37:03 +0000101${PLATFORMS}:
102 ${MAKE} PLAT=$@ all
Achin Gupta4f6ad662013-10-25 09:08:21 +0100103
Ryan Harkin25cff832014-01-13 12:37:03 +0000104ifneq (${PLAT},all)
105 $(info Including ${PLAT}/platform.mk)
106 include plat/${PLAT}/platform.mk
107 $(info Including bl1.mk)
108 include bl1/bl1.mk
109 $(info Including bl2.mk)
110 include bl2/bl2.mk
111 $(info Including bl31.mk)
112 include bl31/bl31.mk
113endif
Achin Gupta4f6ad662013-10-25 09:08:21 +0100114
Achin Gupta375f5382014-02-18 18:12:48 +0000115# Include SPD Makefile if one has been specified
116ifneq (${SPD},none)
117 # We expect to locate an spd.mk under the specified SPD directory
118 SPD_MAKE := $(shell m="services/spd/${SPD}/${SPD}.mk"; [ -f "$$m" ] && echo "$$m")
119
120 ifeq (${SPD_MAKE},)
121 $(error Error: No services/spd/${SPD}/${SPD}.mk located)
122 endif
123 $(info Including ${SPD_MAKE})
124 include ${SPD_MAKE}
125
126 # If there's BL32 companion for the chosen SPD, and the SPD wants to build the
127 # BL2 from source, we expect that the SPD's Makefile would set NEED_BL32
128 # variable to "yes"
129endif
130
Jon Medhurst407a95c2014-02-12 15:54:48 +0000131.PHONY: all msg_start ${PLATFORMS} clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip locate-bl33
James Morrisseyeaaeece2013-11-01 13:56:59 +0000132.SUFFIXES:
133
134
Ryan Harkind7a6b0f2014-01-13 14:40:13 +0000135INCLUDES += -Ilib/include/ \
James Morrisseyf2f9bb52014-02-10 16:18:59 +0000136 -Idrivers/io \
Ryan Harkind7a6b0f2014-01-13 14:40:13 +0000137 -Iinclude/${ARCH}/ \
138 -Iinclude/ \
139 -Iarch/system/gic \
Achin Gupta0a9f7472014-02-09 17:48:12 +0000140 -Iservices/psci \
Ryan Harkind7a6b0f2014-01-13 14:40:13 +0000141 -Iinclude/stdlib \
142 -Iinclude/stdlib/sys \
143 -Iplat/${PLAT} \
Achin Gupta375f5382014-02-18 18:12:48 +0000144 ${PLAT_INCLUDES} \
145 ${SPD_INCLUDES}
Achin Gupta4f6ad662013-10-25 09:08:21 +0100146
Harry Liebel0af6d642013-12-20 18:51:12 +0000147ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
Sandrine Bailleuxdf64a552014-02-11 13:31:33 +0000148 -mgeneral-regs-only -D__ASSEMBLY__ ${INCLUDES} \
149 -DDEBUG=${DEBUG}
Harry Liebel4f603682014-01-14 18:11:48 +0000150CFLAGS := -nostdinc -pedantic -ffreestanding -Wall \
151 -Werror -mgeneral-regs-only -std=c99 -c -Os \
152 -DDEBUG=${DEBUG} ${INCLUDES} ${CFLAGS}
Achin Gupta4f6ad662013-10-25 09:08:21 +0100153
Sandrine Bailleux3e850a82013-11-20 11:50:48 +0000154LDFLAGS += --fatal-warnings -O1
Achin Gupta4f6ad662013-10-25 09:08:21 +0100155
156
157vpath %.ld.S bl1:bl2:bl31
158vpath %.c bl1:bl2:bl31
159vpath %.c bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH}
160vpath %.S bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH}
161
162
James Morrisseyeaaeece2013-11-01 13:56:59 +0000163ifneq (${DEBUG}, 0)
Achin Gupta4f6ad662013-10-25 09:08:21 +0100164#CFLAGS += -g -O0
165CFLAGS += -g
166# -save-temps -fverbose-asm
167ASFLAGS += -g -Wa,--gdwarf-2
James Morrissey40a6f642014-02-10 14:24:36 +0000168else
169CFLAGS += -DNDEBUG=1
Achin Gupta4f6ad662013-10-25 09:08:21 +0100170endif
171
172
James Morrisseyeaaeece2013-11-01 13:56:59 +0000173CC := ${CROSS_COMPILE}gcc
174CPP := ${CROSS_COMPILE}cpp
175AS := ${CROSS_COMPILE}gcc
176AR := ${CROSS_COMPILE}ar
177LD := ${CROSS_COMPILE}ld
178OC := ${CROSS_COMPILE}objcopy
179OD := ${CROSS_COMPILE}objdump
180NM := ${CROSS_COMPILE}nm
181PP := ${CROSS_COMPILE}gcc -E ${CFLAGS}
Achin Gupta4f6ad662013-10-25 09:08:21 +0100182
Ian Spray36eaaf32014-01-30 17:25:28 +0000183BASE_COMMIT ?= origin/master
184
Harry Liebelf58ad362014-01-10 18:00:33 +0000185# Variables for use with Firmware Image Package
186FIPTOOLPATH ?= tools/fip_create
Achin Gupta375f5382014-02-18 18:12:48 +0000187FIPTOOL ?= ${FIPTOOLPATH}/fip_create
Harry Liebelf58ad362014-01-10 18:00:33 +0000188fiptool: ${FIPTOOL}
189fip: ${BUILD_PLAT}/fip.bin
190
Ryan Harkin25cff832014-01-13 12:37:03 +0000191ifeq (${PLAT},all)
192 ifeq (${MAKECMDGOALS},clean)
193 $(error "Please select a platform with PLAT=<platform>. You can use 'make distclean' to clean up all platform builds")
194 endif
195endif
Ian Spray36eaaf32014-01-30 17:25:28 +0000196
197locate-checkpatch:
198ifndef CHECKPATCH
199 $(error "Please set CHECKPATCH to point to the Linux checkpatch.pl file, eg: CHECKPATCH=../linux/script/checkpatch.pl")
200else
201ifeq (,$(wildcard ${CHECKPATCH}))
202 $(error "The file CHECKPATCH points to cannot be found, use eg: CHECKPATCH=../linux/script/checkpatch.pl")
203endif
204endif
205
Harry Liebelf58ad362014-01-10 18:00:33 +0000206locate-bl33:
207ifndef BL33
208 $(error "Please set BL33 to point to the Normal World binary, eg: BL33=../uefi/FVP_AARCH64_EFI.fd")
209else
210ifeq (,$(wildcard ${BL33}))
211 $(error "The file BL33 points to cannot be found (${BL33})")
212endif
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000213FIP_DEPS += ${BL33}
Harry Liebelf58ad362014-01-10 18:00:33 +0000214endif
215
216
Achin Gupta4f6ad662013-10-25 09:08:21 +0100217clean:
218 @echo " CLEAN"
Ryan Harkin25cff832014-01-13 12:37:03 +0000219 ${Q}rm -rf ${BUILD_PLAT}
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000220 ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
Achin Gupta4f6ad662013-10-25 09:08:21 +0100221
James Morrisseyeaaeece2013-11-01 13:56:59 +0000222realclean distclean:
223 @echo " REALCLEAN"
224 ${Q}rm -rf ${BUILD_BASE}
Joakim Bech35fab8c2014-01-23 14:51:49 +0100225 ${Q}rm -f ${CURDIR}/cscope.*
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000226 ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
Achin Gupta4f6ad662013-10-25 09:08:21 +0100227
Ian Spray36eaaf32014-01-30 17:25:28 +0000228checkcodebase: locate-checkpatch
229 @echo " CHECKING STYLE"
230 @if test -d .git ; then \
231 git ls-files | while read GIT_FILE ; do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; done ; \
232 else \
233 find . -type f -not -iwholename "*.git*" -not -iwholename "*build*" -exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \
234 fi
235
236checkpatch: locate-checkpatch
237 @echo " CHECKING STYLE"
238 @git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
239
Harry Liebelf58ad362014-01-10 18:00:33 +0000240${FIPTOOL}:
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000241 ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH}
Harry Liebelf58ad362014-01-10 18:00:33 +0000242 @echo
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000243 @echo "Built $@ successfully"
Harry Liebelf58ad362014-01-10 18:00:33 +0000244 @echo
245
Jon Medhurst407a95c2014-02-12 15:54:48 +0000246define match_goals
247$(strip $(foreach goal,$(1),$(filter $(goal),$(MAKECMDGOALS))))
248endef
Achin Gupta4f6ad662013-10-25 09:08:21 +0100249
James Morrisseyeaaeece2013-11-01 13:56:59 +0000250
Jon Medhurst407a95c2014-02-12 15:54:48 +0000251CLEANING := $(call match_goals,clean realclean distclean)
James Morrisseyeaaeece2013-11-01 13:56:59 +0000252
James Morrisseyeaaeece2013-11-01 13:56:59 +0000253
Jon Medhurst407a95c2014-02-12 15:54:48 +0000254define MAKE_C
James Morrisseyeaaeece2013-11-01 13:56:59 +0000255
Jon Medhurst407a95c2014-02-12 15:54:48 +0000256$(eval OBJ := $(1)/$(patsubst %.c,%.o,$(notdir $(2))))
257$(eval PREREQUISITES := $(patsubst %.o,%.d,$(OBJ)))
James Morrisseyeaaeece2013-11-01 13:56:59 +0000258
Jon Medhurst407a95c2014-02-12 15:54:48 +0000259$(OBJ) : $(2)
260 @echo " CC $$<"
261 $$(Q)$$(CC) $$(CFLAGS) -c $$< -o $$@
Achin Gupta4f6ad662013-10-25 09:08:21 +0100262
James Morrisseyeaaeece2013-11-01 13:56:59 +0000263
Jon Medhurst407a95c2014-02-12 15:54:48 +0000264$(PREREQUISITES) : $(2)
265 @echo " DEPS $$@"
266 @mkdir -p $(1)
267 $$(Q)$$(CC) $$(CFLAGS) -M -MT $(OBJ) -MF $$@ $$<
James Morrisseyeaaeece2013-11-01 13:56:59 +0000268
Jon Medhurst407a95c2014-02-12 15:54:48 +0000269ifeq "$(CLEANING)" ""
270-include $(PREREQUISITES)
271endif
Achin Gupta4f6ad662013-10-25 09:08:21 +0100272
Jon Medhurst407a95c2014-02-12 15:54:48 +0000273endef
Achin Gupta4f6ad662013-10-25 09:08:21 +0100274
275
Jon Medhurst407a95c2014-02-12 15:54:48 +0000276define MAKE_S
James Morrisseyeaaeece2013-11-01 13:56:59 +0000277
Jon Medhurst407a95c2014-02-12 15:54:48 +0000278$(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2))))
279$(eval PREREQUISITES := $(patsubst %.o,%.d,$(OBJ)))
Achin Gupta4f6ad662013-10-25 09:08:21 +0100280
Jon Medhurst407a95c2014-02-12 15:54:48 +0000281$(OBJ) : $(2)
282 @echo " AS $$<"
283 $$(Q)$$(AS) $$(ASFLAGS) -c $$< -o $$@
James Morrisseyeaaeece2013-11-01 13:56:59 +0000284
Jon Medhurst407a95c2014-02-12 15:54:48 +0000285$(PREREQUISITES) : $(2)
286 @echo " DEPS $$@"
287 @mkdir -p $(1)
288 $$(Q)$$(AS) $$(ASFLAGS) -M -MT $(OBJ) -MF $$@ $$<
Achin Gupta4f6ad662013-10-25 09:08:21 +0100289
Jon Medhurst407a95c2014-02-12 15:54:48 +0000290ifeq "$(CLEANING)" ""
291-include $(PREREQUISITES)
292endif
Achin Gupta4f6ad662013-10-25 09:08:21 +0100293
Jon Medhurst407a95c2014-02-12 15:54:48 +0000294endef
295
296
297define MAKE_LD
298
299$(eval PREREQUISITES := $(1).d)
300
301$(1) : $(2)
302 @echo " PP $$<"
303 $$(Q)$$(AS) $$(ASFLAGS) -P -E -o $$@ $$<
304
305$(PREREQUISITES) : $(2)
306 @echo " DEPS $$@"
307 @mkdir -p $$(dir $$@)
308 $$(Q)$$(AS) $$(ASFLAGS) -M -MT $(1) -MF $$@ $$<
309
310ifeq "$(CLEANING)" ""
311-include $(PREREQUISITES)
312endif
313
314endef
315
316
317define MAKE_OBJS
318 $(eval C_OBJS := $(filter %.c,$(2)))
319 $(eval REMAIN := $(filter-out %.c,$(2)))
320 $(eval $(foreach obj,$(C_OBJS),$(call MAKE_C,$(1),$(obj))))
321
322 $(eval S_OBJS := $(filter %.S,$(REMAIN)))
323 $(eval REMAIN := $(filter-out %.S,$(REMAIN)))
324 $(eval $(foreach obj,$(S_OBJS),$(call MAKE_S,$(1),$(obj))))
325
326 $(and $(REMAIN),$(error Unexpected source files present: $(REMAIN)))
327endef
328
329
330# NOTE: The line continuation '\' is required in the next define otherwise we
331# end up with a line-feed characer at the end of the last c filename.
332# Also bare this issue in mind if extending the list of supported filetypes.
333define SOURCES_TO_OBJS
334 $(notdir $(patsubst %.c,%.o,$(filter %.c,$(1)))) \
335 $(notdir $(patsubst %.S,%.o,$(filter %.S,$(1))))
336endef
337
338define MAKE_BL
339 $(eval BUILD_DIR := ${BUILD_PLAT}/bl$(1))
340 $(eval SOURCES := $(BL$(1)_SOURCES) $(BL_COMMON_SOURCES) $(PLAT_BL_COMMON_SOURCES))
341 $(eval OBJS := $(addprefix $(BUILD_DIR)/,$(call SOURCES_TO_OBJS,$(SOURCES))))
342 $(eval LINKERFILE := $(BUILD_DIR)/bl$(1).ld)
343 $(eval MAPFILE := $(BUILD_DIR)/bl$(1).map)
344 $(eval ELF := $(BUILD_DIR)/bl$(1).elf)
345 $(eval DUMP := $(BUILD_DIR)/bl$(1).dump)
346 $(eval BIN := $(BUILD_PLAT)/bl$(1).bin)
347
348 $(eval $(call MAKE_OBJS,$(BUILD_DIR),$(SOURCES)))
349 $(eval $(call MAKE_LD,$(LINKERFILE),$(BL$(1)_LINKERFILE)))
350
351$(BUILD_DIR) :
352 $$(Q)mkdir -p "$$@"
353
354$(ELF) : $(OBJS) $(LINKERFILE)
355 @echo " LD $$@"
356 $$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
357 --entry=$(BL$(1)_ENTRY_POINT) $(OBJS)
358
359$(DUMP) : $(ELF)
360 @echo " OD $$@"
361 $${Q}$${OD} -dx $$< > $$@
362
363$(BIN) : $(ELF)
364 @echo " BIN $$@"
365 $$(Q)$$(OC) -O binary $$< $$@
366 @echo
367 @echo "Built $$@ successfully"
368 @echo
369
370.PHONY : bl$(1)
371bl$(1) : $(BUILD_DIR) $(BIN) $(DUMP)
372
373all : bl$(1)
374
375$(eval FIP_DEPS += $(if $2,$(BIN),))
376$(eval FIP_ARGS += $(if $2,--bl$(1) $(BIN),))
377
378endef
379
380
381$(eval $(call MAKE_BL,1))
382
383$(eval $(call MAKE_BL,2,in_fip))
384
385BL31_SOURCES += ${SPD_SOURCES}
386$(eval $(call MAKE_BL,31,in_fip))
387
388ifeq (${NEED_BL32},yes)
389$(eval $(call MAKE_BL,32,in_fip))
390endif
Ryan Harkin72ee3312014-01-15 16:55:07 +0000391
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000392${BUILD_PLAT}/fip.bin: locate-bl33 ${FIP_DEPS} ${FIPTOOL}
Harry Liebelf58ad362014-01-10 18:00:33 +0000393 ${Q}${FIPTOOL} --dump \
Achin Gupta375f5382014-02-18 18:12:48 +0000394 ${FIP_ARGS} \
Jon Medhurst407a95c2014-02-12 15:54:48 +0000395 --bl33 ${BL33} \
Harry Liebelf58ad362014-01-10 18:00:33 +0000396 $@
397 @echo
Jeenu Viswambharan2f2cef42014-02-19 09:38:18 +0000398 @echo "Built $@ successfully"
399 @echo
Harry Liebelf58ad362014-01-10 18:00:33 +0000400
401
Joakim Bech35fab8c2014-01-23 14:51:49 +0100402cscope:
403 @echo " CSCOPE"
404 ${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files
405 ${Q}cscope -b -q -k
406
Ryan Harkin72ee3312014-01-15 16:55:07 +0000407help:
Jon Medhurst407a95c2014-02-12 15:54:48 +0000408 @echo "usage: ${MAKE} PLAT=<all|${HELP_PLATFORMS}> <all|bl1|bl2|bl31|distclean|clean|checkcodebase|checkpatch>"
Ryan Harkin72ee3312014-01-15 16:55:07 +0000409 @echo ""
410 @echo "PLAT is used to specify which platform you wish to build."
411 @echo ""
412 @echo "Supported Targets:"
Jeenu Viswambharan8aa559c2014-02-21 11:42:08 +0000413 @echo " all Build the BL1, BL2 and BL31 binaries"
Ian Spray36eaaf32014-01-30 17:25:28 +0000414 @echo " bl1 Build the BL1 binary"
Jeenu Viswambharan8aa559c2014-02-21 11:42:08 +0000415 @echo " bl2 Build the BL2 binary"
Ian Spray36eaaf32014-01-30 17:25:28 +0000416 @echo " bl31 Build the BL31 binary"
417 @echo " checkcodebase Check the coding style of the entire source tree"
418 @echo " checkpatch Check the coding style on changes in the current"
419 @echo " branch against BASE_COMMIT (default origin/master)"
420 @echo " clean Clean the build for the selected platform"
Harry Liebelf58ad362014-01-10 18:00:33 +0000421 @echo " cscope Generate cscope index"
Ian Spray36eaaf32014-01-30 17:25:28 +0000422 @echo " distclean Remove all build artifacts for all platforms"
Harry Liebelf58ad362014-01-10 18:00:33 +0000423 @echo " fiptool Build the Firmware Image Package(FIP) creation tool"
Ryan Harkin72ee3312014-01-15 16:55:07 +0000424 @echo ""
425 @echo "note: most build targets require PLAT to be set to a specific platform."
426 @echo ""
427 @echo "example: build all targets for the FVP platform:"
428 @echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"