Skip to content
Permalink
Browse files

302.07

  • Loading branch information...
aaronp24 committed May 2, 2012
1 parent 6c04ca8 commit c3e638087673f0f4b7a751685a97b7830a8d9a18
Showing with 5,206 additions and 14,083 deletions.
  1. +6 −197 Makefile
  2. +0 −60 dist-files.mk
  3. +115 −0 doc/Makefile
  4. BIN doc/nvidia-settings.png
  5. +2 −0 doc/src.mk
  6. +1 −0 doc/version.mk
  7. +7 −3 samples/Makefile
  8. +148 −6 samples/nv-control-dpy.c
  9. +1 −1 samples/nv-control-dvc.c
  10. +257 −317 samples/nv-control-events.c
  11. +8 −21 samples/nv-control-gvi.c
  12. +13 −6 samples/nv-control-info.c
  13. +1 −1 samples/nv-control-targets.c
  14. +2 −0 samples/src.mk
  15. +1 −0 samples/version.mk
  16. +174 −0 src/Makefile
  17. +8 −54 src/command-line.c
  18. +0 −2 src/command-line.h
  19. +337 −1 src/common-utils/common-utils.c
  20. +77 −1 src/common-utils/common-utils.h
  21. +181 −0 src/common-utils/gen-manpage-opts-helper.c
  22. +24 −0 src/common-utils/gen-manpage-opts-helper.h
  23. +125 −0 src/common-utils/nvgetopt.c
  24. +24 −0 src/common-utils/nvgetopt.h
  25. +6 −0 src/common-utils/src.mk
  26. +2 −2 src/config-file.c
  27. +3 −112 src/gen-manpage-opts.c
  28. +1 −0 src/glxinfo.c
  29. +1 −0 src/gtk+-2.x/ctk3dvisionpro.c
  30. +1 −2 src/gtk+-2.x/ctkbanner.c
  31. +0 −1 src/gtk+-2.x/ctkbanner.h
  32. +1 −0 src/gtk+-2.x/ctkclocks.c
  33. +93 −57 src/gtk+-2.x/ctkcolorcontrols.c
  34. +1 −5 src/gtk+-2.x/ctkcolorcontrols.h
  35. +13 −12 src/gtk+-2.x/ctkcolorcorrection.c
  36. +1 −0 src/gtk+-2.x/ctkconfig.c
  37. +1 −0 src/gtk+-2.x/ctkcursorshadow.c
  38. +1 −0 src/gtk+-2.x/ctkcurve.c
  39. +415 −182 src/gtk+-2.x/ctkdisplayconfig-utils.c
  40. +3 −3 src/gtk+-2.x/ctkdisplayconfig-utils.h
  41. +659 −563 src/gtk+-2.x/ctkdisplayconfig.c
  42. +26 −7 src/gtk+-2.x/ctkdisplayconfig.h
  43. +36 −64 src/gtk+-2.x/ctkdisplaydevice-crt.c
  44. +2 −4 src/gtk+-2.x/ctkdisplaydevice-crt.h
  45. +0 −1,433 src/gtk+-2.x/ctkdisplaydevice-dfp.c
  46. +0 −106 src/gtk+-2.x/ctkdisplaydevice-dfp.h
  47. +73 −113 src/gtk+-2.x/ctkdisplaydevice-tv.c
  48. +2 −4 src/gtk+-2.x/ctkdisplaydevice-tv.h
  49. +708 −0 src/gtk+-2.x/ctkdisplaydevice.c
  50. +93 −0 src/gtk+-2.x/ctkdisplaydevice.h
  51. +37 −231 src/gtk+-2.x/ctkdisplaylayout.c
  52. +22 −5 src/gtk+-2.x/ctkdisplaylayout.h
  53. +143 −104 src/gtk+-2.x/ctkditheringcontrols.c
  54. +7 −7 src/gtk+-2.x/ctkditheringcontrols.h
  55. +1 −0 src/gtk+-2.x/ctkdropdownmenu.c
  56. +1 −0 src/gtk+-2.x/ctkecc.c
  57. +23 −19 src/gtk+-2.x/ctkedid.c
  58. +3 −7 src/gtk+-2.x/ctkedid.h
  59. +25 −20 src/gtk+-2.x/ctkevent.c
  60. +35 −94 src/gtk+-2.x/ctkframelock.c
  61. +1 −0 src/gtk+-2.x/ctkgauge.c
  62. +1 −0 src/gtk+-2.x/ctkglx.c
  63. +8 −61 src/gtk+-2.x/ctkgpu.c
  64. +3 −2 src/gtk+-2.x/ctkgvi.c
  65. +1 −0 src/gtk+-2.x/ctkgvo-banner.c
  66. +1 −0 src/gtk+-2.x/ctkgvo-csc.c
  67. +1 −0 src/gtk+-2.x/ctkgvo-sync.c
  68. +164 −1,423 src/gtk+-2.x/ctkgvo.c
  69. +3 −33 src/gtk+-2.x/ctkgvo.h
  70. +2 −1 src/gtk+-2.x/ctkhelp.c
  71. +123 −150 src/gtk+-2.x/ctkimagesliders.c
  72. +3 −6 src/gtk+-2.x/ctkimagesliders.h
  73. +1 −0 src/gtk+-2.x/ctklicense.c
  74. +33 −19 src/gtk+-2.x/ctkmultisample.c
  75. +90 −0 src/gtk+-2.x/ctkopengl.c
  76. +1 −0 src/gtk+-2.x/ctkopengl.h
  77. +1 −0 src/gtk+-2.x/ctkpowermizer.c
  78. +1 −0 src/gtk+-2.x/ctkpowersavings.c
  79. +0 −644 src/gtk+-2.x/ctkrandr.c
  80. +0 −92 src/gtk+-2.x/ctkrandr.h
  81. +1 −0 src/gtk+-2.x/ctkscale.c
  82. +11 −79 src/gtk+-2.x/ctkscreen.c
  83. +1 −0 src/gtk+-2.x/ctkserver.c
  84. +2 −2 src/gtk+-2.x/ctkslimm.c
  85. +1 −0 src/gtk+-2.x/ctkthermal.c
  86. +96 −16 src/gtk+-2.x/ctkutils.c
  87. +3 −2 src/gtk+-2.x/ctkutils.h
  88. +2 −1 src/gtk+-2.x/ctkvcs.c
  89. +84 −78 src/gtk+-2.x/ctkwindow.c
  90. +1 −0 src/gtk+-2.x/ctkxvideo.c
  91. +0 −99 src/gtk+-2.x/src.mk
  92. BIN src/image_data/rotate_left_off.png
  93. +0 −138 src/image_data/rotate_left_off_pixdata.h
  94. BIN src/image_data/rotate_left_on.png
  95. +0 −135 src/image_data/rotate_left_on_pixdata.h
  96. BIN src/image_data/rotate_right_off.png
  97. +0 −138 src/image_data/rotate_right_off_pixdata.h
  98. BIN src/image_data/rotate_right_on.png
  99. +0 −135 src/image_data/rotate_right_on_pixdata.h
  100. BIN src/image_data/rotation.png
  101. BIN src/image_data/rotation_orientation_horz.png
  102. +0 −2,304 src/image_data/rotation_orientation_horz_pixdata.h
  103. BIN src/image_data/rotation_orientation_vert.png
  104. +0 −2,425 src/image_data/rotation_orientation_vert_pixdata.h
  105. +0 −1,347 src/image_data/rotation_pixdata.h
  106. +0 −99 src/image_data/src.mk
  107. +1 −0 src/libXNVCtrl/Makefile
  108. +173 −150 src/libXNVCtrl/NVCtrl.h
  109. +4 −1 src/libXNVCtrl/nv_control.h
  110. +3 −32 src/libXNVCtrlAttributes/NvCtrlAttributes.c
  111. +1 −22 src/libXNVCtrlAttributes/NvCtrlAttributes.h
  112. +0 −14 src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
  113. +0 −391 src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c
  114. +0 −14 src/libXNVCtrlAttributes/src.mk
  115. +3 −0 src/lscf.c
  116. +3 −0 src/msg.c
  117. +0 −43 src/msg.h
  118. +39 −35 src/option-table.h
  119. +57 −38 src/parse.c
  120. +7 −3 src/parse.h
  121. +54 −47 src/query-assign.c
  122. +250 −0 src/src.mk
  123. +1 −0 src/version.mk
  124. +0 −24 src/xpm_data/src.mk
  125. +18 −12 utils.mk
  126. +1 −1 version.mk
