forked from rhboot/fwupdate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Make.defaults
71 lines (66 loc) · 2.03 KB
/
Make.defaults
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include $(TOP)/Make.version
ifneq ($(origin RELEASE),undefined)
DASHRELEASE ?= -$(RELEASE)
else
DASHRELEASE ?=
endif
NAME = fwupdate
COMMIT_ID = $(shell git log -1 --pretty=%H 2>/dev/null || echo master)
INSTALL ?= install
MAKE ?= make
PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
READELF = eu-readelf
XGETTEXT = xgettext
ABIDIFF := abidiff
ABIDW := abidw
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
ifneq ($(origin RPMARCH),undefined)
DOTARCH ?= .$(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,i686,)
else
DOTARCH ?= .$(RPMARCH)
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
sharedstatedir ?= /var/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
ESPMOUNTPOINT ?= $(shell x=$$(which --skip-alias --skip-functions git 2>/dev/null) ; [ -n "$$x" ] && git config --get fwupdate.espmountdir)
ifeq ($(ESPMOUNTPOINT),)
ESPMOUNTPOINT = "/boot/efi"
endif
DEBUGINFO ?= $(prefix)lib/debug
DEBUGSOURCE ?= $(prefix)src/debug
TARGETDIR ?= $(ESPMOUNTPOINT)/EFI/$(EFIDIR)
.PHONY: check_efidir_error
check_efidir_error : ; $(EFIDIR_ERROR) $(info Building with EFIDIR as $(EFIDIR))