summaryrefslogtreecommitdiff
path: root/hw/darwin/Makefile.am
blob: b773910fc729c5f9e368eeb2e719828c1b816963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
noinst_LIBRARIES = libdarwinShared.a
libdarwin_XINPUT_SRCS = darwinXinput.c

AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = @XORG_INCS@ -I../../miext/rootless

DEFS = @DEFS@ -DUSE_NEW_CLUT

if XQUARTZ
XQUARTZ_SUBDIRS = bundle quartz
endif

SUBDIRS = \
	  iokit \
	  $(XQUARTZ_SUBDIRS) \
	  utils \
	  .

darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app

libdarwinShared_a_SOURCES = darwin.c \
			  darwinEvents.c \
			  darwinKeyboard.c \
			  $(darwin_XINPUT_SRCS) 

bin_PROGRAMS = XDarwin Xquartz
XDarwin_SOURCES = \
                  $(top_srcdir)/fb/fbcmap_mi.c \
                  $(top_srcdir)/mi/miinitext.c \
                  $(top_srcdir)/Xi/stubs.c

Xquartz_SOURCES = \
                  $(top_srcdir)/fb/fbcmap_mi.c \
                  $(top_srcdir)/mi/miinitext.c \
                  $(top_srcdir)/Xi/stubs.c \
                  apple/X11Application.m \
                  apple/X11Controller.m \
                  quartz/Preferences.m \
                  quartz/applewm.c \
                  quartz/keysym2ucs.c \
                  quartz/pseudoramiX.c \
                  quartz/quartz.c \
                  quartz/quartzAudio.c \
                  quartz/quartzCocoa.m \
                  quartz/quartzKeyboard.c \
                  quartz/quartzPasteboard.c \
                  quartz/quartzStartup.c \
                  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

XDarwin_LDADD = \
		$(top_builddir)/dix/dixfonts.lo \
		$(top_builddir)/dix/libdix.la \
		$(top_builddir)/config/libconfig.a \
		./libdarwinShared.a \
		./iokit/libiokit.a \
		$(top_builddir)/miext/shadow/libshadow.la \
		$(top_builddir)/miext/cw/libcw.la \
		$(DARWIN_LIBS) \
		$(top_builddir)/miext/rootless/librootless.la \
		$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
		$(top_builddir)/miext/rootless/accel/librlAccel.la \
		@XORG_LIBS@ \
		$(XSERVER_LIBS)

Xquartz_LDADD = \
		$(top_builddir)/dix/dixfonts.lo \
		$(top_builddir)/dix/libdix.la \
		$(top_builddir)/config/libconfig.a \
		./libdarwinShared.a \
		$(top_builddir)/miext/shadow/libshadow.la \
		$(top_builddir)/miext/cw/libcw.la \
		$(DARWIN_LIBS) \
		$(top_builddir)/miext/rootless/librootless.la \
		$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
		$(top_builddir)/miext/rootless/accel/librlAccel.la \
		@XORG_LIBS@ \
		$(XSERVER_LIBS) -lXplugin

XDarwin_LDFLAGS =  \
                 -XCClinker -Objc \
                 -Wl,-u,_miDCInitialize \
                 -Wl,-framework,IOKit

Xquartz_LDFLAGS =  \
                 -XCClinker -Objc \
                 -Wl,-u,_miDCInitialize \
                 -Wl,-framework,Carbon \
                 -Wl,-framework,OpenGL \
                 -Wl,-framework,Cocoa \
                 -Wl,-framework,CoreAudio \
                 -Wl,-framework,IOKit

XDarwin_CFLAGS = -DINXDARWIN
Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API  -DHAVE_XORG_CONFIG_H

if XQUARTZ
macosdir = $(darwinappdir)/Contents/MacOS

DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server

macos_PROGRAMS = XDarwinApp
macos_SCRIPTS = x11app

x11app:
	cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"

XDarwinApp_SOURCES = \
                $(top_srcdir)/fb/fbcmap_mi.c \
                $(top_srcdir)/mi/miinitext.c \
		$(top_srcdir)/Xi/stubs.c 

