diff options
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/src/Makefile b/src/Makefile index 95719628f..6d7df0e2c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -26,16 +26,17 @@ PRINTF := printf PERL := perl PYTHON := python TRUE := true -CC := $(CROSS_COMPILE)gcc -CPP := $(CC) -E -AS := $(CROSS_COMPILE)as -LD := $(CROSS_COMPILE)ld -SIZE := $(CROSS_COMPILE)size -AR := $(CROSS_COMPILE)ar -RANLIB := $(CROSS_COMPILE)ranlib -OBJCOPY := $(CROSS_COMPILE)objcopy -NM := $(CROSS_COMPILE)nm -OBJDUMP := $(CROSS_COMPILE)objdump +TRUNCATE := truncate +CC = $(CROSS_COMPILE)gcc +CPP = $(CC) -E +AS = $(CROSS_COMPILE)as +LD = $(CROSS_COMPILE)ld +SIZE = $(CROSS_COMPILE)size +AR = $(CROSS_COMPILE)ar +RANLIB = $(CROSS_COMPILE)ranlib +OBJCOPY = $(CROSS_COMPILE)objcopy +NM = $(CROSS_COMPILE)nm +OBJDUMP = $(CROSS_COMPILE)objdump OPENSSL := openssl CSPLIT := csplit PARSEROM := ./util/parserom.pl @@ -45,7 +46,8 @@ SORTOBJDUMP := ./util/sortobjdump.pl PADIMG := ./util/padimg.pl LICENCE := ./util/licence.pl NRV2B := ./util/nrv2b -ZBIN := ./util/zbin +ZBIN32 := ./util/zbin32 +ZBIN64 := ./util/zbin64 ELF2EFI32 := ./util/elf2efi32 ELF2EFI64 := ./util/elf2efi64 EFIROM := ./util/efirom @@ -81,6 +83,7 @@ SRCDIRS += drivers/net/marvell SRCDIRS += drivers/block SRCDIRS += drivers/nvs SRCDIRS += drivers/bitbash +SRCDIRS += drivers/gpio SRCDIRS += drivers/infiniband SRCDIRS += drivers/infiniband/mlx_utils_flexboot/src SRCDIRS += drivers/infiniband/mlx_utils/src/public @@ -92,6 +95,7 @@ SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_link_speed SRCDIRS += drivers/infiniband/mlx_utils/mlx_lib/mlx_mtu SRCDIRS += drivers/infiniband/mlx_nodnic/src SRCDIRS += drivers/usb +SRCDIRS += drivers/uart SRCDIRS += interface/pxe interface/efi interface/smbios SRCDIRS += interface/bofm SRCDIRS += interface/xen @@ -103,16 +107,12 @@ SRCDIRS += hci/mucurses hci/mucurses/widgets SRCDIRS += hci/keymap SRCDIRS += usr SRCDIRS += config - -# These directories contain code that is not eligible for UEFI Secure -# Boot signing. -# -SRCDIRS_INSEC += net/oncrpc -SRCDIRS_INSEC += net/80211 -SRCDIRS_INSEC += drivers/net/rtl818x -SRCDIRS_INSEC += drivers/net/ath -SRCDIRS_INSEC += drivers/net/ath/ath5k -SRCDIRS_INSEC += drivers/net/ath/ath9k +SRCDIRS += net/oncrpc +SRCDIRS += net/80211 +SRCDIRS += drivers/net/rtl818x +SRCDIRS += drivers/net/ath +SRCDIRS += drivers/net/ath/ath5k +SRCDIRS += drivers/net/ath/ath9k # NON_AUTO_SRCS lists files that are excluded from the normal # automatic build system. @@ -210,28 +210,29 @@ install : # # Version number calculations # -ifneq ($(wildcard ../.git),) -VERSIONS := $(shell git describe --tags --always --long --abbrev=1 --match "v*") -VERSION_TUPLE := $(subst ., ,$(subst -, ,$(patsubst v%,%,$(VERSIONS)))) -VERSION_MAJOR := $(word 1,$(VERSION_TUPLE)) -VERSION_MINOR := $(word 2,$(VERSION_TUPLE)) -VERSION_PATCH := $(word 3,$(VERSION_TUPLE)) -ifeq ($(word 4,$(VERSION_TUPLE)),0) -EXTRAVERSION := -else +VERSION_MAJOR := 1 +VERSION_MINOR := 21 +VERSION_PATCH := 1 EXTRAVERSION := + -endif -GITVERSION = $(word 5,$(VERSION_TUPLE)) +ifneq ($(wildcard ../.git/HEAD),) +GITVERSION := $(shell cat ../.git/HEAD) +ifeq ($(firstword $(GITVERSION)),ref:) +GITREF := $(word 2,$(GITVERSION)) +ifneq ($(wildcard ../.git/$(GITREF)),) +GITVERSION := $(shell cat ../.git/$(GITREF)) else -VERSION_MAJOR = 1 -VERSION_MINOR = 0 -VERSION_PATCH = 0 -EXTRAVERSION = + +GITVERSION := $(shell awk -v ref="$(GITREF)" '$$2 == ref { print $1 }' \ + ../.git/packed-refs) +endif +endif +ifeq ($(GITVERSION),) +$(error Unable to determine git commit ID) +endif endif MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR) VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION) ifneq ($(GITVERSION),) -VERSION += ($(GITVERSION)) +VERSION += (g$(shell echo "$(GITVERSION)" | cut -c1-5)) endif version : @$(ECHO) "$(VERSION)" |
