aboutsummaryrefslogtreecommitdiff
path: root/emulators/spim/Makefile
blob: a5e78a7d2e41ada474bc86693c8e1dbb8f71e8ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# ex:ts=8
# Ports collection makefile for:  spim
# Date created:			  Mon Oct 28, 1996
# Whom:				  David O'Brien (obrien@cs.ucdavis.edu)
#
# $FreeBSD$
#

PORTNAME=	spim
PORTVERSION=	7.2.1
PORTREVISION=	2
CATEGORIES=	emulators
MASTER_SITES=	http://www.cs.wisc.edu/~larus/SPIM/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	MIPS32 Simulator

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

MAN1=		spim.1

PORTDOCS=	cycle.ps.gz spim.ps.gz SPIM.html
PLIST_FILES=	bin/spim %%DATADIR%%/exceptions.s
PLIST_DIRS=	%%DATADIR%%

OPTIONS=	GUI "Graphical user interface" on

.include <bsd.port.pre.mk>

.if defined(WITH_GUI)
USE_XLIB=	yes
BUILD_DEPENDS+=			imake:${X_IMAKE_PORT}
PLIST_FILES+=	bin/xspim
MAN1+=		xspim.1
.endif

do-configure:

do-build:
	cd ${WRKSRC}/spim && \
		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE}
.if defined(WITH_GUI)
	cd ${WRKSRC}/xspim && ${XMKMF} && \
		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE}
.endif

do-install:
	cd ${WRKSRC}/spim && \
		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} \
		${INSTALL_TARGET}
.if defined(WITH_GUI)
	cd ${WRKSRC}/xspim && \
		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} \
		${INSTALL_TARGET}
	${INSTALL_MAN} ${WRKSRC}/Documentation/xspim.man ${PREFIX}/man/man1/xspim.1
.endif

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/Documentation/TeX/cycle.ps ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/Documentation/TeX/spim.ps ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/Documentation/SPIM.html ${DOCSDIR}
	${GZIP_CMD} ${DOCSDIR}/cycle.ps ${DOCSDIR}/spim.ps
.endif

.include <bsd.port.post.mk>