2014-05-07 21:52:52 +00:00
|
|
|
SDL_PORT_DIR := $(call select_from_ports,sdl)
|
|
|
|
SDL_DIR := $(SDL_PORT_DIR)/src/lib/sdl
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# build shared object
|
|
|
|
SHARED_LIB = yes
|
|
|
|
|
2013-03-29 14:42:19 +00:00
|
|
|
# use default warning level for 3rd-party code
|
|
|
|
CC_WARN =
|
|
|
|
|
2014-05-07 21:52:52 +00:00
|
|
|
INC_DIR += $(SDL_PORT_DIR)/include
|
|
|
|
INC_DIR += $(SDL_PORT_DIR)/include/SDL
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
# backends
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_CC = video/SDL_genode_fb_video.cc \
|
|
|
|
video/SDL_genode_fb_events.cc \
|
|
|
|
audio/SDL_genodeaudio.cc \
|
|
|
|
timer/SDL_systimer.cc \
|
|
|
|
loadso/SDL_loadso.cc
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
INC_DIR += $(REP_DIR)/include/SDL \
|
|
|
|
$(REP_DIR)/src/lib/sdl \
|
2012-04-19 16:05:04 +00:00
|
|
|
$(REP_DIR)/src/lib/sdl/thread \
|
2011-12-22 15:19:25 +00:00
|
|
|
$(REP_DIR)/src/lib/sdl/video
|
|
|
|
|
|
|
|
# main files
|
|
|
|
SRC_C = SDL.c \
|
|
|
|
SDL_error.c \
|
|
|
|
SDL_fatal.c
|
|
|
|
|
|
|
|
INC_DIR += $(REP_DIR)/src/lib/sdl
|
|
|
|
|
|
|
|
# stdlib files
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += stdlib/SDL_getenv.c \
|
|
|
|
stdlib/SDL_string.h
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# thread subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += thread/SDL_thread.c \
|
|
|
|
thread/pthread/SDL_systhread.c \
|
|
|
|
thread/generic/SDL_syscond.c \
|
|
|
|
thread/generic/SDL_sysmutex.c \
|
|
|
|
thread/pthread/SDL_syssem.c
|
2012-04-19 16:05:04 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/thread
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# cpuinfo subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += cpuinfo/SDL_cpuinfo.c
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# timer subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += timer/SDL_timer.c
|
2012-04-10 14:18:56 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/timer
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# video subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += $(addprefix video/,$(notdir $(wildcard $(SDL_DIR)/src/video/*.c)))
|
2011-12-22 15:19:25 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/video
|
|
|
|
|
|
|
|
# event subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += $(addprefix events/,$(notdir $(wildcard $(SDL_DIR)/src/events/*.c)))
|
2011-12-22 15:19:25 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/events
|
|
|
|
|
|
|
|
# audio subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += $(addprefix audio/,$(notdir $(wildcard $(SDL_DIR)/src/audio/*.c)))
|
2012-05-10 15:58:59 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/audio
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# file I/O subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += file/SDL_rwops.c
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# joystick subsystem
|
2013-03-29 14:42:19 +00:00
|
|
|
SRC_C += joystick/SDL_joystick.c \
|
|
|
|
joystick/dummy/SDL_sysjoystick.c
|
2011-12-22 15:19:25 +00:00
|
|
|
INC_DIR += $(SDL_DIR)/src/joystick
|
|
|
|
|
2013-10-21 20:01:19 +00:00
|
|
|
# cdrom subsystem
|
|
|
|
SRC_C += cdrom/SDL_cdrom.c \
|
|
|
|
cdrom/dummy/SDL_syscdrom.c
|
|
|
|
INC_DIR += $(SDL_DIR)/src/cdrom
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
# we need libc
|
2012-04-19 16:05:04 +00:00
|
|
|
LIBS = libc pthread
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2013-03-29 14:42:19 +00:00
|
|
|
# backend path
|
|
|
|
vpath % $(REP_DIR)/src/lib/sdl
|
|
|
|
|
|
|
|
vpath % $(SDL_DIR)/src
|