1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
INSTALL ?= install
MAKE ?= make
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
READELF = eu-readelf
XGETTEXT = xgettext
prefix ?= /usr/
prefix := $(abspath $(prefix))/
ARCH = $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
ifeq ($(ARCH),x86_64)
LIBDIR ?= $(prefix)lib64
endif
ifeq ($(ARCH),ia32)
LIBDIR ?= $(prefix)lib
endif
ifeq ($(ARCH),aarch64)
LIBDIR ?= $(prefix)lib64
endif
ifeq ($(ARCH),arm)
LIBDIR ?= $(prefix)lib
endif
LIBDIR ?= unknown
ifeq ($(LIBDIR),unknown)
$(error Architecture $(ARCH) is not a supported build target.)
endif
GNUEFIDIR ?= $(LIBDIR)/gnuefi/
libdir ?= $(LIBDIR)
pcdir ?= $(libdir)/pkgconfig/
mandir ?= $(prefix)share/man/
includedir ?= $(prefix)include/
bindir ?= $(prefix)bin/
datadir ?= $(prefix)share/
localedir ?= $(datadir)/locale/
libexecdir ?= $(prefix)libexec/
libdatadir ?= $(prefix)lib/
EFIDIR ?= $(shell x=$$(which --skip-alias --skip-functions git 2>/dev/null) ; [ -n "$$x" ] && git config --get fwupdate.efidir)
ifeq ($(EFIDIR),)
EFIDIR_ERROR = $(error EFIDIR or .gitconfig fwupdate.efidir must be set to this distro's reserved EFI System Partition subdirectory name)
endif
DEBUGINFO ?= $(prefix)lib/debug/
DEBUGSOURCE ?= $(prefix)src/debug/
TARGETDIR ?= /boot/efi/EFI/$(EFIDIR)/
.PHONY: check_efidir_error
check_efidir_error : ; $(EFIDIR_ERROR) $(info Building with EFIDIR as $(EFIDIR))
|