-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile.sdl
43 lines (39 loc) · 1.36 KB
/
makefile.sdl
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
SDL_PREFIX = $(PWD)/SDL/build
CFLAGS += -fPIC
# -fPIC needed to link into a shared object
CONFIGURE_FLAGS +=
MULTITHREAD ?= -j
SDL_JOYSTICK_DISABLE ?= --enable-joystick=no
SDL_HAPTIC_DISABLE ?= --enable-haptic=no
default: sdl
submodules:
git submodule init
git submodule update --depth 1
sdl: submodules
mkdir -p $(SDL_PREFIX)
export CFLAGS="$(CFLAGS)" && cd SDL/build && ../configure --disable-shared --prefix=$(SDL_PREFIX) $(CONFIGURE_FLAGS) \
--enable-audio=no --enable-power=no --enable-filesystem=no --enable-timers=no --enable-file=no \
--enable-events=no --enable-render=no --enable-loadso=no --enable-cpuinfo=no --enable-assembly=no --enable-atomic=no \
--enable-system-iconv=no --enable-misc=no --enable-locale=no \
$(SDL_JOYSTICK_DISABLE) $(SDL_HAPTIC_DISABLE) \
--enable-hidapi=no --enable-sensor=no \
--enable-video-wayland=no \
--enable-video-rpi=no \
--enable-video-x11=no \
--enable-video-vivante=no \
--enable-video-cocoa=no \
--enable-video-metal=no \
--enable-render-metal=no \
--enable-video-directfb=no \
--enable-video-kmsdrm=no \
--enable-video-opengl=no \
--enable-video-opengles=no \
--enable-video-opengles1=no \
--enable-video-opengles2=no \
--enable-video-vulkan=no \
--enable-render-d3d=no \
--enable-werror=no
cd SDL/build && $(MAKE) $(MULTITHREAD)
cd SDL/build && $(MAKE) install
clean:
rm -f -r $(SDL_PREFIX)