Android/BluetoothServerPort: add missing "@Override" annotations
[xcsoar.git] / build / sdl.mk
blobf33bf24f85f2b56f7c5e421908af45d2c7d63079
1 ifeq ($(TARGET),ANDROID)
2 # Android must use OpenGL
3 ENABLE_SDL = n
4 # UNIX/Linux defaults to OpenGL, but can use SDL_gfx instead
5 else ifeq ($(HAVE_WIN32),y)
6 # Windows defaults to GDI
7 ENABLE_SDL ?= n
8 else
9 # everything else defaults to SDL
10 ENABLE_SDL ?= y
11 endif
13 ifeq ($(ENABLE_SDL),y)
15 SDL_PKG = sdl
17 ifeq ($(LIBPNG),n)
18 SDL_PKG += SDL_image
19 endif
21 ifeq ($(FREETYPE),n)
22 SDL_PKG += SDL_ttf
23 endif
25 ifeq ($(OPENGL),n)
26 SDL_PKG += SDL_gfx
27 endif
29 $(eval $(call pkg-config-library,SDL,$(SDL_PKG)))
31 SDL_CPPFLAGS += -DENABLE_SDL
33 ifeq ($(TARGET_IS_DARWIN),y)
34 # the pkg-config file on MacPorts is broken, we must convert all -l
35 # flags to link static libraries instead
36 SDL_LDADD := $(patsubst -l%,/opt/local/lib/lib%.a,$(filter -l%,$(SDL_LDLIBS)))
37 SDL_LDLIBS := $(filter-out -l% -R% -L%,$(SDL_LDLIBS))
39 SDL_LDADD += /opt/local/lib/libbz2.a /opt/local/lib/libz.a
40 SDL_LDADD += /opt/local/lib/libfreetype.a
41 SDL_LDADD += /opt/local/lib/libxcb.a /opt/local/lib/libXau.a /opt/local/lib/libXdmcp.a
42 endif
43 endif