203 Makefile
@@ -2,7 +2,7 @@
# nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
# and Linux systems.
#
# Copyright (C) 2008 NVIDIA Corporation.
# Copyright (C) 2008-2012 NVIDIA Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
@@ -17,201 +17,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses>.
#

.PHONY: all clean clobber install

##############################################################################
# include common variables and functions
##############################################################################
all clean clobber install:
@$(MAKE) -C src $@
@$(MAKE) -C samples $@
@$(MAKE) -C doc $@

include utils.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 ?=

GL_INCLUDE_PATH ?= /usr/include

PKG_CONFIG ?= pkg-config

ifndef GTK_CFLAGS
GTK_CFLAGS := $(shell $(PKG_CONFIG) --cflags gtk+-2.0)
endif

ifndef GTK_LDFLAGS
GTK_LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-2.0)
endif


##############################################################################
# The XF86Config-parser, libXNVCtrl, and common-utils directories may
# be in one of two places: either elsewhere in the driver source tree
# when building nvidia-settings as part of the NVIDIA driver build (in
# which case, XNVCTRL_DIR, XNVCTRL_ARCHIVE, XCONFIG_PARSER_DIR and
# COMMON_UTILS_DIR should be defined by the calling makefile), or
# directly in the source directory when building from the
# nvidia-settings source tarball (in which case, the below conditional
# assignments should be used)
##############################################################################

