2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
13 $(error The Makfile macro
'EDK2_DSC' must be defined with an EDK2 DSC file.
)
15 ifeq ("$(EDK2_DSC)","ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc")
17 BUILD_PATH
=$(WORKSPACE
)/Build
/ArmVExpress-FVP-AArch64
18 UEFI_BIN
=FVP_AARCH64_EFI.fd
21 ifeq ("$(OS)","Windows_NT")
22 export WORKSPACE?
=$(PWD
)
23 export EDK_TOOLS_PATH ?
= $(WORKSPACE
)\BaseTools
34 EDK2_CONF
= Conf
/BuildEnv.sh Conf
/build_rule.txt Conf
/target.txt Conf
/tools_def.txt
39 ifeq ($(BUILD_FIP
),"1")
41 $(info Define location of the FIP to automatically update the package after building UEFI.
)
46 ifeq ("$(OS)","Windows_NT")
47 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
49 . .
/edksetup.sh
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
51 ifeq ("$(BUILD_FIP)","1")
53 $(SILENT
)which fip_create
; \
54 if
[ $$?
-ne
0 ]; then \
55 $(ECHO
) "Warning: 'fip_create' tool is not in the PATH. The UEFI binary will not be added in the Firmware Image Package (FIP)."; \
57 fip_create
--bl33
$(BUILD_PATH
)/$(EDK2_BUILD
)_
$(EDK2_TOOLCHAIN
)/FV
/$(UEFI_BIN
) --dump
$(FIP_BIN
); \
63 ifeq ("$(OS)","Windows_NT")
64 copy
$(EDK_TOOLS_PATH
)\Conf
\build_rule.template Conf
\build_rule.txt
65 copy
$(EDK_TOOLS_PATH
)\Conf\FrameworkDatabase.template Conf\FrameworkDatabase.txt
66 copy
$(EDK_TOOLS_PATH
)\Conf
\target.template Conf
\target.txt
67 copy
$(EDK_TOOLS_PATH
)\Conf
\tools_def.template Conf
\tools_def.txt
69 . .
/edksetup.sh
; $(MAKE
) -C BaseTools
73 ifeq ("$(OS)","Windows_NT")
74 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
76 . .
/edksetup.sh
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
; \
77 rm -Rf
$(EDK2_CONF
) Conf
/.cache