XCOMM $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/Imakefile,v 1.1 2002/03/28 02:21:20 torrey Exp $

#include <Server.tmpl>

LinkSourceFile(Preferences.m,../quartz)
LinkSourceFile(Preferences.h,../quartz)
LinkSourceFile(XApplication.m,../quartz)
LinkSourceFile(XApplication.h,../quartz)
LinkSourceFile(fakeBoxRec.h,../quartz)
LinkSourceFile(fullscreen.c,../quartz)
LinkSourceFile(fullscreen.h,../quartz)
LinkSourceFile(quartz.c,../quartz)
LinkSourceFile(quartz.h,../quartz)
LinkSourceFile(quartzAudio.c,../quartz)
LinkSourceFile(quartzAudio.h,../quartz)
LinkSourceFile(quartzCocoa.m,../quartz)
LinkSourceFile(quartzCommon.h,../quartz)
LinkSourceFile(quartzCursor.c,../quartz)
LinkSourceFile(quartzCursor.h,../quartz)
LinkSourceFile(quartzPasteboard.c,../quartz)
LinkSourceFile(quartzPasteboard.h,../quartz)
LinkSourceFile(quartzShared.h,../quartz)
LinkSourceFile(pseudoramiX.c,../quartz)
LinkSourceFile(pseudoramiX.h,../quartz)
LinkSourceFile(quartzStartup.c,../quartz)
LinkSourceFile(XDarwinStartup.c,../quartz)
LinkSourceFile(XDarwinStartup.man,../quartz)

SRCS =  Preferences.m \
        XApplication.m \
        XServer.m \
        XView.m \
        XWindow.m \
        fullscreen.c \
        quartz.c \
        quartzAudio.c \
        quartzCocoa.m \
        quartzCursor.c \
        quartzPasteboard.c \
        rootlessAquaGlue.c \
        rootlessAquaImp.m \
        rootlessCommon.c \
        rootlessGC.c \
        rootlessScreen.c \
        rootlessValTree.c \
        rootlessWindow.c \
        pseudoramiX.c

OBJS =  Preferences.o \
        XApplication.o \
        XServer.o \
        XView.o \
        XWindow.o \
        fullscreen.o \
        quartz.o \
        quartzAudio.o \
        quartzCocoa.o \
        quartzCursor.o \
        quartzPasteboard.o \
        rootlessAquaGlue.o \
        rootlessAquaImp.o \
        rootlessCommon.o \
        rootlessGC.o \
        rootlessScreen.o \
        rootlessValTree.o \
        rootlessWindow.o \
        pseudoramiX.o

INCLUDES = -I. -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \
           -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(SERVERSRC)/render \
           -I$(EXTINCSRC) -I.. -I$(SERVERSRC)/Xext

#if defined(XFree86CustomVersion)
CUSTOMVERSION = XFree86CustomVersion
CUSTOMVERDEF =  -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)'
#endif
#if HasCGMachPort
QUARTZDEFINES = -DHAS_CG_MACH_PORT
#endif

#if XFree86Devel
PBXBUILDSTYLE = -buildstyle Development
DEBUGDEFINES = -DROOTLESSDEBUG
#else
PBXBUILDSTYLE = -buildstyle Deployment
#endif

DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) \
          $(QUARTZDEFINES) $(DEBUGDEFINES)
EXTRAMANDEFS = -D__XBinDir__=$(BINDIR)
#if NothingOutsideProjectRoot
XDARWINROOT = $(BINDIR)
#else
XDARWINROOT = /Applications
#endif

MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

NormalLibraryObjectRule()
NormalLibraryTarget(XQuartz,$(OBJS))

AllTarget(quartzStartup.o)

AllTarget(XDarwinStartup)
NormalProgramTarget(XDarwinStartup,XDarwinStartup.o, \
	NullParameter,NullParameter, \
	-framework CoreFoundation -framework ApplicationServices)
InstallProgram(XDarwinStartup,$(BINDIR))
install::
	-(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) XDarwinStartup X)

AllTarget(XDarwin)
XDarwin:
	pbxbuild -target XDarwin $(PBXBUILDSTYLE)

install::
	pbxbuild install -target XDarwin $(PBXBUILDSTYLE) \
		DSTROOT=$(DESTDIR)$(XDARWINROOT)

InstallManPage(XDarwinStartup,$(MANDIR))

clean::
	pbxbuild "clean" -target XDarwin $(PBXBUILDSTYLE)

DependTarget()