XNVCTRL_DIR ?= src/libXNVCtrl
XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a
XCONFIG_PARSER_DIR ?= src/XF86Config-parser
COMMON_UTILS_DIR ?= src/common-utils

##############################################################################
# assign variables
##############################################################################

NVIDIA_SETTINGS = $(OUTPUTDIR)/nvidia-settings

NVIDIA_SETTINGS_PROGRAM_NAME = "nvidia-settings"

NVIDIA_SETTINGS_VERSION := $(NVIDIA_VERSION)

CFLAGS += $(X_CFLAGS)

ifeq ($(TARGET_OS),SunOS)
LDFLAGS += -Wl,-rpath=/usr/X11R6/lib
endif

LDFLAGS += $(X_LDFLAGS)

# Some older Linux distributions do not have the dynamic library
# libXxf86vm.so, though some newer Linux distributions do not have the
# static library libXxf86vm.a. Statically link against libXxf86vm
# when building nvidia-settings within the NVIDIA driver build, but
# dynamically link against libXxf86vm in the public builds.
ifdef NV_LINK_LIBXXF86VM_STATICALLY
LDFLAGS += -Wl,-Bstatic -lXxf86vm -Wl,-Bdynamic
else
LDFLAGS += -lXxf86vm
endif

LDFLAGS += -lX11 -lXext -lm
LDFLAGS += $(GTK_LDFLAGS)
LDFLAGS += $(LIBDL_LDFLAGS)

MANPAGE_GZIP ?= 1

MANPAGE_gzipped = $(OUTPUTDIR)/nvidia-settings.1.gz
MANPAGE_not_gzipped = $(OUTPUTDIR)/nvidia-settings.1
ifeq ($(MANPAGE_GZIP),1)
MANPAGE = $(MANPAGE_gzipped)
else
MANPAGE = $(MANPAGE_not_gzipped)
endif
GEN_MANPAGE_OPTS = $(OUTPUTDIR)/gen-manpage-opts
OPTIONS_1_INC = $(OUTPUTDIR)/options.1.inc

# Include all the source lists; dist-files.mk will define SRC
include dist-files.mk

include $(XCONFIG_PARSER_DIR)/src.mk
SRC += $(addprefix $(XCONFIG_PARSER_DIR)/,$(XCONFIG_PARSER_SRC))

include $(COMMON_UTILS_DIR)/src.mk
SRC += $(addprefix $(COMMON_UTILS_DIR)/,$(COMMON_UTILS_SRC))

