Add memtest support.
[syslinux-debian/hramrach.git] / efi / build-gnu-efi.sh
blob3844e75b9b2f01fdebd8faeb276df01d03c009a7
1 #!/bin/sh
3 set -e
5 # Initialise the gnu-efi submodule and ensure the source is up-to-date.
6 # Then build and install it for the given architecture.
8 if [ $# -lt 3 ]; then
9 cat <<EOF
10 Usage: $0: <arch> <srcdir> <objdir>
12 Build the <arch> gnu-efi libs and header files and install in <objdir>.
14 <arch> - A gnu-efi \$ARCH argument, i.e. ia32, x86_64
15 <srcdir> - The top-level directory of the Syslinux source
16 <objdir> - The Syslinux object directory
18 EOF
19 exit 1
22 ARCH=$1
23 srcdir=`realpath $2`
24 objdir=`realpath $3`
26 pushd $srcdir
27 git submodule init
28 git submodule update
30 cd gnu-efi/gnu-efi-3.0/
32 make ARCH=$ARCH
34 make ARCH=$ARCH PREFIX=$objdir install
35 make ARCH=$ARCH clean
37 popd