summaryrefslogtreecommitdiffstats
path: root/rules/sdl.make
blob: cfde07beb154d2734a64c41a2cd603b5fee82bfa (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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# -*-makefile-*-
#
# Copyright (C) 2006 by Erwin Rol
#               2010 by Marc Kleine-Budde <mkl@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_SDL) += sdl

#
# Paths and names
#
SDL_VERSION	:= 1.2.14
SDL		:= SDL-$(SDL_VERSION)
SDL_SUFFIX	:= tar.gz
SDL_URL		:= http://www.libsdl.org/release/$(SDL).$(SDL_SUFFIX)
SDL_SOURCE	:= $(SRCDIR)/$(SDL).$(SDL_SUFFIX)
SDL_DIR		:= $(BUILDDIR)/$(SDL)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(SDL_SOURCE):
	@$(call targetinfo)
	@$(call get, SDL)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

SDL_PATH	:= PATH=$(CROSS_PATH)
SDL_ENV 	:= $(CROSS_ENV)

#
# autoconf
#
SDL_AUTOCONF := $(CROSS_AUTOCONF_USR)

ifdef PTXCONF_SDL_SHARED
SDL_AUTOCONF += --enable-shared
else
SDL_AUTOCONF += --disable-shared
endif

ifdef PTXCONF_SDL_STATIC
SDL_AUTOCONF += --enable-static
else
SDL_AUTOCONF += --disable-static
endif

ifdef PTXCONF_SDL_AUDIO
SDL_AUTOCONF += --enable-audio

 ifdef PTXCONF_SDL_OSS
 SDL_AUTOCONF += --enable-oss
 else
 SDL_AUTOCONF += --disable-oss
 endif

 ifdef PTXCONF_SDL_ALSA
 SDL_AUTOCONF += \
	--enable-alsa \
	--disable-alsatest \
	--with-alsa-prefix=$(SYSROOT)/usr/lib \
	--with-alsa-inc-prefix=$(SYSROOT)/usr/include
  ifdef PTXCONF_SDL_ALSA_SHARED
  SDL_AUTOCONF += --enable-alsa-shared
  else
  SDL_AUTOCONF += --disable-alsa-shared
  endif
 else
 SDL_AUTOCONF += --disable-alsa
 endif

 ifdef PTXCONF_SDL_ESD
 SDL_AUTOCONF += --enable-esd
 SDL_AUTOCONF += --disable-esdtest
 #SDL_AUTOCONF += --with-esd-prefix=PFX
 #SDL_AUTOCONF += --with-esd-exec-prefix=PFX
  ifdef PTXCONF_SDL_ESD_SHARED
  SDL_AUTOCONF += --enable-esd-shared
  else
  SDL_AUTOCONF += --disable-esd-shared
  endif
 else
 SDL_AUTOCONF += --disable-esd
 endif

 ifdef PTXCONF_SDL_ARTS
 SDL_AUTOCONF += --enable-arts
  ifdef PTXCONF_SDL_ARTS_SHARED
  SDL_AUTOCONF += --enable-arts-shared
  else
  SDL_AUTOCONF += --disable-arts-shared
  endif
 else
 SDL_AUTOCONF += --disable-arts
 endif

 ifdef PTXCONF_SDL_NAS
 SDL_AUTOCONF += --enable-nas
 else
 SDL_AUTOCONF += --disable-nas
 endif

 ifdef PTXCONF_SDL_DISKAUDIO
 SDL_AUTOCONF += --enable-diskaudio
 else
 SDL_AUTOCONF += --disable-diskaudio
 endif

else
SDL_AUTOCONF += --disable-audio
endif

ifdef PTXCONF_SDL_VIDEO
SDL_AUTOCONF += --enable-video

 ifdef PTXCONF_SDL_NANOX
 SDL_AUTOCONF += \
	--enable-video-nanox \
	--enable-nanox-debug \
	--enable-nanox-share-memory \
	--enable-nanox-direct-fb
 else
 SDL_AUTOCONF += --disable-video-nanox
 endif

 ifdef PTXCONF_SDL_XORG
 SDL_AUTOCONF += \
	--with-x \
	--enable-video-x11 \
	--enable-video-x11-vm \
	--enable-dga \
	--enable-video-x11-dgamouse \
	--enable-video-x11-xme \
	--enable-video-dga \
	--x-includes=$(SYSROOT)/usr/include \
	--x-libraries=$(SYSROOT)/usr/lib
  ifdef PTXCONF_SDL_XORG_XV
  SDL_AUTOCONF += --enable-video-x11-xv
  else
  SDL_AUTOCONF += --disable-video-x11-xv
  endif
  ifdef PTXCONF_SDL_XORG_XINERAMA
  SDL_AUTOCONF += --enable-video-x11-xinerama
  else
  SDL_AUTOCONF += --disable-video-x11-xinerama
  endif
 else
 SDL_AUTOCONF += --without-x
 endif

 ifdef PTXCONF_SDL_FBCON
 SDL_AUTOCONF += --enable-video-fbcon
 else
 SDL_AUTOCONF += --disable-video-fbcon
 endif

 ifdef PTXCONF_SDL_DIRECTFB
 SDL_AUTOCONF += --enable-video-directfb
 else
 SDL_AUTOCONF += --disable-video-directfb
 endif

 ifdef PTXCONF_SDL_AALIB
 SDL_AUTOCONF += --enable-video-aalib
 else
 SDL_AUTOCONF += --disable-video-aalib
 endif

 ifdef PTXCONF_SDL_OPENGL
 SDL_AUTOCONF += \
	--enable-video-opengl \
	--enable-osmesa-shared
 else
 SDL_AUTOCONF += --disable-video-opengl
 endif

 SDL_AUTOCONF += --disable-video-qtopia

else
SDL_AUTOCONF += --disable-video
endif

ifdef PTXCONF_SDL_EVENT
SDL_AUTOCONF += --enable-events
else
SDL_AUTOCONF += --disable-events
endif

ifdef PTXCONF_SDL_JOYSTICK
SDL_AUTOCONF += --enable-joystick
else
SDL_AUTOCONF += --disable-joystick
endif

ifdef PTXCONF_SDL_CDROM
SDL_AUTOCONF += --enable-cdrom
else
SDL_AUTOCONF += --disable-cdrom
endif

ifdef PTXCONF_SDL_THREADS
SDL_AUTOCONF += --enable-threads
 ifdef PTXCONF_SDL_PTH
 SDL_AUTOCONF += --enable-pth
 else
 SDL_AUTOCONF += --disable-pth
 endif
else
SDL_AUTOCONF += --disable-threads
endif

ifdef PTXCONF_SDL_TIMERS
SDL_AUTOCONF += --enable-timers
else
SDL_AUTOCONF += --disable-timers
endif

ifdef PTXCONF_SDL_ENDIAN
SDL_AUTOCONF += --enable-endian
else
SDL_AUTOCONF += --disable-endian
endif

ifdef PTXCONF_SDL_FILE
SDL_AUTOCONF += --enable-file
else
SDL_AUTOCONF += --disable-file
endif

ifdef PTXCONF_SDL_CPUINFO
SDL_AUTOCONF += --enable-cpuinfo
else
SDL_AUTOCONF += --disable-cpuinfo
endif

ifdef PTXCONF_SDL_NASM
SDL_AUTOCONF += --enable-nasm
else
SDL_AUTOCONF += --disable-nasm
endif

SDL_AUTOCONF += \
	--disable-debug \
	--disable-strict-ansi \
	--disable-video-ps2gs \
	--disable-video-ggi \
	--disable-video-svga \
	--disable-video-vgl \
	--disable-video-xbios \
	--disable-video-gem \
	--enable-assembly \
	--enable-video-dummy \
	--enable-pthreads \
	--enable-pthread-sem \
	--enable-sigaction \
	--disable-stdio-redirect \
	--disable-directx \
	--disable-video-picogui \
	--enable-sdl-dlopen \
	--disable-atari-ldg \
	--enable-rpath \
	--disable-mintaudio \
	--disable-video-photon \
	--enable-input-events

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/sdl.targetinstall:
	@$(call targetinfo)

	@$(call install_init, sdl)
	@$(call install_fixup, sdl,PACKAGE,sdl)
	@$(call install_fixup, sdl,PRIORITY,optional)
	@$(call install_fixup, sdl,VERSION,$(SDL_VERSION))
	@$(call install_fixup, sdl,SECTION,base)
	@$(call install_fixup, sdl,AUTHOR,"Erwin Rol <ero@pengutronix.de>")
	@$(call install_fixup, sdl,DEPENDS,)
	@$(call install_fixup, sdl,DESCRIPTION,missing)

ifdef PTXCONF_SDL_SHARED
	@$(call install_copy, sdl, 0, 0, 0644, -, /usr/lib/libSDL-1.2.so.0.11.3)

	@$(call install_link, sdl, \
		libSDL-1.2.so.0.11.3, \
		/usr/lib/libSDL-1.2.so.0)

	@$(call install_link, sdl, \
		libSDL-1.2.so.0.11.3, \
		/usr/lib/libSDL-1.2.so)
endif

	@$(call install_finish, sdl)

	@$(call touch)

# vim: syntax=make