summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2016-03-21 09:01:48 -0700
committerAaron Plattner <aplattner@nvidia.com>2016-03-21 09:01:48 -0700
commit488accd5dc9b2f2392a4eb047807228d985cdd44 (patch)
tree9359ab928166331c15ea9ec6cbc2e0eead09bdf1
parente66a34bc6be4591f13298d65c16b302f76080be5 (diff)
364.12364.12
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/Makefile16
-rw-r--r--src/common-utils/common-utils.h6
-rw-r--r--src/gtk+-2.x/ctkappprofile.c25
-rw-r--r--src/gtk+-2.x/ctkconfig.c13
-rw-r--r--src/libXNVCtrl/utils.mk35
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--utils.mk35
-rw-r--r--version.mk2
12 files changed, 119 insertions, 23 deletions
diff --git a/doc/version.mk b/doc/version.mk
index 9b784b4..6a12cf6 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12
diff --git a/samples/version.mk b/samples/version.mk
index 9b784b4..6a12cf6 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12
diff --git a/src/Makefile b/src/Makefile
index 82d38cb..7ae58cc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -280,27 +280,27 @@ NVIDIA_SETTINGS_install: $(NVIDIA_SETTINGS)
$(MKDIR) $(BINDIR)
$(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<)
-$(NVIDIA_SETTINGS): $(OBJS) $(XNVCTRL_ARCHIVE)
+$(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS)))
+$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_ARCHIVE)
$(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
-rdynamic -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) $(LIBS)
- $(call quiet_cmd,STRIP_CMD) $@
-$(GTK2LIB): $(GTK2_OBJS) $(XCP_OBJS) $(VERSION_MK)
+$(eval $(call DEBUG_INFO_RULES, $(GTK2LIB)))
+$(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(VERSION_MK)
$(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
$(XNVCTRL_ARCHIVE) $(LIBS) $(GTK2_LIBS) \
- -Wl,--unresolved-symbols=ignore-all -o $(GTK2LIB) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
-Wl,-soname -Wl,$(GTK2LIB_SONAME) \
$(GTK2_OBJS) $(XCP_OBJS)
- $(call quiet_cmd,STRIP_CMD) $@
ifdef BUILD_GTK3LIB
-$(GTK3LIB): $(GTK3_OBJS) $(XCP_OBJS) $(VERSION_MK)
+$(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
+$(GTK3LIB).unstripped: $(GTK3_OBJS) $(XCP_OBJS) $(VERSION_MK)
$(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
$(XNVCTRL_ARCHIVE) $(LIBS) $(GTK3_LIBS) \
- -Wl,--unresolved-symbols=ignore-all -o $(GTK3LIB) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
-Wl,-soname -Wl,$(GTK3LIB_SONAME) \
$(GTK3_OBJS) $(XCP_OBJS)
- $(call quiet_cmd,STRIP_CMD) $@
endif
# define the rule to build each object file
diff --git a/src/common-utils/common-utils.h b/src/common-utils/common-utils.h
index 7a1f71a..6ef1d06 100644
--- a/src/common-utils/common-utils.h
+++ b/src/common-utils/common-utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2012 NVIDIA Corporation
+ * Copyright (C) 2010-2015 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -40,8 +40,12 @@
#define ARRAY_LEN(_arr) (sizeof(_arr) / sizeof(_arr[0]))
+#ifndef NV_MIN
#define NV_MIN(x,y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef NV_MAX
#define NV_MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
#define TAB " "
#define BIGTAB " "
diff --git a/src/gtk+-2.x/ctkappprofile.c b/src/gtk+-2.x/ctkappprofile.c
index b79c295..49655ed 100644
--- a/src/gtk+-2.x/ctkappprofile.c
+++ b/src/gtk+-2.x/ctkappprofile.c
@@ -1036,9 +1036,9 @@ static gboolean unref_setting_object(GtkTreeModel *model,
return FALSE;
}
-static void load_settings_from_profile(CtkAppProfile *ctk_app_profile,
- GtkListStore *list_store,
- const char *profile_name)
+static gboolean load_settings_from_profile(CtkAppProfile *ctk_app_profile,
+ GtkListStore *list_store,
+ const char *profile_name)
{
GtkTreeIter iter;
size_t i, size;
@@ -1052,18 +1052,20 @@ static void load_settings_from_profile(CtkAppProfile *ctk_app_profile,
profile = ctk_apc_profile_model_get_profile(ctk_app_profile->apc_profile_model,
profile_name);
if (!profile) {
- return;
+ return FALSE;
}
settings = json_object_get(profile, "settings");
if (!settings) {
- return;
+ return FALSE;
}
for (i = 0, size = json_array_size(settings); i < size; i++) {
setting = json_deep_copy(json_array_get(settings, i));
gtk_list_store_append(list_store, &iter);
gtk_list_store_set(list_store, &iter, SETTING_LIST_STORE_COL_SETTING, setting, -1);
}
+
+ return TRUE;
}
static void edit_rule_dialog_load_profile(EditRuleDialog *dialog,
@@ -1071,6 +1073,7 @@ static void edit_rule_dialog_load_profile(EditRuleDialog *dialog,
{
CtkAppProfile *ctk_app_profile = CTK_APP_PROFILE(dialog->parent);
GtkComboBox *combo_box_entry;
+ gboolean has_settings;
// profile name
combo_box_entry = GTK_COMBO_BOX(dialog->profile_name_combo);
@@ -1095,9 +1098,15 @@ static void edit_rule_dialog_load_profile(EditRuleDialog *dialog,
}
// profile settings
- load_settings_from_profile(CTK_APP_PROFILE(dialog->parent),
- dialog->profile_settings_store,
- dialog->profile_name->str);
+ has_settings = load_settings_from_profile(CTK_APP_PROFILE(dialog->parent),
+ dialog->profile_settings_store,
+ dialog->profile_name->str);
+
+ if (!has_settings) {
+ g_string_assign(dialog->profile_name, "");
+ gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo_box_entry))),
+ dialog->profile_name->str);
+ }
}
static void edit_rule_dialog_load_values(EditRuleDialog *dialog)
diff --git a/src/gtk+-2.x/ctkconfig.c b/src/gtk+-2.x/ctkconfig.c
index b07b6e8..5ac361c 100644
--- a/src/gtk+-2.x/ctkconfig.c
+++ b/src/gtk+-2.x/ctkconfig.c
@@ -748,6 +748,10 @@ static void enabled_renderer_func(GtkTreeViewColumn *tree_column,
column = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, column, &timer_config, -1);
+ if (timer_config == NULL) {
+ return;
+ }
+
value = timer_config->user_enabled;
g_object_set(GTK_CELL_RENDERER(cell), "active", value, NULL);
}
@@ -765,6 +769,10 @@ static void description_renderer_func(GtkTreeViewColumn *tree_column,
column = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, column, &timer_config, -1);
+ if (timer_config == NULL) {
+ return;
+ }
+
value = timer_config->description;
g_object_set(GTK_CELL_RENDERER(cell), "text", value, NULL);
}
@@ -781,6 +789,11 @@ static void time_interval_renderer_func(GtkTreeViewColumn *tree_column,
gchar str[32];
gtk_tree_model_get(model, iter, column, &timer_config, -1);
+
+ if (timer_config == NULL) {
+ return;
+ }
+
value = timer_config->interval;
snprintf(str, 32, "%d ms", value);
diff --git a/src/libXNVCtrl/utils.mk b/src/libXNVCtrl/utils.mk
index 9c50176..958714f 100644
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -73,6 +73,7 @@ MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
WHOAMI ?= whoami
+HARDLINK ?= ln -f
HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
@@ -151,6 +152,13 @@ endif
OUTPUTDIR ?= _out/$(TARGET_OS)_$(TARGET_ARCH)
OUTPUTDIR_ABSOLUTE ?= $(CURDIR)/$(OUTPUTDIR)
+NV_SEPARATE_DEBUG_INFO ?=
+NV_KEEP_UNSTRIPPED_BINARIES ?=
+DO_STRIP ?=
+ifneq ($(DEBUG),1)
+ DO_STRIP = 1
+endif
+
NV_QUIET_COMMAND_REMOVED_TARGET_PREFIX ?=
CFLAGS += $(CC_ONLY_CFLAGS)
@@ -288,6 +296,7 @@ quiet_LINK = $(call define_quiet_cmd,LINK ,$@)
quiet_HOST_LINK = $(call define_quiet_cmd,HOST_LINK ,$@)
quiet_M4 = $(call define_quiet_cmd,M4 ,$<)
quiet_STRIP_CMD = $(call define_quiet_cmd,STRIP ,$@)
+quiet_HARDLINK = $(call define_quiet_cmd,HARDLINK ,$@)
##############################################################################
# Tell gmake to delete the target of a rule if it has changed and its
@@ -383,6 +392,32 @@ define DEFINE_OBJECT_RULE
$$(eval $$(call DEFINE_OBJECT_RULE_WITH_DIR,$(1),$(2),$(OUTPUTDIR)))
endef
+# This is a function that will generate rules to build
+# files with separate debug information, if so requested.
+#
+# It takes one parameter: (1) Name of unstripped binary
+#
+# When used, the target for linking should be named (1).unstripped
+#
+# If separate debug information is requested, it will
+# generate a rule to build one from the unstripped binary.
+# If requested, it will also retain the unstripped binary.
+define DEBUG_INFO_RULES
+ $(1): $(1).unstripped
+ ifneq ($(or $(DO_STRIP),$(NV_SEPARATE_DEBUG_INFO)),)
+ $$(call quiet_cmd,STRIP_CMD) -o $$@ $$<
+ else
+ $$(call quiet_cmd,HARDLINK) $$^ $$@
+ endif
+ ifeq ($(NV_SEPARATE_DEBUG_INFO),1)
+ $(1).debug: $(1).unstripped
+ $$(call quiet_cmd,STRIP_CMD) --only-keep-debug -o $$@ $$<
+ $(1): $(1).debug
+ endif
+ ifneq ($(NV_KEEP_UNSTRIPPED_BINARIES),1)
+ .INTERMEDIATE: $(1).unstripped
+ endif
+endef
##############################################################################
# STAMP_C - this is a source file that is generated during the build
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index 9b784b4..6a12cf6 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12
diff --git a/src/version.h b/src/version.h
index c750c37..279856f 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "361.28"
+#define NVIDIA_VERSION "364.12"
diff --git a/src/version.mk b/src/version.mk
index 9b784b4..6a12cf6 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12
diff --git a/utils.mk b/utils.mk
index 9c50176..958714f 100644
--- a/utils.mk
+++ b/utils.mk
@@ -73,6 +73,7 @@ MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
WHOAMI ?= whoami
+HARDLINK ?= ln -f
HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
@@ -151,6 +152,13 @@ endif
OUTPUTDIR ?= _out/$(TARGET_OS)_$(TARGET_ARCH)
OUTPUTDIR_ABSOLUTE ?= $(CURDIR)/$(OUTPUTDIR)
+NV_SEPARATE_DEBUG_INFO ?=
+NV_KEEP_UNSTRIPPED_BINARIES ?=
+DO_STRIP ?=
+ifneq ($(DEBUG),1)
+ DO_STRIP = 1
+endif
+
NV_QUIET_COMMAND_REMOVED_TARGET_PREFIX ?=
CFLAGS += $(CC_ONLY_CFLAGS)
@@ -288,6 +296,7 @@ quiet_LINK = $(call define_quiet_cmd,LINK ,$@)
quiet_HOST_LINK = $(call define_quiet_cmd,HOST_LINK ,$@)
quiet_M4 = $(call define_quiet_cmd,M4 ,$<)
quiet_STRIP_CMD = $(call define_quiet_cmd,STRIP ,$@)
+quiet_HARDLINK = $(call define_quiet_cmd,HARDLINK ,$@)
##############################################################################
# Tell gmake to delete the target of a rule if it has changed and its
@@ -383,6 +392,32 @@ define DEFINE_OBJECT_RULE
$$(eval $$(call DEFINE_OBJECT_RULE_WITH_DIR,$(1),$(2),$(OUTPUTDIR)))
endef
+# This is a function that will generate rules to build
+# files with separate debug information, if so requested.
+#
+# It takes one parameter: (1) Name of unstripped binary
+#
+# When used, the target for linking should be named (1).unstripped
+#
+# If separate debug information is requested, it will
+# generate a rule to build one from the unstripped binary.
+# If requested, it will also retain the unstripped binary.
+define DEBUG_INFO_RULES
+ $(1): $(1).unstripped
+ ifneq ($(or $(DO_STRIP),$(NV_SEPARATE_DEBUG_INFO)),)
+ $$(call quiet_cmd,STRIP_CMD) -o $$@ $$<
+ else
+ $$(call quiet_cmd,HARDLINK) $$^ $$@
+ endif
+ ifeq ($(NV_SEPARATE_DEBUG_INFO),1)
+ $(1).debug: $(1).unstripped
+ $$(call quiet_cmd,STRIP_CMD) --only-keep-debug -o $$@ $$<
+ $(1): $(1).debug
+ endif
+ ifneq ($(NV_KEEP_UNSTRIPPED_BINARIES),1)
+ .INTERMEDIATE: $(1).unstripped
+ endif
+endef
##############################################################################
# STAMP_C - this is a source file that is generated during the build
diff --git a/version.mk b/version.mk
index 9b784b4..6a12cf6 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 361.28
+NVIDIA_VERSION = 364.12