dmi: check both the AC and ID flags at the same time
[syslinux.git] / efi / build-gnu-efi.sh
blob63460b698652017c157afca7db3ec9a6203faf1c
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 2 ]; then
9 cat <<EOF
10 Usage: $0: <arch> <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 <objdir> - The Syslinux object directory
17 EOF
18 exit 1
21 ARCH="$1"
22 objdir="$(readlink -f $2)"
24 if [ ! -e ../version.h ]; then
25 printf "build-gnu-efi.sh: Cannot be run outside Syslinux object tree\n"
26 pwd
27 exit 1
31 cd ../..
32 if [ -d .git ]; then
33 git submodule update --init
37 mkdir -p "$objdir/gnu-efi"
38 cd "$objdir/gnu-efi"
40 EFIDIR="$(readlink -f "$objdir/../gnu-efi")"
42 make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH
43 make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH PREFIX="$objdir" install
45 cd "$objdir/efi"