diff options
Diffstat (limited to 'utils.mk')
-rw-r--r-- | utils.mk | 35 |
1 files changed, 2 insertions, 33 deletions
@@ -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. |