Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.sdl.mk
Show All 40 Lines | |||||
# | # | ||||
# These are the current supported SDL2 modules | # These are the current supported SDL2 modules | ||||
# | # | ||||
_USE_SDL_ALL+= gfx2 image2 mixer2 net2 sdl2 ttf2 | _USE_SDL_ALL+= gfx2 image2 mixer2 net2 sdl2 ttf2 | ||||
# | # | ||||
# Variables used to determine what is needed: | # Variables used to determine what is needed: | ||||
# _SUBDIR_xxx subdirectory below ${PORTSDIR} (required) | # _SUBDIR_xxx subdirectory below ${PORTSDIR} (required) | ||||
# _PORTDIR_xxx subdirectory below ${PORTSDIR}/${_SUBDIR_xxx} | # _PORTDIR_xxx subdirectory below ${_SUBDIR_xxx} | ||||
# _LIB_xxx name of the shared lib | # _LIB_xxx name of the shared lib | ||||
# _REQUIRES_xxx also needs these SDL libraries | # _REQUIRES_xxx also needs these SDL libraries | ||||
# | # | ||||
_SUBDIR_console= devel | _SUBDIR_console= devel | ||||
_PORTDIR_console= sdl_console | _PORTDIR_console= sdl_console | ||||
_LIB_console= libSDL_console.so | _LIB_console= libSDL_console.so | ||||
_REQUIRES_console= sdl | _REQUIRES_console= sdl | ||||
▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
__USE_SDL+= ${component} | __USE_SDL+= ${component} | ||||
. endif | . endif | ||||
.endfor | .endfor | ||||
# | # | ||||
# Finally make the list of libs required | # Finally make the list of libs required | ||||
# | # | ||||
.for component in ${__USE_SDL} | .for component in ${__USE_SDL} | ||||
LIB_DEPENDS+= ${_LIB_${component}}:${PORTSDIR}/${_SUBDIR_${component}}/${_PORTDIR_${component}} | LIB_DEPENDS+= ${_LIB_${component}}:${_SUBDIR_${component}}/${_PORTDIR_${component}} | ||||
.endfor | .endfor | ||||
# | # | ||||
# "Normal" dependencies and variables | # "Normal" dependencies and variables | ||||
# | # | ||||
.if ${__USE_SDL:Msdl} != "" | .if ${__USE_SDL:Msdl} != "" | ||||
BUILD_DEPENDS+= ${SDL_CONFIG}:${PORTSDIR}/${_SUBDIR_sdl}/${_PORTDIR_sdl} | BUILD_DEPENDS+= ${SDL_CONFIG}:${_SUBDIR_sdl}/${_PORTDIR_sdl} | ||||
SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config | SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config | ||||
CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG} | CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG} | ||||
MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG} | MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG} | ||||
.endif | .endif | ||||
.if ${__USE_SDL:Msdl2} != "" | .if ${__USE_SDL:Msdl2} != "" | ||||
BUILD_DEPENDS+= ${SDL2_CONFIG}:${PORTSDIR}/${_SUBDIR_sdl2}/${_PORTDIR_sdl2} | BUILD_DEPENDS+= ${SDL2_CONFIG}:${_SUBDIR_sdl2}/${_PORTDIR_sdl2} | ||||
SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config | SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config | ||||
CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} | CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} | ||||
MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} | MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif |