summaryrefslogtreecommitdiff
path: root/utils.mk
diff options
context:
space:
mode:
authorLiam Middlebrook <lmiddlebrook@nvidia.com>2018-09-19 14:31:29 -0700
committerLiam Middlebrook <lmiddlebrook@nvidia.com>2018-09-19 14:31:29 -0700
commit3061600e99d0b2ce72209bcdcd249810d4fc082f (patch)
treebbdcf40fb7348a49b666cbd4196a6b9de09deab1 /utils.mk
parentd6223ed1aec453a7c041adbeefa35171deab7adb (diff)
410.57
Diffstat (limited to 'utils.mk')
-rw-r--r--utils.mk35
1 files changed, 2 insertions, 33 deletions
diff --git a/utils.mk b/utils.mk
index 66dbb16..8218e0c 100644
--- a/utils.mk
+++ b/utils.mk
@@ -74,9 +74,7 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
HARDLINK ?= ln -f
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -214,6 +212,8 @@ ifndef NVIDIA_VERSION
$(error NVIDIA_VERSION undefined)
endif
+CFLAGS += -DNVIDIA_VERSION=\"$(NVIDIA_VERSION)\"
+
##############################################################################
# Several of the functions below take an argument that indicates if
@@ -425,37 +425,6 @@ define DEBUG_INFO_RULES
endef
##############################################################################
-# STAMP_C - this is a source file that is generated during the build
-# to capture information about the build environment for the utility.
-#
-# The DEFINE_STAMP_C_RULE function is used to define the rule for
-# generating STAMP_C. First argument is a list of dependencies for
-# STAMP_C (g_stamp.o is filtered out of the list); second argument is
-# the name of the program being built.
-#
-# The includer of utils.mk should add $(STAMP_C) to its list of source
-# files
-##############################################################################
-
-STAMP_C = $(OUTPUTDIR)/g_stamp.c
-
-define DEFINE_STAMP_C_RULE
-
- $$(STAMP_C): $$(filter-out \
- $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \
- $$(VERSION_MK)
- @ $$(RM) $$@
- @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
- @ $$(PRINTF) "%s" "$(2): " >> $$@
- @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
- @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
-
-endef
-
-##############################################################################
# Define rules that can be used for embedding a file into an ELF object that
# contains the raw contents of that file and symbols pointing to the embedded
# data.