diff options
-rw-r--r-- | doc/version.mk | 2 | ||||
-rw-r--r-- | samples/Makefile | 39 | ||||
-rw-r--r-- | samples/version.mk | 2 | ||||
-rw-r--r-- | src/Makefile | 38 | ||||
-rw-r--r-- | src/libXNVCtrl/Makefile | 30 | ||||
-rw-r--r-- | src/libXNVCtrl/utils.mk | 2 | ||||
-rw-r--r-- | src/libXNVCtrl/version.mk | 2 | ||||
-rw-r--r-- | src/libXNVCtrl/xnvctrl.mk | 49 | ||||
-rw-r--r-- | src/version.h | 2 | ||||
-rw-r--r-- | src/version.mk | 2 | ||||
-rw-r--r-- | utils.mk | 2 | ||||
-rw-r--r-- | version.mk | 2 |
12 files changed, 90 insertions, 82 deletions
diff --git a/doc/version.mk b/doc/version.mk index 496d309..35e5362 100644 --- a/doc/version.mk +++ b/doc/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 430.14 +NVIDIA_VERSION = 430.26 diff --git a/samples/Makefile b/samples/Makefile index addfc49..3da3580 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -32,33 +32,22 @@ UTILS_MK_DIR ?= .. include $(UTILS_MK_DIR)/utils.mk +XNVCTRL_DIR ?= ../src/libXNVCtrl + +include $(XNVCTRL_DIR)/xnvctrl.mk + ############################################################################## # The calling Makefile may export any of the following variables; we # assign default values if they are not exported by the caller ############################################################################## -ifndef X_LDFLAGS - ifeq ($(TARGET_OS)-$(TARGET_ARCH),Linux-x86_64) - X_LDFLAGS = -L/usr/X11R6/lib64 - else - X_LDFLAGS = -L/usr/X11R6/lib - endif -endif - -X_CFLAGS ?= - -XNVCTRL_DIR ?= ../src/libXNVCtrl -XNVCTRL_MAKEFILE ?= Makefile -XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a - -CFLAGS += $(X_CFLAGS) +CFLAGS += $(XNVCTRL_CFLAGS) CFLAGS += -I $(XNVCTRL_DIR) CFLAGS += -I $(OUTPUTDIR) -LDFLAGS += $(X_LDFLAGS) -LDFLAGS += -L $(XNVCTRL_DIR) -LIBS += -lXNVCtrl -lXext -lX11 +LDFLAGS += $(XNVCTRL_LDFLAGS) +LIBS += -lXext -lX11 ############################################################################## @@ -79,30 +68,24 @@ SAMPLE_SOURCES += nv-control-warpblend.c # build rules ############################################################################## -.PHONY: all clean clobber install build-xnvctrl +.PHONY: all clean clobber install # define the rule to build each object file $(foreach src, $(SAMPLE_SOURCES), $(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src)))) # define the rule to link each sample app from its corresponding object file define link_sample_from_object - $$(OUTPUTDIR)/$(1:.c=): $$(call BUILD_OBJECT_LIST,$(1)) $(XNVCTRL_ARCHIVE) - $$(call quiet_cmd,LINK) $$(CFLAGS) $$(LDFLAGS) $$(BIN_LDFLAGS) -o $$@ $$< $$(LIBS) + $$(OUTPUTDIR)/$(1:.c=): $$(call BUILD_OBJECT_LIST,$(1)) $$(LIBXNVCTRL) + $$(call quiet_cmd,LINK) $$(CFLAGS) $$(LDFLAGS) $$(BIN_LDFLAGS) -o $$@ $$< $$(LIBXNVCTRL) $$(LIBS) all:: $$(OUTPUTDIR)/$(1:.c=) SAMPLES += $$(OUTPUTDIR)/$(1:.c=) endef $(foreach sample,$(SAMPLE_SOURCES),$(eval $(call link_sample_from_object,$(sample)))) -# define the rule to build $(XNVCTRL_ARCHIVE) -$(XNVCTRL_ARCHIVE): build-xnvctrl - -build-xnvctrl: - @$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE) clean clobber: - rm -rf *~ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d $(SAMPLES) - @$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE) clean + rm -rf *~ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d $(SAMPLES) $(LIBXNVCTRL) install: @# don't install samples, this is just to satisfy the top-level diff --git a/samples/version.mk b/samples/version.mk index 496d309..35e5362 100644 --- a/samples/version.mk +++ b/samples/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 430.14 +NVIDIA_VERSION = 430.26 diff --git a/src/Makefile b/src/Makefile index 5f42aff..f7f455c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -26,22 +26,15 @@ UTILS_MK_DIR ?= .. include $(UTILS_MK_DIR)/utils.mk +XNVCTRL_DIR ?= ../src/libXNVCtrl + +include $(XNVCTRL_DIR)/xnvctrl.mk ############################################################################## # The calling Makefile may export any of the following variables; we # assign default values if they are not exported by the caller ############################################################################## -ifndef X_LDFLAGS - ifeq ($(TARGET_OS)-$(TARGET_ARCH),Linux-x86_64) - X_LDFLAGS = -L/usr/X11R6/lib64 - else - X_LDFLAGS = -L/usr/X11R6/lib - endif -endif - -X_CFLAGS ?= - PKG_CONFIG ?= pkg-config ifndef GTK2_CFLAGS @@ -111,8 +104,6 @@ endif ############################################################################## XNVCTRL_DIR ?= libXNVCtrl -XNVCTRL_MAKEFILE ?= Makefile -XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a XCONFIG_PARSER_DIR ?= XF86Config-parser COMMON_UTILS_DIR ?= common-utils COMMON_UNIX_DIR ?= common-unix @@ -142,14 +133,14 @@ else GTK3LIB = endif -CFLAGS += $(X_CFLAGS) +CFLAGS += $(XNVCTRL_CFLAGS) ifeq ($(TARGET_OS),SunOS) LDFLAGS += -Wl,-rpath=/usr/X11R6/lib -Wl,--export-dynamic LIBS += -lscf endif -LDFLAGS += $(X_LDFLAGS) +LDFLAGS += $(XNVCTRL_LDFLAGS) NVML_EXPERIMENTAL ?= CFLAGS += $(if $(NVML_EXPERIMENTAL),-DNVML_EXPERIMENTAL) @@ -262,7 +253,7 @@ endef # build rules ############################################################################## -.PHONY: all install NVIDIA_SETTINGS_install clean clobber build-xnvctrl +.PHONY: all install NVIDIA_SETTINGS_install clean clobber all: $(NVIDIA_SETTINGS) $(GTK2LIB) $(GTK3LIB) @@ -282,14 +273,14 @@ NVIDIA_SETTINGS_install: $(NVIDIA_SETTINGS) $(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<) $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS))) -$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_ARCHIVE) +$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(LIBXNVCTRL) $(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ - -rdynamic -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) $(LIBS) + -rdynamic -o $@ $(OBJS) $(LIBXNVCTRL) $(LIBS) $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB))) $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ - $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK2_LIBS) \ + $(LIBXNVCTRL) $(LIBS) $(GTK2_LIBS) \ -Wl,--unresolved-symbols=ignore-all -o $@ \ -Wl,-soname -Wl,$(GTK2LIB_SONAME) \ $(GTK2_OBJS) $(IMAGE_OBJS) $(XCP_OBJS) @@ -298,7 +289,7 @@ ifdef BUILD_GTK3LIB $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB))) $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ - $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK3_LIBS) \ + $(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) \ -Wl,--unresolved-symbols=ignore-all -o $@ \ -Wl,-soname -Wl,$(GTK3LIB_SONAME) \ $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) @@ -308,18 +299,11 @@ endif $(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src)))) $(foreach src,$(XCP_SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src)))) -# define the rule to build $(XNVCTRL_ARCHIVE) -$(XNVCTRL_ARCHIVE): build-xnvctrl - -build-xnvctrl: - @$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE) - clean clobber: rm -rf $(NVIDIA_SETTINGS) *~ \ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \ $(GTK2LIB) $(GTK3LIB) $(GTK2LIB_DIR) $(GTK3LIB_DIR) \ - $(IMAGE_HEADERS) - @$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE) clean + $(IMAGE_HEADERS) $(LIBXNVCTRL) $(foreach src,$(GTK_SRC), \ $(eval $(call DEFINE_OBJECT_RULE_WITH_DIR,TARGET,$(src),$(GTK2LIB_DIR)))) diff --git a/src/libXNVCtrl/Makefile b/src/libXNVCtrl/Makefile index 6942c3e..1e84ecb 100644 --- a/src/libXNVCtrl/Makefile +++ b/src/libXNVCtrl/Makefile @@ -24,31 +24,25 @@ # include common variables and functions ############################################################################## -include utils.mk +UTILS_MK_DIR ?= . + +include $(UTILS_MK_DIR)/utils.mk + +XNVCTRL_DIR ?= . +include $(XNVCTRL_DIR)/xnvctrl.mk ############################################################################## # assign variables ############################################################################## -LIBXNVCTRL = libXNVCtrl.a - -LIBXNVCTRL_PROGRAM_NAME = "libXNVCtrl" - -LIBXNVCTRL_VERSION := $(NVIDIA_VERSION) - -X_CFLAGS ?= - -CFLAGS += $(X_CFLAGS) +CFLAGS += $(XNVCTRL_CFLAGS) CFLAGS += -I . CFLAGS += -fPIC CFLAGS += -I $(OUTPUTDIR) -CFLAGS += -DPROGRAM_NAME=\"$(LIBXNVCTRL_PROGRAM_NAME)\" - -SRC += NVCtrl.c - -OBJS = $(call BUILD_OBJECT_LIST,$(SRC)) +CFLAGS += -I $(XNVCTRL_DIR) +LDFLAGS += $(XNVCTRL_LDFLAGS) ############################################################################## # build rules @@ -58,12 +52,6 @@ OBJS = $(call BUILD_OBJECT_LIST,$(SRC)) all: $(LIBXNVCTRL) -$(LIBXNVCTRL) : $(OBJS) - $(AR) ru $@ $(OBJS) - -# define the rule to build each object file -$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src)))) - clean: rm -rf $(LIBXNVCTRL) *~ \ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d diff --git a/src/libXNVCtrl/utils.mk b/src/libXNVCtrl/utils.mk index 8218e0c..95d4b31 100644 --- a/src/libXNVCtrl/utils.mk +++ b/src/libXNVCtrl/utils.mk @@ -34,6 +34,7 @@ CC ?= gcc LD ?= ld +AR ?= ar # only set these warnings and optimizations if CFLAGS is unset CFLAGS ?= -Wall -O2 # always set these -f CFLAGS @@ -302,6 +303,7 @@ quiet_STRIP_CMD = $(call define_quiet_cmd,STRIP ,$@) quiet_HARDLINK = $(call define_quiet_cmd,HARDLINK ,$@) quiet_LD = $(call define_quiet_cmd,LD ,$@) quiet_OBJCOPY = $(call define_quiet_cmd,OBJCOPY ,$@) +quiet_AR = $(call define_quiet_cmd,AR ,$@) ############################################################################## # Tell gmake to delete the target of a rule if it has changed and its diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk index 496d309..35e5362 100644 --- a/src/libXNVCtrl/version.mk +++ b/src/libXNVCtrl/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 430.14 +NVIDIA_VERSION = 430.26 diff --git a/src/libXNVCtrl/xnvctrl.mk b/src/libXNVCtrl/xnvctrl.mk new file mode 100644 index 0000000..e6be2ef --- /dev/null +++ b/src/libXNVCtrl/xnvctrl.mk @@ -0,0 +1,49 @@ +# Copyright (c) 2008-2019 NVIDIA, Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +############################################################################## +# makefile fragment to define how to build LIBXNVCTRL +############################################################################## + +# The calling Makefile may export any of the following variables; we +# assign default values if they are not exported by the caller + +ifndef XNVCTRL_LDFLAGS + ifeq ($(TARGET_OS)-$(TARGET_ARCH),Linux-x86_64) + XNVCTRL_LDFLAGS = -L/usr/X11R6/lib64 + else + XNVCTRL_LDFLAGS = -L/usr/X11R6/lib + endif +endif + +XNVCTRL_CFLAGS ?= + + +LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a + +LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c + +LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC)) + +$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(LIBXNVCTRL_SRC))) + +$(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ) + $(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ) diff --git a/src/version.h b/src/version.h index cfd2604..dd14f4c 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define NVIDIA_VERSION "430.14" +#define NVIDIA_VERSION "430.26" diff --git a/src/version.mk b/src/version.mk index 496d309..35e5362 100644 --- a/src/version.mk +++ b/src/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 430.14 +NVIDIA_VERSION = 430.26 @@ -34,6 +34,7 @@ CC ?= gcc LD ?= ld +AR ?= ar # only set these warnings and optimizations if CFLAGS is unset CFLAGS ?= -Wall -O2 # always set these -f CFLAGS @@ -302,6 +303,7 @@ quiet_STRIP_CMD = $(call define_quiet_cmd,STRIP ,$@) quiet_HARDLINK = $(call define_quiet_cmd,HARDLINK ,$@) quiet_LD = $(call define_quiet_cmd,LD ,$@) quiet_OBJCOPY = $(call define_quiet_cmd,OBJCOPY ,$@) +quiet_AR = $(call define_quiet_cmd,AR ,$@) ############################################################################## # Tell gmake to delete the target of a rule if it has changed and its @@ -1 +1 @@ -NVIDIA_VERSION = 430.14 +NVIDIA_VERSION = 430.26 |