summaryrefslogtreecommitdiff
path: root/cross/avr-libc/Makefile
blob: 41c460385e6cd80277ed6a671a7951f6870a55e4 (plain)
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
# $NetBSD: Makefile,v 1.2 2003/07/22 18:09:13 wennmach Exp $
# FreeBSD Id: ports/devel/avr-libc/Makefile,v 1.22 2003/05/20 06:02:40 joerg Exp

DISTNAME=		avr-libc-2003.05.11
CATEGORIES=		cross
MASTER_SITES=		http://people.freebsd.org/~joerg/ \
			http://savannah.nongnu.org/download/avr-libc/
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		karlj@mdstud.chalmers.se
HOMEPAGE=		http://savannah.nongnu.org/projects/avr-libc
COMMENT=		C and math library for Atmel AVR 8-bit microcontrollers

BUILD_DEPENDS+=		avr-binutils-*:../../cross/avr-binutils
BUILD_DEPENDS+=		avr-gcc-*:../../cross/avr-gcc
BUILD_DEPENDS+=		gmake-*:../../devel/gmake
BUILD_DEPENDS+=		doxygen-*:../../devel/doxygen
BUILD_DEPENDS+=		transfig-*:../../print/transfig
BUILD_DEPENDS+=		netpbm-*:../../graphics/netpbm

USE_BZIP2=		yes
HAS_CONFIGURE=		yes
CONFIGURE_ENV=		CC=${LOCALBASE}/bin/avr-gcc PREFIX=${PREFIX}
CONFIGURE_SCRIPT=	./doconf
CONFIGURE_ARGS=		--disable-versioned-doc --enable-html-doc --enable-doc

do-build:
	(cd ${WRKSRC}; ./domake MAKE=${GMAKE})

do-install:
	(cd ${WRKSRC}; ./domake MAKE=${GMAKE} install)
	${MKDIR} ${PREFIX}/share/doc/avr-libc
	${MKDIR} ${PREFIX}/share/doc/avr-libc/examples
	${MKDIR} ${PREFIX}/share/doc/avr-libc/examples/demo
	${MKDIR} ${PREFIX}/share/doc/avr-libc/examples/twitest
	${INSTALL_DATA} \
		${WRKSRC}/LICENSE \
		${WRKSRC}/AUTHORS \
		${PREFIX}/share/doc/avr-libc
	@for f in avr-recv.c io.c prg printf.h progmem.c \
		send_byte.s signal.c;\
	do \
		${INSTALL_DATA} ${WRKSRC}/doc/examples/$$f \
			${PREFIX}/share/doc/avr-libc/examples; \
	done
	(cd ${WRKSRC}/doc/examples/demo; ${GMAKE})
	(cd ${WRKSRC}/doc/examples/demo; ${GMAKE} dox)
	@for f in Makefile demo.c demo.bin demo.hex demo.pdf \
		demo.srec;\
	do \
		${INSTALL_DATA} ${WRKSRC}/doc/examples/demo/$$f \
			${PREFIX}/share/doc/avr-libc/examples/demo; \
	done
	@for f in Makefile twitest.c;\
	do \
		${INSTALL_DATA} ${WRKSRC}/doc/examples/twitest/$$f \
			${PREFIX}/share/doc/avr-libc/examples/twitest; \
	done

.include "../../mk/bsd.pkg.mk"