From 315f089056da67d4c463ed002eb2b74e38493b49 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 8 May 2008 19:46:03 -0700 Subject: [PATCH] XQuartz: Reorganized some of the build system in prep for the Mach IPC startup work. (cherry picked from commit 2232c91d5c277673929eab2abb5e0495c00877cb) --- configure.ac | 3 +- hw/xquartz/Makefile.am | 3 +- hw/xquartz/bundle/Makefile.am | 1 - hw/xquartz/doc/Makefile.am | 14 ++++++++ hw/xquartz/{xpr => doc}/Xquartz.man.pre | 0 hw/xquartz/mach-startup/Makefile.am | 34 +++++++++++++++++++ .../{bundle => mach-startup}/bundle-main.c | 0 hw/xquartz/{stub => mach-startup}/stub.c | 0 hw/xquartz/stub/Makefile.am | 11 ------ hw/xquartz/xpr/Makefile.am | 34 ++----------------- 10 files changed, 53 insertions(+), 47 deletions(-) create mode 100644 hw/xquartz/doc/Makefile.am rename hw/xquartz/{xpr => doc}/Xquartz.man.pre (100%) create mode 100644 hw/xquartz/mach-startup/Makefile.am rename hw/xquartz/{bundle => mach-startup}/bundle-main.c (100%) rename hw/xquartz/{stub => mach-startup}/stub.c (100%) delete mode 100644 hw/xquartz/stub/Makefile.am diff --git a/configure.ac b/configure.ac index 9671adaa9..99b10e36d 100644 --- a/configure.ac +++ b/configure.ac @@ -2164,7 +2164,8 @@ hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile -hw/xquartz/stub/Makefile +hw/xquartz/doc/Makefile +hw/xquartz/mach-startup/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index bbd21f816..77d662f97 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -9,12 +9,11 @@ AM_CPPFLAGS = \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless -SUBDIRS = bundle . GL xpr stub +SUBDIRS = bundle . GL xpr mach-startup doc libXquartz_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ - bundle/bundle-main.c \ X11Application.m \ X11Controller.m \ applewm.c \ diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index c61b0490c..a8f45f8d5 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -7,7 +7,6 @@ resource_DATA = Xquartz.plist EXTRA_DIST = \ mk_bundke.sh \ $(resource_DATA) \ - bundle-main.c \ Resources/da.lproj/InfoPlist.strings \ Resources/da.lproj/Localizable.strings \ Resources/da.lproj/main.nib/keyedobjects.nib \ diff --git a/hw/xquartz/doc/Makefile.am b/hw/xquartz/doc/Makefile.am new file mode 100644 index 000000000..b812af1cb --- /dev/null +++ b/hw/xquartz/doc/Makefile.am @@ -0,0 +1,14 @@ +appmandir = $(APP_MAN_DIR) +appman_PRE = Xquartz.man.pre +appman_PROCESSED = $(appman_PRE:man.pre=man) +appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) + +CLEANFILES = $(appman_PROCESSED) $(appman_DATA) + +include $(top_srcdir)/cpprules.in + +.man.$(APP_MAN_SUFFIX): + cp $< $@ + +EXTRA_DIST = \ + Xquartz.man.pre diff --git a/hw/xquartz/xpr/Xquartz.man.pre b/hw/xquartz/doc/Xquartz.man.pre similarity index 100% rename from hw/xquartz/xpr/Xquartz.man.pre rename to hw/xquartz/doc/Xquartz.man.pre diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am new file mode 100644 index 000000000..966871126 --- /dev/null +++ b/hw/xquartz/mach-startup/Makefile.am @@ -0,0 +1,34 @@ +AM_CPPFLAGS = \ + -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -DXSERVER_VERSION=\"$(VERSION)\" + +x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS +x11app_PROGRAMS = X11 + +X11_SOURCES = \ + bundle-main.c + +X11_LDADD = \ + $(top_builddir)/hw/xquartz/libXquartz.la \ + $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/miext/rootless/librootless.la \ + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11 + +X11_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ + -Wl,-framework,OpenGL \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +bin_PROGRAMS = Xquartz + +Xquartz_SOURCES = \ + stub.c + +Xquartz_LDFLAGS = \ + -Wl,-framework,CoreServices diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c similarity index 100% rename from hw/xquartz/bundle/bundle-main.c rename to hw/xquartz/mach-startup/bundle-main.c diff --git a/hw/xquartz/stub/stub.c b/hw/xquartz/mach-startup/stub.c similarity index 100% rename from hw/xquartz/stub/stub.c rename to hw/xquartz/mach-startup/stub.c diff --git a/hw/xquartz/stub/Makefile.am b/hw/xquartz/stub/Makefile.am deleted file mode 100644 index 3752dc111..000000000 --- a/hw/xquartz/stub/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AM_CPPFLAGS = \ - -DBUILD_DATE=\"$(BUILD_DATE)\" \ - -DXSERVER_VERSION=\"$(VERSION)\" - -bin_PROGRAMS = Xquartz - -Xquartz_SOURCES = \ - stub.c - -Xquartz_LDFLAGS = \ - -framework CoreServices diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index 6bf99a402..e74580f73 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -1,5 +1,4 @@ -x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS -x11app_PROGRAMS = X11 +noinst_LTLIBRARIES = libXquartzXpr.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ @@ -7,7 +6,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless -X11_SOURCES = \ +libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ xprAppleWM.c \ @@ -19,36 +18,7 @@ X11_SOURCES = \ x-hook.c \ x-list.c -X11_LDADD = \ - $(top_builddir)/hw/xquartz/libXquartz.la \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/miext/rootless/librootless.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11 - -X11_LDFLAGS = \ - -XCClinker -Objc \ - -Wl,-u,_miDCInitialize \ - -Wl,-framework,Carbon \ - -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ - -Wl,-framework,OpenGL \ - -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio \ - -Wl,-framework,IOKit - -appmandir = $(APP_MAN_DIR) -appman_PRE = Xquartz.man.pre -appman_PROCESSED = $(appman_PRE:man.pre=man) -appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) - -CLEANFILES = $(appman_PROCESSED) $(appman_DATA) - -include $(top_srcdir)/cpprules.in - -.man.$(APP_MAN_SUFFIX): - cp $< $@ - EXTRA_DIST = \ - Xquartz.man.pre \ dri.h \ dristruct.h \ appledri.h \