aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/dynamips-devel/Makefile
blob: 96afc67314c4ba4771ec685cc79e64e89d3abc50 (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
68
69
70
71
# New ports collection makefile for:    dynamips
# Date created:             21 Mar 2007
# Whom:                 Pavel Volkov <pol@opk.ru>
#
# $FreeBSD$
#

PORTNAME=   dynamips
DISTVERSION=    0.2.7-RC1
CATEGORIES= emulators
MASTER_SITES=   http://www.ipflow.utc.fr/dynamips/
PKGNAMESUFFIX=  -devel

MAINTAINER= pol@opk.ru
COMMENT=    Cisco 3600/7200 Simulator

LIB_DEPENDS=    elf.0:${PORTSDIR}/devel/libelf

USE_GMAKE=  yes
USE_GCC=    3.2+
USE_GETOPT_LONG=yes
ALL_TARGET= ${PORTNAME} nvram_export
MAKE_ENV=   DYNAMIPS_ARCH=${DYNAMIPS_ARCH}\
        PTHREAD_CFLAGS=${PTHREAD_CFLAGS}\
        PTHREAD_LIBS=${PTHREAD_LIBS}\
        LDFLAGS="${LDFLAGS}"

PLIST_FILES=    bin/${PORTNAME} bin/nvram_export
.if !defined(NOPORTDOCS)
PORTDOCS=   README README.hypervisor
.endif
.if !defined(NO_INSTALL_MANPAGES)
MAN1=       ${PORTNAME}.1 nvram_export.1
MAN7=       hypervisor_mode.7
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/nvram_export ${PREFIX}/bin
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README.hypervisor ${DOCSDIR}
.endif
.if !defined(NO_INSTALL_MANPAGES)
    ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/nvram_export.1 ${PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/hypervisor_mode.7 ${PREFIX}/man/man7
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "i386"
DYNAMIPS_ARCH=  "x86"
.elif ${ARCH} == "amd64"
DYNAMIPS_ARCH=  "nojit" # JIT does not work on amd64 for some reason
.else
DYNAMIPS_ARCH=  "nojit"
.endif

.if ${OSVERSION} < 602100 || ${OSVERSION} < 700021
#
# Requires libpcap 0.9.4
BUILD_DEPENDS+= libpcap>=0.9.4:${PORTSDIR}/net/libpcap
.endif

.if ${OSVERSION} >= 700013
MAKE_ENV+=  HAS_POSIX_MEMALIGN=1
.endif

.include <bsd.port.post.mk>