2 # Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4 # This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 # Define the following variables to specify an alternative toolchain to the one located in your PATH:
15 # - RVCT_TOOLS_PATH: for RVCT and RVCTLINUX toolchains
16 # - ARMGCC_TOOLS_PATH: for ARMGCC toolchain
17 # - ARMLINUXGCC_TOOLS_PATH: for ARMLINUXGCC
19 EDK2_TOOLCHAIN ?
= RVCTLINUX
24 $(error The Makfile macro
'EDK2_DSC' must be defined with an EDK2 DSC file.
)
27 ifeq ("$(OS)","Windows_NT")
28 export WORKSPACE?
=$(PWD
)
29 export EDK_TOOLS_PATH ?
= $(WORKSPACE
)\BaseTools
40 EDK2_CONF
= Conf
/BuildEnv.sh Conf
/build_rule.txt Conf
/target.txt Conf
/tools_def.txt
43 ifeq ("$(OS)","Windows_NT")
44 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
46 . .
/edksetup.sh
`pwd`/BaseTools
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
50 ifeq ("$(OS)","Windows_NT")
51 copy
$(EDK_TOOLS_PATH
)\Conf
\build_rule.template Conf
\build_rule.txt
52 copy
$(EDK_TOOLS_PATH
)\Conf\FrameworkDatabase.template Conf\FrameworkDatabase.txt
53 copy
$(EDK_TOOLS_PATH
)\Conf
\target.template Conf
\target.txt
54 copy
$(EDK_TOOLS_PATH
)\Conf
\tools_def.template Conf
\tools_def.txt
56 . .
/edksetup.sh
`pwd`/BaseTools
; $(MAKE
) -C BaseTools
60 ifeq ("$(OS)","Windows_NT")
61 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
63 . .
/edksetup.sh
`pwd`/BaseTools
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
; \
64 rm -Rf
$(EDK2_CONF
) Conf
/.cache