openbsd-ports/emulators/bochs/Makefile

134 lines
3.4 KiB
Makefile
Raw Normal View History

2007-11-13 09:54:30 -05:00
# $OpenBSD: Makefile,v 1.41 2007/11/13 14:54:30 steven Exp $
1999-02-21 23:52:22 -05:00
# $NetBSD: Makefile,v 1.2 1998/09/22 06:11:36 garbled Exp $
1998-05-20 03:11:31 -04:00
COMMENT= x86 machine simulator
DISTNAME= bochs-2.1.1
2007-11-13 09:54:30 -05:00
PKGNAME= ${DISTNAME}p1
CATEGORIES= emulators
2002-10-26 08:52:48 -04:00
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bochs/}
1998-10-15 00:33:25 -04:00
HOMEPAGE= http://bochs.sourceforge.net/
2002-05-08 13:19:36 -04:00
MAINTAINER= Todd T. Fries <todd@openbsd.org>
# GPL
2000-07-18 01:16:58 -04:00
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
2000-03-16 17:26:18 -05:00
PERMIT_DISTFILES_FTP= Yes
2007-11-13 09:54:30 -05:00
WANTLIB= ICE SM X11 Xau Xdmcp Xpm c m stdc++ termlib z
2000-03-16 17:26:18 -05:00
2007-03-31 08:58:13 -04:00
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-cdrom \
--enable-fpu \
--enable-ne2000 \
--with-nogui \
--with-term \
--enable-all-optimizations
FLAVORS= debug i386 i486 i686 x86_64 smp smp_4 smp_8 \
no_x11 no_mmx no_comp no_pci
FLAVOR?=
2000-07-18 01:16:58 -04:00
.if ${FLAVOR:L:Mdebug}
CONFIGURE_ARGS+= --enable-debugger --enable-disasm --enable-x86-debugger
CONFIGURE_ARGS+= --enable-readline
2004-11-27 05:39:13 -05:00
WANTLIB+= curses readline
.endif
.if !${FLAVOR:L:Mno_x11}
USE_X11= Yes
CONFIGURE_ARGS+= --with-x11
.endif
.if ${FLAVOR:L:Mi386}
CONFIGURE_ARGS+= --enable-cpu-level="3" --disable-mmx
. if ${FLAVOR:L:Mi486} || ${FLAVOR:L:Mi686} || ${FLAVOR:L:Mx86_64}
ERRORS += "Fatal: cannot use i486, i686, or x86_64 flavors with i386"
. endif
.endif
.if ${FLAVOR:L:Mi486}
CONFIGURE_ARGS+= --enable-cpu-level="4" --disable-mmx
. if ${FLAVOR:L:Mi386} || ${FLAVOR:L:Mi686} || ${FLAVOR:L:Mx86_64}
ERRORS += "Fatal: cannot use i386, i686, or x86_64 flavors with i486"
. endif
.endif
.if ! ${FLAVOR:L:Mi386} && ! ${FLAVOR:L:Mi486} && ! ${FLAVOR:L:Mi686}
CONFIGURE_ARGS+= --enable-cpu-level="5"
.endif
.if ${FLAVOR:L:Mi686}
CONFIGURE_ARGS+= --enable-cpu-level="6"
. if ${FLAVOR:L:Mi386} || ${FLAVOR:L:Mi486}
ERRORS += "Fatal: cannot use i386 or i486 flavors with i686"
. endif
.endif
.if ${FLAVOR:L:Mx86_64}
CONFIGURE_ARGS+= --enable-x86-64 --enable-cpu-level="6"
.else
CONFIGURE_ARGS+= --disable-x86-64
.endif
.if !${FLAVOR:L:Mno_pci}
CONFIGURE_ARGS+= --enable-pci
.endif
.if ${FLAVOR:L:Msmp} || ${FLAVOR:L:Msmp_4} || ${FLAVOR:L:Msmp_8}
. if ! ${FLAVOR:L:Mi686}
ERRORS += "Fatal: i686 flavor required for smp"
. endif
. if ${FLAVOR:L:Msmp_8}
CONFIGURE_ARGS+= --enable-processors=8
. elif ${FLAVOR:L:Msmp_4}
CONFIGURE_ARGS+= --enable-processors=4
. else
CONFIGURE_ARGS+= --enable-processors=2
. endif
CONFIGURE_ARGS+= --enable-apic
.else
CONFIGURE_ARGS+= --disable-apic
.endif
.if !${FLAVOR:L:Mno_mmx}
CONFIGURE_ARGS+= --enable-mmx
. if ${FLAVOR:L:Mi386} || ${FLAVOR:L:Mi486}
ERRORS += "Fatal: cannot use i386 or i486 with mmx"
. endif
.endif
.if !${FLAVOR:L:Mno_comp}
CONFIGURE_ARGS+= --enable-compressed-hd
.endif
pre-build:
2000-07-18 01:16:58 -04:00
@sed -e 's@!!PREFIX!!@${PREFIX}@' \
< ${WRKSRC}/.bochsrc > ${WRKSRC}/bochsrc
1998-05-20 03:11:31 -04:00
2002-10-26 08:52:48 -04:00
NO_REGRESS= Yes
.for _ncpu in 2 4 8
BIOS += BIOS-bochs-${_ncpu}-processors
.endfor
2001-06-13 12:12:49 -04:00
BIOS += BIOS-bochs-latest
BIOS += VGABIOS-elpin-2.40 VGABIOS-elpin-LICENSE
BIOS += VGABIOS-lgpl-latest VGABIOS-lgpl-README
1998-05-20 03:11:31 -04:00
do-install:
2000-07-18 01:16:58 -04:00
${INSTALL_DATA_DIR} ${PREFIX}/share/bochs/bios
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bochs
cd ${WRKBUILD}; ${INSTALL_PROGRAM} bochs bximage ${PREFIX}/bin
cd ${WRKSRC}/bios; ${INSTALL_DATA} ${BIOS} ${PREFIX}/share/bochs/bios
${INSTALL_MAN} ${WRKSRC}/doc/man/*.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/man/*.5 ${PREFIX}/man/man5
${INSTALL_DATA} ${WRKSRC}/docs-html/*.html ${PREFIX}/share/doc/bochs
${INSTALL_DATA} ${WRKSRC}/bochsrc ${PREFIX}/share/bochs
1998-05-20 03:11:31 -04:00
.include <bsd.port.mk>