[PATCH 1/2] Build dpmsstubs.c once as a convenience library, rather than once for each DDX which wants to use it

Jon TURNEY jon.turney at dronecode.org.uk
Thu Nov 3 07:27:18 PDT 2011


Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 Xext/Makefile.am     |    9 +++++++--
 hw/vfb/Makefile.am   |    4 ++--
 hw/xnest/Makefile.am |    4 ++--
 hw/xwin/Makefile.am  |    7 ++++---
 4 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index cb432e0..8d55631 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -4,10 +4,13 @@
 #                    Xorg by default
 # libXextmodule.la:  includes those extensions that are built into a module
 #                    that Xorg loads
+# libXextdpmsstubs.la: dpms stubs convenience library, linked into xvfb, xnest
+#                    and xwin
+
 if XORG
-noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la
+noinst_LTLIBRARIES = libXext.la libXextdpmsstubs.la libXextbuiltin.la libXextmodule.la
 else
-noinst_LTLIBRARIES = libXext.la
+noinst_LTLIBRARIES = libXext.la libXextdpmsstubs.la
 endif
 
 INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
@@ -118,6 +121,8 @@ libXextmodule_la_SOURCES =	$(MODULE_SRCS)
 libXextmodule_la_LIBADD =	$(MODULE_LIBS)
 endif
 
+libXextdpmsstubs_la_SOURCES = dpmsstubs.c
+
 EXTRA_DIST = \
 	$(MITSHM_SRCS) \
 	$(XV_SRCS) \
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index ed46dbb..535c264 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -11,7 +11,6 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/Xext/dpmsstubs.c \
 	$(top_srcdir)/Xi/stubs.c \
 	$(top_srcdir)/mi/miinitext.c
 
@@ -24,7 +23,8 @@ XVFB_LIBS = \
         @XVFB_LIBS@ \
 	libfbcmap.a \
 	$(MAIN_LIB) \
-	$(XSERVER_LIBS)
+	$(XSERVER_LIBS) \
+	$(top_builddir)/Xext/libXextdpmsstubs.la
 
 Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
 Xvfb_DEPENDENCIES = $(XVFB_LIBS)
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index c395b4d..3997090 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -43,7 +43,6 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/Xext/dpmsstubs.c \
 	$(top_srcdir)/Xi/stubs.c \
 	$(top_srcdir)/mi/miinitext.c
 
@@ -52,7 +51,8 @@ libfbcmap_a_CFLAGS = $(AM_CFLAGS)
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
-	libfbcmap.a
+	libfbcmap.a \
+	$(top_builddir)/Xext/libXextdpmsstubs.la
 
 Xnest_SOURCES = $(SRCS)
 
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 256af0b..3706680 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -121,7 +121,6 @@ SRCS =	InitInput.c \
 	winresource.h \
 	winwindow.h \
 	XWin.rc \
-	$(top_srcdir)/Xext/dpmsstubs.c \
 	$(top_srcdir)/Xi/stubs.c \
 	$(top_srcdir)/mi/miinitext.c \
 	$(top_srcdir)/fb/fbcmap_mi.c \
@@ -146,8 +145,10 @@ XWin_SOURCES = $(SRCS)
 
 INCLUDES = -I$(top_srcdir)/miext/rootless
 
-XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS)
-XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
+XWIN_DPMSSTUBS_LIBS = $(top_builddir)/Xext/libXextdpmsstubs.la
+
+XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XWIN_DPMSSTUBS_LIBS)
+XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) $(XWIN_DPMSSTUBS_LIBS)
 XWin_LDFLAGS = -mwindows -static
 
 .rc.o:
-- 
1.7.5.1



More information about the xorg-devel mailing list