aboutsummaryrefslogtreecommitdiffstats
path: root/lang/sdcc/Makefile
blob: 36b5439578b99acfb712a86eb41b6a0c44d58409 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# New ports collection makefile for:    sdcc
# Date created:     3 May 2004
# Whom:         Tijl Coosemans <tijl@ulyssis.org>
#
# $FreeBSD$
#

PORTNAME=   sdcc
PORTVERSION=    3.1.0
DISTVERSIONPREFIX=  src-
CATEGORIES= lang
MASTER_SITES=   SF

MAINTAINER= tijl@coosemans.org
COMMENT=    Small Device C Compiler

LICENSE=    GPLv2

BUILD_DEPENDS=  ${LOCALBASE}/include/boost/graph/adjacency_list.hpp:${PORTSDIR}/devel/boost-libs

WRKSRC=     ${WRKDIR}/sdcc

GNU_CONFIGURE=  yes
USE_BZIP2=  yes
USE_GMAKE=  yes

OPTIONS=    MCS51   "Intel 8051 port" on \
        Z80 "Zilog Z80/Z180, Rabbit 2000 port" on \
        DS390   "Maxim 80DS390/DS400 port" on \
        PIC14   "Microchip PIC16 series port" on \
        PIC16   "Microchip PIC18 series port" on \
        HC08    "Motorola 68HC08 port" on \
        DEVLIB  "Device libraries" on \
        UCSIM   "The ucSim simulator" on

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ARGS= --disable-avr --docdir=${DOCSDIR} --enable-new-pics
CONFIGURE_ENV=  ARCH=""

.include <bsd.port.pre.mk>

.if defined(WITHOUT_MCS51) && defined(WITHOUT_DS390)
CONFIGURE_ARGS+=    --disable-51
PLIST_SUB+=     MCS51DS390="@comment "
.else
USE_AUTOTOOLS+=     autoconf
PLIST_SUB+=     MCS51DS390=""
.endif

.if defined(WITHOUT_MCS51)
CONFIGURE_ARGS+=    --disable-mcs51-port
PLIST_SUB+=     MCS51="@comment "
.else
PLIST_SUB+=     MCS51=""
.endif

.if defined(WITHOUT_Z80)
CONFIGURE_ARGS+=    --disable-gbz80-port --disable-r2k-port \
            --disable-z180-port --disable-z80-port --disable-z80
PLIST_SUB+=     Z80="@comment "
.else
PLIST_SUB+=     Z80=""
.endif

.if defined(WITHOUT_DS390)
CONFIGURE_ARGS+=    --disable-ds390-port --disable-ds400-port
PLIST_SUB+=     DS390="@comment "
.else
PLIST_SUB+=     DS390=""
.endif

.if defined(WITHOUT_PIC14)
CONFIGURE_ARGS+=    --disable-pic14-port
PLIST_SUB+=     PIC14="@comment "
.else
BUILD_DEPENDS+=     gputils>=0.14.1:${PORTSDIR}/devel/gputils
RUN_DEPENDS+=       gputils>=0.14.1:${PORTSDIR}/devel/gputils
PLIST_SUB+=     PIC14=""
.endif

.if defined(WITHOUT_PIC16)
CONFIGURE_ARGS+=    --disable-pic16-port
PLIST_SUB+=     PIC16="@comment "
.else
BUILD_DEPENDS+=     gputils>=0.14.1:${PORTSDIR}/devel/gputils
RUN_DEPENDS+=       gputils>=0.14.1:${PORTSDIR}/devel/gputils
PLIST_SUB+=     PIC16=""
.endif

.if defined(WITHOUT_HC08)
CONFIGURE_ARGS+=    --disable-hc08-port --disable-hc08
PLIST_SUB+=     HC08="@comment "
.else
PLIST_SUB+=     HC08=""
.endif

.if defined(WITHOUT_DEVLIB)
CONFIGURE_ARGS+=    --disable-device-lib
PLIST_SUB+=     DEVLIB="@comment "
.else
PLIST_SUB+=     DEVLIB=""
.endif

.if defined(WITHOUT_UCSIM)
CONFIGURE_ARGS+=    --disable-ucsim
PLIST_SUB+=     UCSIM="@comment "
.else
USE_AUTOTOOLS+=     libtool
LIBTOOLFILES=       sim/ucsim/configure
PLIST_SUB+=     UCSIM=""
.endif

post-patch:
.if defined(NOPORTDOCS)
    @${REINPLACE_CMD} 's, [a-z-]*doc,,' \
        ${WRKSRC}/Makefile.in \
        ${WRKSRC}/sim/ucsim/packages_in.mk
.endif

.include <bsd.port.post.mk>