SRC += $(STAMP_C)

OBJS = $(call BUILD_OBJECT_LIST,$(SRC))

CFLAGS += -I src
CFLAGS += -I src/image_data
CFLAGS += -I $(XNVCTRL_DIR)
CFLAGS += -I $(XCONFIG_PARSER_DIR)/..
CFLAGS += -I src/libXNVCtrlAttributes
CFLAGS += -I src/xpm_data
CFLAGS += -I src/gtk+-2.x
CFLAGS += -I $(COMMON_UTILS_DIR)
CFLAGS += -I $(OUTPUTDIR)
CFLAGS += -DPROGRAM_NAME=\"nvidia-setttings\"

$(call BUILD_OBJECT_LIST,$(GTK_SRC)): CFLAGS += $(GTK_CFLAGS)


##############################################################################
# build rules
##############################################################################

.PNONY: all install NVIDIA_SETTINGS_install MANPAGE_install clean clobber

all: $(NVIDIA_SETTINGS) $(MANPAGE)

install: NVIDIA_SETTINGS_install MANPAGE_install

NVIDIA_SETTINGS_install: $(NVIDIA_SETTINGS)
$(MKDIR) $(bindir)
$(INSTALL) $(INSTALL_BIN_ARGS) $< $(bindir)/$(notdir $<)

MANPAGE_install: $(MANPAGE)
$(MKDIR) $(mandir)
$(INSTALL) $(INSTALL_BIN_ARGS) $< $(mandir)/$(notdir $<)

$(NVIDIA_SETTINGS): $(OBJS) $(XNVCTRL_ARCHIVE)
$(call quiet_cmd,LINK) -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) \
$(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS)
$(call quiet_cmd,STRIP_CMD) $@

# define the rule to build each object file
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,CC,$(src))))

# define the rule to generate $(STAMP_C)
$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(NVIDIA_SETTINGS_PROGRAM_NAME)))

clean clobber:
rm -rf $(NVIDIA_SETTINGS) $(MANPAGE) *~ $(STAMP_C) \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \
$(GEN_MANPAGE_OPTS) $(OPTIONS_1_INC)


##############################################################################
# Documentation
##############################################################################

AUTO_TEXT = ".\\\" WARNING: THIS FILE IS AUTO-GENERATED! Edit $< instead."

doc: $(MANPAGE)

GEN_MANPAGE_OPTS_SRC = src/gen-manpage-opts.c

BUILD_MANPAGE_OBJECT_LIST = \
$(patsubst %.o,%.manpage.o,$(call BUILD_OBJECT_LIST,$(1)))

GEN_MANPAGE_OPTS_OBJS = \
$(call BUILD_MANPAGE_OBJECT_LIST,$(GEN_MANPAGE_OPTS_SRC))

$(GEN_MANPAGE_OPTS): $(GEN_MANPAGE_OPTS_OBJS)
$(call quiet_cmd,HOST_LINK) $(GEN_MANPAGE_OPTS_OBJS) -o $@ \
$(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_BIN_LDFLAGS)

# define a rule to build each GEN_MANPAGE_OPTS object file
$(foreach src,$(GEN_MANPAGE_OPTS_SRC),\
$(eval $(call DEFINE_OBJECT_RULE_WITH_OBJECT_NAME,HOST_CC,$(src),\
$(call BUILD_MANPAGE_OBJECT_LIST,$(src)))))

$(OPTIONS_1_INC): $(GEN_MANPAGE_OPTS)
@./$< > $@

$(MANPAGE_not_gzipped): doc/nvidia-settings.1.m4 $(OPTIONS_1_INC)
$(call quiet_cmd,M4) \
-D__HEADER__=$(AUTO_TEXT) \
-D__BUILD_OS__=$(TARGET_OS) \
-D__VERSION__=$(NVIDIA_VERSION) \
-D__DATE__="`$(DATE) +%F`" \
-I $(OUTPUTDIR) \
$< > $@

$(MANPAGE_gzipped): $(MANPAGE_not_gzipped)
$(GZIP_CMD) -9f < $< > $@

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,115 @@
#
# nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
# and Linux systems.
#
# Copyright (C) 2008-2012 NVIDIA Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses>.
#


##############################################################################
# include common variables and functions
##############################################################################

UTILS_MK_DIR ?= ..

include $(UTILS_MK_DIR)/utils.mk


##############################################################################
# The common-utils directory may be in one of two places: either
# elsewhere in the driver source tree when building nvidia-settings as
# part of the NVIDIA driver build (in which case, COMMON_UTILS_DIR
# should be defined by the calling makefile), or directly in the
# source directory when building from the nvidia-settings source
# tarball (in which case, the below conditional assignments should be
# used)
##############################################################################

COMMON_UTILS_DIR ?= ../src/common-utils


##############################################################################
# assign variables
##############################################################################

MANPAGE_GZIP ?= 1

MANPAGE_gzipped = $(OUTPUTDIR)/nvidia-settings.1.gz
MANPAGE_not_gzipped = $(OUTPUTDIR)/nvidia-settings.1
ifeq ($(MANPAGE_GZIP),1)
MANPAGE = $(MANPAGE_gzipped)
else
MANPAGE = $(MANPAGE_not_gzipped)
endif
GEN_MANPAGE_OPTS = $(OUTPUTDIR)/gen-manpage-opts
OPTIONS_1_INC = $(OUTPUTDIR)/options.1.inc

CFLAGS += -I $(COMMON_UTILS_DIR)
CFLAGS += -I ../src/libXNVCtrlAttributes


##############################################################################
# build rules
##############################################################################

.PNONY: all install MANPAGE_install clean clobber

all: $(MANPAGE)

install: MANPAGE_install

MANPAGE_install: $(MANPAGE)
$(MKDIR) $(MANDIR)
$(INSTALL) $(INSTALL_BIN_ARGS) $< $(MANDIR)/$(notdir $<)

clean clobber:
rm -rf $(MANPAGE) *~ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \
$(GEN_MANPAGE_OPTS) $(OPTIONS_1_INC)


##############################################################################
# Documentation
##############################################################################

AUTO_TEXT = ".\\\" WARNING: THIS FILE IS AUTO-GENERATED! Edit $< instead."

doc: $(MANPAGE)

GEN_MANPAGE_OPTS_SRC = ../src/gen-manpage-opts.c
GEN_MANPAGE_OPTS_SRC += $(COMMON_UTILS_DIR)/gen-manpage-opts-helper.c

GEN_MANPAGE_OPTS_OBJS = $(call BUILD_OBJECT_LIST,$(GEN_MANPAGE_OPTS_SRC))

$(foreach src, $(GEN_MANPAGE_OPTS_SRC), \
$(eval $(call DEFINE_OBJECT_RULE,HOST_CC,$(src))))

$(GEN_MANPAGE_OPTS): $(GEN_MANPAGE_OPTS_OBJS)
$(call quiet_cmd,HOST_LINK) \
$(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_BIN_LDFLAGS) $^ -o $@

$(OPTIONS_1_INC): $(GEN_MANPAGE_OPTS)
@./$< > $@

$(MANPAGE_not_gzipped): nvidia-settings.1.m4 $(OPTIONS_1_INC) $(VERSION_MK)
$(call quiet_cmd,M4) \
-D__HEADER__=$(AUTO_TEXT) \
-D__BUILD_OS__=$(TARGET_OS) \
-D__VERSION__=$(NVIDIA_VERSION) \
-D__DATE__="`$(DATE) +%F`" \
-I $(OUTPUTDIR) \
$< > $@

$(MANPAGE_gzipped): $(MANPAGE_not_gzipped)
$(GZIP_CMD) -9f < $< > $@
BIN +13.4 KB (500%) doc/nvidia-settings.png
Binary file not shown.
@@ -10,3 +10,5 @@ DOC_EXTRA_DIST += nvidia-settings.1.m4
DOC_EXTRA_DIST += nvidia-settings.desktop
DOC_EXTRA_DIST += nvidia-settings.png
DOC_EXTRA_DIST += src.mk

DOC_DIST_FILES := $(DOC_SRC) $(DOC_EXTRA_DIST)
Oops, something went wrong.

0 comments on commit c3e6380

Please sign in to comment.
You can’t perform that action at this time.