2005-01-05 13:05:19 +01:00
|
|
|
# $NetBSD: Makefile.common,v 1.17 2005/01/05 12:05:19 adam Exp $
|
2003-07-26 23:38:22 +02:00
|
|
|
|
2005-01-05 13:05:19 +01:00
|
|
|
DISTNAME= SDL-1.2.8
|
2003-07-26 23:38:22 +02:00
|
|
|
CATEGORIES= devel games
|
|
|
|
MASTER_SITES= http://www.libsdl.org/release/
|
|
|
|
|
|
|
|
MAINTAINER= wiz@NetBSD.org
|
|
|
|
HOMEPAGE= http://www.libsdl.org/
|
|
|
|
COMMENT= Simple DirectMedia Layer, a cross-platform multimedia library
|
|
|
|
|
|
|
|
DISTINFO_FILE= ${.CURDIR}/../../devel/SDL/distinfo
|
|
|
|
PATCHDIR= ${.CURDIR}/../../devel/SDL/patches
|
|
|
|
|
2004-01-05 23:44:04 +01:00
|
|
|
USE_BUILDLINK3= YES
|
2003-07-26 23:38:22 +02:00
|
|
|
USE_X11= YES
|
|
|
|
GNU_CONFIGURE= YES
|
2004-01-22 09:24:28 +01:00
|
|
|
USE_GNU_TOOLS+= make
|
2004-02-11 02:46:30 +01:00
|
|
|
USE_LANGUAGES= c c++
|
2003-07-26 23:38:22 +02:00
|
|
|
PTHREAD_OPTS+= require
|
|
|
|
|
|
|
|
USE_LIBTOOL= YES
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
2004-01-10 06:46:44 +01:00
|
|
|
. include "../../devel/binutils/buildlink3.mk"
|
2003-07-26 23:38:22 +02:00
|
|
|
BUILD_DEPENDS+= nasm>=0.98:../../devel/nasm
|
|
|
|
NASMFLAGS_ELF= -f elf
|
|
|
|
NASMFLAGS_a.out= -f aoutb
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --enable-dlopen
|
|
|
|
CONFIGURE_ARGS+= --disable-arts
|
|
|
|
CONFIGURE_ARGS+= --disable-esd
|
2003-07-27 01:05:34 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-nas
|
2003-07-26 23:38:22 +02:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --enable-video-aalib
|
|
|
|
CONFIGURE_ENV+= NASMFLAGS="${NASMFLAGS_${OBJECT_FMT}}"
|
|
|
|
MAKE_ENV+= NASMFLAGS="${NASMFLAGS_${OBJECT_FMT}}"
|
|
|
|
|
|
|
|
# Pass in LDFLAGS via SYSTEM_LIBS as it's used as the linker options for
|
|
|
|
# finding various libraries. This ensure that any unusual -Wl,-R options
|
|
|
|
# are noted correctly in the generated sdl-config.
|
|
|
|
#
|
|
|
|
CONFIGURE_ENV+= SYSTEM_LIBS="${LDFLAGS}"
|
|
|
|
|
2004-05-04 23:58:07 +02:00
|
|
|
# buildlink passthru the directories required for the Cocoa framework
|
|
|
|
# on Darwin if they exist.
|
|
|
|
.if ${OPSYS} == "Darwin"
|
|
|
|
COCOA_DIRS+= /System /Library /Developer
|
|
|
|
. for _dir_ in ${COCOA_DIRS}
|
|
|
|
. if exists(${_dir_})
|
|
|
|
BUILDLINK_PASSTHRU_DIRS+= ${_dir_}
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
|
2004-01-05 23:44:04 +01:00
|
|
|
.include "../../mk/ossaudio.buildlink3.mk"
|
2004-05-04 23:58:43 +02:00
|
|
|
. if defined(HAVE_OSS) && ${HAVE_OSS} == "YES"
|
2003-07-26 23:38:22 +02:00
|
|
|
AM_CFLAGS= -D_PATH_DEV_DSP=\\\"${DEVOSSAUDIO}\\\"
|
|
|
|
MAKE_ENV+= AM_CFLAGS="${AM_CFLAGS}"
|
|
|
|
.endif
|
|
|
|
|
2004-08-24 23:07:04 +02:00
|
|
|
# Irix comes with GL, which works fine for SDL
|
2004-08-24 01:57:20 +02:00
|
|
|
.if ${OPSYS} != "IRIX"
|
2004-02-13 18:15:02 +01:00
|
|
|
.include "../../graphics/Mesa/buildlink3.mk"
|
2004-08-24 01:57:20 +02:00
|
|
|
.endif
|
2004-01-05 23:44:04 +01:00
|
|
|
.include "../../graphics/aalib-x11/buildlink3.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2003-07-26 23:38:22 +02:00
|
|
|
|
2004-05-04 23:58:43 +02:00
|
|
|
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "pth"
|
2003-07-26 23:38:22 +02:00
|
|
|
# Let SDL know that we do not have native pthreads and are using GNU pth.
|
|
|
|
CONFIGURE_ARGS+= --disable-pthreads
|
|
|
|
CONFIGURE_ARGS+= --enable-pth
|
|
|
|
.endif
|