1AM_CPPFLAGS = \
2	-DBUILD_DATE=\"$(BUILD_DATE)\" \
3	-DXSERVER_VERSION=\"$(VERSION)\" \
4	-DX11BINDIR=\"$(bindir)\"
5
6AM_CFLAGS = $(DIX_CFLAGS)
7
8x11appdir = $(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/MacOS
9x11app_PROGRAMS = X11.bin
10
11dist_X11_bin_SOURCES = \
12	bundle-main.c 
13
14nodist_X11_bin_SOURCES = \
15	mach_startupServer.c \
16	mach_startupUser.c
17
18X11_bin_LDADD = \
19	$(top_builddir)/hw/xquartz/libXquartz.la \
20	$(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \
21	$(top_builddir)/dix/dixfonts.lo \
22	$(top_builddir)/miext/rootless/librootless.la \
23	$(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \
24	$(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
25
26X11_bin_LDFLAGS =  \
27	-XCClinker -Objc \
28	-Wl,-u,_miDCInitialize \
29	-Wl,-framework,Carbon \
30	-Wl,-framework,Cocoa \
31	-Wl,-framework,CoreAudio \
32	-Wl,-framework,IOKit
33
34if GLX
35X11_bin_LDADD += \
36	$(top_builddir)/hw/xquartz/GL/libCGLCore.la \
37	$(top_builddir)/glx/libglx.la
38
39X11_bin_LDFLAGS += \
40	-L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
41	-Wl,-framework,OpenGL
42endif
43
44if XQUARTZ_SPARKLE
45X11_bin_LDFLAGS += \
46	-Wl,-framework,Sparkle
47endif
48
49if RECORD
50X11_bin_LDADD += \
51	$(top_builddir)/record/librecord.la
52endif
53
54bin_PROGRAMS = Xquartz
55
56dist_Xquartz_SOURCES = \
57	stub.c \
58	launchd_fd.c
59
60nodist_Xquartz_SOURCES = \
61	mach_startupUser.c
62
63Xquartz_LDFLAGS =  \
64	-Wl,-framework,CoreServices
65
66BUILT_SOURCES = \
67	mach_startupServer.c \
68	mach_startupUser.c \
69	mach_startupServer.h \
70	mach_startup.h
71
72CLEANFILES = \
73	$(BUILT_SOURCES)
74
75$(BUILT_SOURCES): $(srcdir)/mach_startup.defs
76	mig -sheader mach_startupServer.h $(srcdir)/mach_startup.defs
77
78EXTRA_DIST = \
79	launchd_fd.h \
80	mach_startup.defs \
81	mach_startup_types.h
82