cleaned up some linking ugliness in hw/darwin/quartz

This commit is contained in:
Ben Byer 2007-02-17 03:47:42 -08:00
parent 81444486be
commit d287b76471
16 changed files with 72 additions and 143 deletions

View File

@ -2061,9 +2061,6 @@ hw/darwin/bundle/Swedish.lproj/Makefile
hw/darwin/bundle/ko.lproj/Makefile hw/darwin/bundle/ko.lproj/Makefile
hw/darwin/iokit/Makefile hw/darwin/iokit/Makefile
hw/darwin/quartz/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/darwin/utils/Makefile
hw/kdrive/Makefile hw/kdrive/Makefile
hw/kdrive/ati/Makefile hw/kdrive/ati/Makefile

View File

@ -3,7 +3,7 @@ libdarwin_XINPUT_SRCS = darwinXinput.c
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = @XORG_INCS@ INCLUDES = @XORG_INCS@ -I../../miext/rootless
DEFS = @DEFS@ -DUSE_NEW_CLUT DEFS = @DEFS@ -DUSE_NEW_CLUT
@ -20,7 +20,6 @@ SUBDIRS = \
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
libdarwinShared_a_SOURCES = darwin.c \ libdarwinShared_a_SOURCES = darwin.c \
darwinEvents.c \ darwinEvents.c \
darwinKeyboard.c \ darwinKeyboard.c \
@ -66,6 +65,7 @@ XDarwin_LDFLAGS = \
-Wl,-framework,IOKit -Wl,-framework,IOKit
XDarwin_CFLAGS = -DINXDARWIN XDarwin_CFLAGS = -DINXDARWIN
if XQUARTZ if XQUARTZ
macosdir = $(darwinappdir)/Contents/MacOS macosdir = $(darwinappdir)/Contents/MacOS
@ -74,8 +74,8 @@ DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
macos_PROGRAMS = XDarwinApp macos_PROGRAMS = XDarwinApp
XDarwinApp_SOURCES = \ XDarwinApp_SOURCES = \
$(top_srcdir)/fb/fbcmap.c \ $(top_srcdir)/fb/fbcmap.c \
$(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xi/stubs.c $(top_srcdir)/Xi/stubs.c
XDarwinApp_LDADD = \ XDarwinApp_LDADD = \
@ -118,21 +118,24 @@ XDarwinApp_LDFLAGS = \
-Wl,-framework,CoreAudio \ -Wl,-framework,CoreAudio \
-Wl,-framework,IOKit -Wl,-framework,IOKit
XDarwinApp_CFLAGS = -DINXDARWINAPP
HOOK_TARGETS = xquartz-install-hook HOOK_TARGETS = xquartz-install-hook
crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
crplugin_LTLIBRARIES = cr.la 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 = \ 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/librootless.la \
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
$(top_builddir)/miext/rootless/accel/librlAccel.la $(top_builddir)/miext/rootless/accel/librlAccel.la
cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
-Wl,-framework,Cocoa \ -Wl,-framework,Cocoa \
-Wl,-framework,Carbon \ -Wl,-framework,Carbon \
@ -143,10 +146,11 @@ cr_la_DEPENDENCIES = XDarwinApp
fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS
fullscreenplugin_LTLIBRARIES = fullscreen.la fullscreenplugin_LTLIBRARIES = fullscreen.la
fullscreen_la_SOURCES = fullscreen_la_SOURCES = \
quartz/fullscreen/fullscreen.c \
quartz/fullscreen/quartzCursor.c
fullscreen_la_LIBADD = \ fullscreen_la_LIBADD = \
quartz/fullscreen/fullscreen.o \
quartz/fullscreen/quartzCursor.o \
$(top_builddir)/miext/shadow/libshadow.la $(top_builddir)/miext/shadow/libshadow.la
fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
@ -175,20 +179,22 @@ if HAVE_X_PLUGIN
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
xprplugin_LTLIBRARIES = xpr.la 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 = \ 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/librootless.la \
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
$(top_builddir)/miext/rootless/accel/librlAccel.la $(top_builddir)/miext/rootless/accel/librlAccel.la
xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
-lXplugin \ -lXplugin \
-XCClinker -bundle_loader -XCClinker XDarwinApp \ -XCClinker -bundle_loader -XCClinker XDarwinApp \

View File

@ -7,10 +7,8 @@ INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
if HAVE_X_PLUGIN if HAVE_X_PLUGIN
AM_DEFS += -DBUILD_XPR AM_DEFS += -DBUILD_XPR
XPR = xpr
endif endif
DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
SUBDIRS = cr fullscreen $(XPR)
libXQuartz_a_SOURCES = \ libXQuartz_a_SOURCES = \
Preferences.m \ Preferences.m \

View File

@ -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

View File

@ -30,8 +30,8 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "cr.h" #include "quartz/cr/cr.h"
#undef BOOL #undef BOOL
#define BOOL xBOOL #define BOOL xBOOL
@ -39,7 +39,7 @@
#include "X11/X.h" #include "X11/X.h"
#define _APPLEWM_SERVER_ #define _APPLEWM_SERVER_
#include "X11/extensions/applewm.h" #include "X11/extensions/applewm.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#undef BOOL #undef BOOL
#define StdDocumentStyleMask (NSTitledWindowMask | \ #define StdDocumentStyleMask (NSTitledWindowMask | \

View File

@ -32,13 +32,13 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "cr.h" #include "quartz/cr/cr.h"
#undef BOOL #undef BOOL
#define BOOL xBOOL #define BOOL xBOOL
#include "rootless.h" #include "rootless.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#include "windowstr.h" #include "windowstr.h"
#undef BOOL #undef BOOL

View File

@ -32,18 +32,18 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "cr.h" #include "quartz/cr/cr.h"
#undef BOOL #undef BOOL
#define BOOL xBOOL #define BOOL xBOOL
#include "darwin.h" #include "darwin.h"
#include "quartz.h" #include "quartz/quartz.h"
#include "quartzCursor.h" #include "quartz/quartzCursor.h"
#include "rootless.h" #include "rootless.h"
#include "safeAlpha.h" #include "safeAlpha/safeAlpha.h"
#include "pseudoramiX.h" #include "quartz/pseudoramiX.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#include "regionstr.h" #include "regionstr.h"
#include "scrnintstr.h" #include "scrnintstr.h"

View File

@ -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

View File

@ -25,13 +25,13 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "darwin.h" #include "darwin.h"
#include "quartz.h" #include "quartz/quartz.h"
#include "quartzCursor.h" #include "quartz/quartzCursor.h"
#include "colormapst.h" #include "colormapst.h"
#include "scrnintstr.h" #include "scrnintstr.h"
#include "micmap.h" #include "micmap.h"

View File

@ -32,8 +32,8 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "quartzCursor.h" #include "quartz/quartzCursor.h"
#include "darwin.h" #include "darwin.h"
#include <pthread.h> #include <pthread.h>

View File

@ -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

View File

@ -31,12 +31,11 @@
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "xpr.h" #include "xpr.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#include "rootless.h" #include "rootless.h"
#include "Xplugin.h" #include "Xplugin.h"
#include <X11/X.h> #include <X11/X.h>
static int xprSetWindowLevel( static int xprSetWindowLevel(
WindowPtr pWin, WindowPtr pWin,
int level) int level)

View File

@ -33,7 +33,7 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "xpr.h" #include "xpr.h"
#include "darwin.h" #include "darwin.h"
#include "Xplugin.h" #include "Xplugin.h"

View File

@ -35,7 +35,7 @@
#include "Xplugin.h" #include "Xplugin.h"
#include "x-hash.h" #include "x-hash.h"
#include "x-list.h" #include "x-list.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#include "propertyst.h" #include "propertyst.h"
#include "dix.h" #include "dix.h"

View File

@ -30,17 +30,17 @@
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include "quartzCommon.h" #include "quartz/quartzCommon.h"
#include "quartz.h" #include "quartz/quartz.h"
#include "xpr.h" #include "xpr.h"
#include "pseudoramiX.h" #include "quartz/pseudoramiX.h"
#include "darwin.h" #include "darwin.h"
#include "rootless.h" #include "rootless.h"
#include "safeAlpha.h" #include "safeAlpha/safeAlpha.h"
#include "dri.h" #include "dri.h"
#include "globals.h" #include "globals.h"
#include "Xplugin.h" #include "Xplugin.h"
#include "applewmExt.h" #include "quartz/applewmExt.h"
#ifdef DAMAGE #ifdef DAMAGE
# include "damage.h" # include "damage.h"
@ -49,7 +49,6 @@
// Name of GLX bundle for native OpenGL // Name of GLX bundle for native OpenGL
static const char *xprOpenGLBundle = "glxCGL.bundle"; static const char *xprOpenGLBundle = "glxCGL.bundle";
/* /*
* eventHandler * eventHandler
* Callback handler for Xplugin events. * Callback handler for Xplugin events.
@ -100,7 +99,6 @@ eventHandler(unsigned int type, const void *arg,
} }
} }
/* /*
* displayScreenBounds * displayScreenBounds
* Return the display ID for a particular display index. * Return the display ID for a particular display index.
@ -119,7 +117,6 @@ displayAtIndex(int index)
return kCGNullDirectDisplay; return kCGNullDirectDisplay;
} }
/* /*
* displayScreenBounds * displayScreenBounds
* Return the bounds of a particular display. * Return the bounds of a particular display.
@ -142,7 +139,6 @@ displayScreenBounds(CGDirectDisplayID id)
return frame; return frame;
} }
/* /*
* xprAddPseudoramiXScreens * xprAddPseudoramiXScreens
* Add a single virtual screen encompassing all the physical screens * 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); xfree(displayList);
} }
/* /*
* xprDisplayInit * xprDisplayInit
* Find number of CoreGraphics displays and initialize Xplugin. * Find number of CoreGraphics displays and initialize Xplugin.
@ -221,9 +216,7 @@ xprDisplayInit(void)
darwinScreensFound = 1; darwinScreensFound = 1;
if (xp_init(XP_IN_BACKGROUND) != Success) if (xp_init(XP_IN_BACKGROUND) != Success)
{
FatalError("Could not initialize the Xplugin library."); FatalError("Could not initialize the Xplugin library.");
}
xp_select_events(XP_EVENT_DISPLAY_CHANGED xp_select_events(XP_EVENT_DISPLAY_CHANGED
| XP_EVENT_WINDOW_STATE_CHANGED | XP_EVENT_WINDOW_STATE_CHANGED
@ -236,7 +229,6 @@ xprDisplayInit(void)
xprAppleWMInit(); xprAppleWMInit();
} }
/* /*
* xprAddScreen * xprAddScreen
* Init the framebuffer and record pixmap parameters for the screen. * Init the framebuffer and record pixmap parameters for the screen.
@ -306,7 +298,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
return TRUE; return TRUE;
} }
/* /*
* xprSetupScreen * xprSetupScreen
* Setup the screen for rootless access. * Setup the screen for rootless access.
@ -343,7 +334,6 @@ xprSetupScreen(int index, ScreenPtr pScreen)
return DRIFinishScreenInit(pScreen); return DRIFinishScreenInit(pScreen);
} }
/* /*
* xprUpdateScreen * xprUpdateScreen
* Update screen after configuation change. * Update screen after configuation change.
@ -360,7 +350,6 @@ xprUpdateScreen(ScreenPtr pScreen)
RootlessUpdateScreenPixmap(pScreen); RootlessUpdateScreenPixmap(pScreen);
} }
/* /*
* xprInitInput * xprInitInput
* Finalize xpr specific setup. * Finalize xpr specific setup.
@ -377,7 +366,6 @@ xprInitInput(int argc, char **argv)
AppleWMSetScreenOrigin(WindowTable[i]); AppleWMSetScreenOrigin(WindowTable[i]);
} }
/* /*
* Quartz display mode function list. * Quartz display mode function list.
*/ */
@ -403,7 +391,6 @@ static QuartzModeProcsRec xprModeProcs = {
DRIDestroySurface DRIDestroySurface
}; };
/* /*
* QuartzModeBundleInit * QuartzModeBundleInit
* Initialize the display mode bundle after loading. * Initialize the display mode bundle after loading.

View File

@ -338,18 +338,18 @@ extern void XFree86DGAExtensionInit(INITARGS);
#endif #endif
#ifdef GLXEXT #ifdef GLXEXT
typedef struct __GLXprovider __GLXprovider; typedef struct __GLXprovider __GLXprovider;
#ifndef __DARWIN__ #ifdef INXDARWINAPP
extern __GLXprovider __glXMesaProvider;
extern void GlxPushProvider(__GLXprovider *impl);
extern void GlxExtensionInit(INITARGS);
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
#else
extern __GLXprovider* __DarwinglXMesaProvider; extern __GLXprovider* __DarwinglXMesaProvider;
extern void DarwinGlxPushProvider(__GLXprovider *impl); extern void DarwinGlxPushProvider(__GLXprovider *impl);
extern void DarwinGlxExtensionInit(INITARGS); extern void DarwinGlxExtensionInit(INITARGS);
extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *); extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *);
#endif #else
#endif extern __GLXprovider __glXMesaProvider;
extern void GlxPushProvider(__GLXprovider *impl);
extern void GlxExtensionInit(INITARGS);
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
#endif // INXDARWINAPP
#endif // GLXEXT
#ifdef XF86DRI #ifdef XF86DRI
extern void XFree86DRIExtensionInit(INITARGS); extern void XFree86DRIExtensionInit(INITARGS);
#endif #endif
@ -633,14 +633,14 @@ InitExtensions(argc, argv)
#endif #endif
#ifdef GLXEXT #ifdef GLXEXT
#ifndef __DARWIN__ #ifdef INXDARWINAPP
DarwinGlxPushProvider(__DarwinglXMesaProvider);
if (!noGlxExtension) DarwinGlxExtensionInit();
#else
GlxPushProvider(&__glXMesaProvider); GlxPushProvider(&__glXMesaProvider);
if (!noGlxExtension) GlxExtensionInit(); if (!noGlxExtension) GlxExtensionInit();
#else #endif // INXDARWINAPP
if (!noGlxExtension) DarwinGlxExtensionInit(); #endif // GLXEXT
GlxPushProvider(&__glXMesaProvider);
#endif
#endif
#ifdef XFIXES #ifdef XFIXES
/* must be before Render to layer DisplayCursor correctly */ /* must be before Render to layer DisplayCursor correctly */
if (!noXFixesExtension) XFixesExtensionInit(); if (!noXFixesExtension) XFixesExtensionInit();