diff options
author | Ben Byer <bbyer@apple.com> | 2007-02-17 03:47:42 -0800 |
---|---|---|
committer | Ben Byer <bbyer@apple.com> | 2007-02-17 03:47:42 -0800 |
commit | d287b76471f66c9aea54f969d050b35643cb2501 (patch) | |
tree | bcfb8700c8f817a0f72dc17e02bd514ecef64ca3 | |
parent | 81444486be4f182dde778bac6f7edcbfc4368482 (diff) |
cleaned up some linking ugliness in hw/darwin/quartz
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | hw/darwin/Makefile.am | 52 | ||||
-rw-r--r-- | hw/darwin/quartz/Makefile.am | 2 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/Makefile.am | 20 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crAppleWM.m | 6 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crFrame.m | 6 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crScreen.m | 14 | ||||
-rw-r--r-- | hw/darwin/quartz/fullscreen/Makefile.am | 9 | ||||
-rw-r--r-- | hw/darwin/quartz/fullscreen/fullscreen.c | 12 | ||||
-rw-r--r-- | hw/darwin/quartz/fullscreen/quartzCursor.c | 4 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/Makefile.am | 29 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprAppleWM.c | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprCursor.c | 2 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprFrame.c | 2 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprScreen.c | 23 | ||||
-rw-r--r-- | mi/miinitext.c | 28 |
16 files changed, 72 insertions, 143 deletions
diff --git a/configure.ac b/configure.ac index 3288c0911..6841ee413 100644 --- a/configure.ac +++ b/configure.ac @@ -2061,9 +2061,6 @@ hw/darwin/bundle/Swedish.lproj/Makefile hw/darwin/bundle/ko.lproj/Makefile hw/darwin/iokit/Makefile hw/darwin/quartz/Makefile -hw/darwin/quartz/cr/Makefile -hw/darwin/quartz/fullscreen/Makefile -hw/darwin/quartz/xpr/Makefile hw/darwin/utils/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 7efd056c5..87076df23 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -3,7 +3,7 @@ libdarwin_XINPUT_SRCS = darwinXinput.c AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -INCLUDES = @XORG_INCS@ +INCLUDES = @XORG_INCS@ -I../../miext/rootless DEFS = @DEFS@ -DUSE_NEW_CLUT @@ -20,7 +20,6 @@ SUBDIRS = \ darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app - libdarwinShared_a_SOURCES = darwin.c \ darwinEvents.c \ darwinKeyboard.c \ @@ -66,6 +65,7 @@ XDarwin_LDFLAGS = \ -Wl,-framework,IOKit XDarwin_CFLAGS = -DINXDARWIN + if XQUARTZ macosdir = $(darwinappdir)/Contents/MacOS @@ -74,8 +74,8 @@ DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server macos_PROGRAMS = XDarwinApp XDarwinApp_SOURCES = \ - $(top_srcdir)/fb/fbcmap.c \ - $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/Xi/stubs.c XDarwinApp_LDADD = \ @@ -118,21 +118,24 @@ XDarwinApp_LDFLAGS = \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit +XDarwinApp_CFLAGS = -DINXDARWINAPP HOOK_TARGETS = xquartz-install-hook crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS crplugin_LTLIBRARIES = cr.la -cr_la_SOURCES = +cr_la_SOURCES = \ + quartz/cr/crAppleWM.m \ + quartz/cr/crFrame.m \ + quartz/cr/crScreen.m \ + quartz/fullscreen/quartzCursor.m \ + quartz/cr/XView.m + cr_la_LIBADD = \ - quartz/cr/crAppleWM.o \ - quartz/cr/crFrame.o \ - quartz/cr/crScreen.o \ - quartz/fullscreen/quartzCursor.o \ - quartz/cr/XView.o \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la + cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ -Wl,-framework,Cocoa \ -Wl,-framework,Carbon \ @@ -143,10 +146,11 @@ cr_la_DEPENDENCIES = XDarwinApp fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS fullscreenplugin_LTLIBRARIES = fullscreen.la -fullscreen_la_SOURCES = +fullscreen_la_SOURCES = \ + quartz/fullscreen/fullscreen.c \ + quartz/fullscreen/quartzCursor.c + fullscreen_la_LIBADD = \ - quartz/fullscreen/fullscreen.o \ - quartz/fullscreen/quartzCursor.o \ $(top_builddir)/miext/shadow/libshadow.la fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ @@ -175,20 +179,22 @@ if HAVE_X_PLUGIN xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS xprplugin_LTLIBRARIES = xpr.la -xpr_la_SOURCES = +xpr_la_SOURCES = \ + quartz/xpr/appledri.c \ + quartz/xpr/dri.c \ + quartz/xpr/xprAppleWM.c \ + quartz/xpr/xprCursor.c \ + quartz/xpr/xprFrame.c \ + quartz/xpr/xprScreen.c \ + quartz/xpr/x-hash.c \ + quartz/xpr/x-hook.c \ + quartz/xpr/x-list.c + xpr_la_LIBADD = \ - quartz/xpr/appledri.o \ - quartz/xpr/dri.o \ - quartz/xpr/xprAppleWM.o \ - quartz/xpr/xprCursor.o \ - quartz/xpr/xprFrame.o \ - quartz/xpr/xprScreen.o \ - quartz/xpr/x-hash.o \ - quartz/xpr/x-hook.o \ - quartz/xpr/x-list.o \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la + xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ -lXplugin \ -XCClinker -bundle_loader -XCClinker XDarwinApp \ diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index 978933013..993cdb0ec 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -7,10 +7,8 @@ INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API if HAVE_X_PLUGIN AM_DEFS += -DBUILD_XPR -XPR = xpr endif DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" -SUBDIRS = cr fullscreen $(XPR) libXQuartz_a_SOURCES = \ Preferences.m \ diff --git a/hw/darwin/quartz/cr/Makefile.am b/hw/darwin/quartz/cr/Makefile.am deleted file mode 100644 index 52a4771df..000000000 --- a/hw/darwin/quartz/cr/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -noinst_LIBRARIES = libcr.a -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -DEFS = @DEFS@ -DDEFER_NSWINDOW -INCLUDES = @XORG_INCS@ \ - -I../fullscreen \ - -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/mi - -libcr_a_SOURCES = crAppleWM.m \ - crFrame.m \ - crScreen.m \ - ../fullscreen/quartzCursor.c \ - XView.m - -EXTRA_DIST = \ - cr.h \ - XView.h diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index 259c2d879..0741d4e58 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -30,8 +30,8 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" -#include "cr.h" +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL @@ -39,7 +39,7 @@ #include "X11/X.h" #define _APPLEWM_SERVER_ #include "X11/extensions/applewm.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #undef BOOL #define StdDocumentStyleMask (NSTitledWindowMask | \ diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index 3c282ea75..2b8e57d0a 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -32,13 +32,13 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" -#include "cr.h" +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL #include "rootless.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #include "windowstr.h" #undef BOOL diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index b78d1ea27..9dd130e01 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -32,18 +32,18 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" -#include "cr.h" +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL #include "darwin.h" -#include "quartz.h" -#include "quartzCursor.h" +#include "quartz/quartz.h" +#include "quartz/quartzCursor.h" #include "rootless.h" -#include "safeAlpha.h" -#include "pseudoramiX.h" -#include "applewmExt.h" +#include "safeAlpha/safeAlpha.h" +#include "quartz/pseudoramiX.h" +#include "quartz/applewmExt.h" #include "regionstr.h" #include "scrnintstr.h" diff --git a/hw/darwin/quartz/fullscreen/Makefile.am b/hw/darwin/quartz/fullscreen/Makefile.am deleted file mode 100644 index f56ad427e..000000000 --- a/hw/darwin/quartz/fullscreen/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -noinst_LIBRARIES = libfullscreen.a -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -INCLUDES = @XORG_INCS@ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. - -libfullscreen_a_SOURCES = fullscreen.c \ - quartzCursor.c - -EXTRA_DIST = \ - quartzCursor.h diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index 456c364d8..02f6e89a8 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -25,13 +25,13 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ - #ifdef HAVE_XORG_CONFIG_H - #include <xorg-config.h> - #endif -#include "quartzCommon.h" +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif +#include "quartz/quartzCommon.h" #include "darwin.h" -#include "quartz.h" -#include "quartzCursor.h" +#include "quartz/quartz.h" +#include "quartz/quartzCursor.h" #include "colormapst.h" #include "scrnintstr.h" #include "micmap.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index f3e753cc0..77fa008f2 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -32,8 +32,8 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" -#include "quartzCursor.h" +#include "quartz/quartzCommon.h" +#include "quartz/quartzCursor.h" #include "darwin.h" #include <pthread.h> diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am deleted file mode 100644 index 7f2b008ec..000000000 --- a/hw/darwin/quartz/xpr/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -noinst_LIBRARIES = libxpr.a -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -INCLUDES = @XORG_INCS@ \ - -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext - -libxpr_a_SOURCES = \ - appledri.c \ - dri.c \ - xprAppleWM.c \ - xprCursor.c \ - xprFrame.c \ - xprScreen.c \ - x-hash.c \ - x-hook.c \ - x-list.c - -xprbundledir = @APPLE_APPLICATIONS_DIR@/Resources/xpr.bundle/Contents/MacOS - -EXTRA_DIST = \ - dri.h \ - dristruct.h \ - x-hash.h \ - x-hook.h \ - x-list.h \ - Xplugin.h \ - xpr.h diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index 0c827e222..fdf404c2d 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -31,12 +31,11 @@ #include <xorg-config.h> #endif #include "xpr.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #include "rootless.h" #include "Xplugin.h" #include <X11/X.h> - static int xprSetWindowLevel( WindowPtr pWin, int level) diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index 71a4277a4..e7f23b78b 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -33,7 +33,7 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" +#include "quartz/quartzCommon.h" #include "xpr.h" #include "darwin.h" #include "Xplugin.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index 49f8714ee..b71b2a606 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -35,7 +35,7 @@ #include "Xplugin.h" #include "x-hash.h" #include "x-list.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #include "propertyst.h" #include "dix.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index a5bccbf0e..67a0737ef 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -30,17 +30,17 @@ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif -#include "quartzCommon.h" -#include "quartz.h" +#include "quartz/quartzCommon.h" +#include "quartz/quartz.h" #include "xpr.h" -#include "pseudoramiX.h" +#include "quartz/pseudoramiX.h" #include "darwin.h" #include "rootless.h" -#include "safeAlpha.h" +#include "safeAlpha/safeAlpha.h" #include "dri.h" #include "globals.h" #include "Xplugin.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #ifdef DAMAGE # include "damage.h" @@ -49,7 +49,6 @@ // Name of GLX bundle for native OpenGL static const char *xprOpenGLBundle = "glxCGL.bundle"; - /* * eventHandler * Callback handler for Xplugin events. @@ -100,7 +99,6 @@ eventHandler(unsigned int type, const void *arg, } } - /* * displayScreenBounds * Return the display ID for a particular display index. @@ -119,7 +117,6 @@ displayAtIndex(int index) return kCGNullDirectDisplay; } - /* * displayScreenBounds * Return the bounds of a particular display. @@ -142,7 +139,6 @@ displayScreenBounds(CGDirectDisplayID id) return frame; } - /* * xprAddPseudoramiXScreens * Add a single virtual screen encompassing all the physical screens @@ -198,7 +194,6 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) xfree(displayList); } - /* * xprDisplayInit * Find number of CoreGraphics displays and initialize Xplugin. @@ -221,9 +216,7 @@ xprDisplayInit(void) darwinScreensFound = 1; if (xp_init(XP_IN_BACKGROUND) != Success) - { FatalError("Could not initialize the Xplugin library."); - } xp_select_events(XP_EVENT_DISPLAY_CHANGED | XP_EVENT_WINDOW_STATE_CHANGED @@ -236,7 +229,6 @@ xprDisplayInit(void) xprAppleWMInit(); } - /* * xprAddScreen * Init the framebuffer and record pixmap parameters for the screen. @@ -306,7 +298,6 @@ xprAddScreen(int index, ScreenPtr pScreen) return TRUE; } - /* * xprSetupScreen * Setup the screen for rootless access. @@ -343,7 +334,6 @@ xprSetupScreen(int index, ScreenPtr pScreen) return DRIFinishScreenInit(pScreen); } - /* * xprUpdateScreen * Update screen after configuation change. @@ -360,7 +350,6 @@ xprUpdateScreen(ScreenPtr pScreen) RootlessUpdateScreenPixmap(pScreen); } - /* * xprInitInput * Finalize xpr specific setup. @@ -377,7 +366,6 @@ xprInitInput(int argc, char **argv) AppleWMSetScreenOrigin(WindowTable[i]); } - /* * Quartz display mode function list. */ @@ -403,7 +391,6 @@ static QuartzModeProcsRec xprModeProcs = { DRIDestroySurface }; - /* * QuartzModeBundleInit * Initialize the display mode bundle after loading. diff --git a/mi/miinitext.c b/mi/miinitext.c index 2c560d548..0fc6d1521 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -338,18 +338,18 @@ extern void XFree86DGAExtensionInit(INITARGS); #endif #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; -#ifndef __DARWIN__ -extern __GLXprovider __glXMesaProvider; -extern void GlxPushProvider(__GLXprovider *impl); -extern void GlxExtensionInit(INITARGS); -extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); -#else +#ifdef INXDARWINAPP extern __GLXprovider* __DarwinglXMesaProvider; extern void DarwinGlxPushProvider(__GLXprovider *impl); extern void DarwinGlxExtensionInit(INITARGS); extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *); -#endif -#endif +#else +extern __GLXprovider __glXMesaProvider; +extern void GlxPushProvider(__GLXprovider *impl); +extern void GlxExtensionInit(INITARGS); +extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); +#endif // INXDARWINAPP +#endif // GLXEXT #ifdef XF86DRI extern void XFree86DRIExtensionInit(INITARGS); #endif @@ -633,14 +633,14 @@ InitExtensions(argc, argv) #endif #ifdef GLXEXT -#ifndef __DARWIN__ - GlxPushProvider(&__glXMesaProvider); - if (!noGlxExtension) GlxExtensionInit(); -#else +#ifdef INXDARWINAPP + DarwinGlxPushProvider(__DarwinglXMesaProvider); if (!noGlxExtension) DarwinGlxExtensionInit(); +#else GlxPushProvider(&__glXMesaProvider); -#endif -#endif + if (!noGlxExtension) GlxExtensionInit(); +#endif // INXDARWINAPP +#endif // GLXEXT #ifdef XFIXES /* must be before Render to layer DisplayCursor correctly */ if (!noXFixesExtension) XFixesExtensionInit(); |