summaryrefslogtreecommitdiff
path: root/package/fbset/Makefile
blob: 7aa761ddfbe1a7d7d70bc1de59da068e81ece978 (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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		fbset
PKG_VERSION:=		2.1
PKG_RELEASE:=		2
PKG_MD5SUM:=		e547cfcbb8c1a4f2a6b8ba4acb8b7164
PKG_DESCR:=		framebuffer utility
PKG_DEPENDS:=		bison-host flex-host
PKG_SECTION:=		utils
PKG_SITES:=		http://users.telenet.be/geertu/Linux/fbdev/
PKG_BB:=		1

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz

PKG_LIBC_DEPENDS:=	uclibc glibc

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,FBSET,fbset,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

CONFIG_STYLE:=		manual
BUILD_STYLE:=		manual
INSTALL_STYLE:=		manual

do-build:
	(cd ${WRKSRC} && PATH='${HOST_PATH}' bison -d modes.y)
	(cd ${WRKSRC} && PATH='${HOST_PATH}' flex modes.l)
	${TARGET_CC} ${TARGET_CFLAGS} -I${WRKBUILD} -c -o \
		${WRKBUILD}/modes.tab.o ${WRKSRC}/modes.tab.c
	${TARGET_CC} ${TARGET_CFLAGS} -I${WRKBUILD} -c -o \
		${WRKBUILD}/lex.yy.o ${WRKSRC}/lex.yy.c
	${TARGET_CC} ${TARGET_CFLAGS} -I${WRKBUILD} -c -o \
		${WRKBUILD}/fbset.o ${WRKSRC}/fbset.c
	${TARGET_CC} ${TARGET_CFLAGS} -o ${WRKBUILD}/fbset \
		${WRKBUILD}/fbset.o \
		${WRKBUILD}/modes.tab.o \
		${WRKBUILD}/lex.yy.o

do-install:
	${INSTALL_DIR} ${IDIR_FBSET}/usr/bin
	${INSTALL_DIR} ${IDIR_FBSET}/etc
	${CP} ${WRKBUILD}/fbset ${IDIR_FBSET}/usr/bin
	${CP} ./files/fb.modes ${IDIR_FBSET}/etc

include ${TOPDIR}/mk/pkg-bottom.mk