aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-14 13:18:31 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-15 13:06:48 +0000
commit49acaea5184a5f83db3720c30a3f714b3cb65b34 (patch)
treecfe10f8fcbe24eda3d0204823d092afcdc6463bc /mk
parent4eb06d95d882530375a82edb81b78bf5967b9ea3 (diff)
downloadsyslinux-49acaea5184a5f83db3720c30a3f714b3cb65b34.tar.gz
syslinux-49acaea5184a5f83db3720c30a3f714b3cb65b34.tar.xz
syslinux-49acaea5184a5f83db3720c30a3f714b3cb65b34.zip
efi: Add a simple script to find gnu-efi files
The location of the installed gnu-efi libraries and header files varies wildly with different distributions. We need a way to find the correct location for a given architecture. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/efi.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/mk/efi.mk b/mk/efi.mk
index b13000cb..af25f98d 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -16,16 +16,21 @@ ifeq ($(ARCH),i386)
SARCHOPT = -march=i386
CARCHOPT = -m32 -march=i386
EFI_SUBARCH = ia32
- LIBDIR = /usr/local/lib
- EFIINC = /usr/local/include/efi
endif
ifeq ($(ARCH),x86_64)
SARCHOPT = -march=x86-64
CARCHOPT = -m64 -march=x86-64
EFI_SUBARCH = $(ARCH)
- EFIINC = /usr/include/efi
- LIBDIR=/usr/lib64
endif
+
+EFIINC = $(shell $(topdir)/efi//find-gnu-efi.sh include $(EFI_SUBARCH))
+$(if $(EFIINC),, \
+ $(error Missing $(EFI_SUBARCH) gnu-efi header files))
+
+LIBDIR = $(shell $(topdir)/efi/find-gnu-efi.sh lib $(EFI_SUBARCH))
+$(if $(LIBDIR),, \
+ $(error Missing $(EFI_SUBARCH) gnu-efi libraries))
+
#LIBDIR=/usr/lib
FORMAT=efi-app-$(EFI_SUBARCH)