XDarwinApp_LDADD = \
		$(top_builddir)/dix/dixfonts.lo \
		$(top_builddir)/dix/libdix.la \
		$(top_builddir)/config/libconfig.a \
		$(top_builddir)/os/libos.la \
		./quartz/XApplication.o \
		./libdarwinShared.a \
		./quartz/libXQuartz.a \
		 $(top_builddir)/miext/shadow/libshadow.la \
		 $(top_builddir)/miext/cw/libcw.la \
		 $(DARWIN_LIBS) \
		 $(top_builddir)/miext/rootless/librootless.la \
		 $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
		 $(top_builddir)/miext/rootless/accel/librlAccel.la \
		 @XORG_LIBS@ \
		 $(XSERVER_LIBS)

XDarwinApp_LDFLAGS =  \
		 -XCClinker -Objc \
		 -Wl,-u,_miDCInitialize \
		 -Wl,-framework,Carbon \
		 -Wl,-framework,ApplicationServices \
		 -Wl,-framework,Cocoa \
		 -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 = \
		quartz/cr/crAppleWM.m \
		quartz/cr/crFrame.m \
		quartz/cr/crScreen.m \
		quartz/fullscreen/quartzCursor.c \
		quartz/cr/XView.m

cr_la_LIBADD = \
		$(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 \
		-XCClinker -ObjC \
		-XCClinker -bundle_loader -XCClinker XDarwinApp \
		-module -avoid-version -no-undefined
cr_la_DEPENDENCIES = XDarwinApp	

fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS
fullscreenplugin_LTLIBRARIES = fullscreen.la
fullscreen_la_SOURCES = \
		quartz/fullscreen/fullscreen.c \
		quartz/fullscreen/quartzCursor.c

fullscreen_la_LIBADD = \
		$(top_builddir)/miext/shadow/libshadow.la

fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
		-XCClinker -bundle_loader -XCClinker XDarwinApp \
		-module -avoid-version -no-undefined
fullscreen_la_DEPENDENCIES = XDarwinApp	

if GLX
glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS
glxMesaplugin_LTLIBRARIES = glxMesa.la
glxMesa_la_SOURCES =
glxMesa_la_LIBADD = \
		$(top_builddir)/GL/glx/libglx.la \
		$(top_builddir)/GL/mesa/libGLcore.la 
glxMesa_la_LDFLAGS = -shrext '' \
		-Wl,-framework,AGL \
		-Wl,-framework,OpenGL \
		-XCClinker -ObjC \
		-XCClinker -bundle_loader -XCClinker XDarwinApp \
		-module -avoid-version -no-undefined
glxMesa_la_DEPENDENCIES = XDarwinApp	
endif

endif
if HAVE_X_PLUGIN

xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
xprplugin_LTLIBRARIES = xpr.la
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 = \
		$(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 \
		-module -avoid-version -no-undefined
xpr_la_DEPENDENCIES = XDarwinApp	

endif

if HAVE_AGL_FRAMEWORK
glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS
glxCGLplugin_LTLIBRARIES = glxCGL.la
glxCGL_la_SOURCES =
glxCGL_la_LIBADD = \
		$(top_builddir)/GL/glx/glxext.o \
		$(top_builddir)/GL/glx/libglx.a \
		$(top_builddir)/GL/apple/libAGLcore.a
glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
		-Wl,-framework,AGL \
		-Wl,-framework,OpenGL \
		-XCClinker -ObjC \
		-XCClinker -bundle_loader -XCClinker XDarwinApp \
		-module -avoid-version -no-undefined
glxCGL_la_DEPENDENCIES = XDarwinApp	


glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS
glxAGLplugin_LTLIBRARIES = glxAGL.la
glxAGL_la_SOURCES =
glxAGL_la_LIBADD = \
		$(top_builddir)/GL/glx/glxext.o \
		$(top_builddir)/GL/glx/libglx.a \
		$(top_builddir)/GL/apple/libAGLcore.a
glxAGL_la_LDFLAGS = -shrext '' \
		-Wl,-framework,AGL \
		-Wl,-framework,OpenGL \
		-XCClinker -ObjC \
		-XCClinker -bundle_loader -XCClinker XDarwinApp \
		-module -avoid-version -no-undefined
glxAGL_la_DEPENDENCIES = XDarwinApp	



endif

man1_MANS = XDarwin.man

uninstall-hook:
	rm -rf $(DESTDIR)$(macosdir)/XDarwin

install-data-hook: $(HOOK_TARGETS)

xquartz-install-hook:
	mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
	cd apple && xcodebuild install

EXTRA_DIST = \
	darwin.c \
	darwinClut8.h \
	darwinEvents.c \
	darwin.h \
	darwinKeyboard.c \
	darwinKeyboard.h \
	darwinXinput.c \
	XDarwin.man