port serdisplib to buildroot-ng
[openwrt/svn-archive/archive.git] / libs / serdisplib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=serdisplib
12 PKG_VERSION:=1.96
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/serdisplib
18 PKG_MD5SUM:=b074e02d8d63f34cba8ec45c23f63f78
19 PKG_CAT:=zcat
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/serdisplib
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=A display control library
27 DESCRIPTION:=A display control library.\\\
28 serdisplib is a library to drive serial and parallel displays \\\
29 with built-in controllers.
30 URL:=http://serdisplib.sourceforge.net/
31 endef
32
33 define Build/Configure
34 (cd $(PKG_BUILD_DIR); \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)" \
37 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
38 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
39 ac_cv_func_malloc_0_nonnull=yes \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --enable-shared \
61 --disable-static \
62 --with-gnu-ld \
63 );
64 endef
65
66 define Build/Compile
67 $(MAKE) -C $(PKG_BUILD_DIR) all
68 endef
69
70 define Package/serdisplib/install
71 install -d -m0755 $(1)/usr/lib
72 $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.so.* $(1)/usr/lib
73 endef
74
75 define Build/InstallDev
76 mkdir -p $(STAGING_DIR)/usr/include
77 $(CP) $(PKG_BUILD_DIR)/include/serdisplib $(STAGING_DIR)/usr/include/
78 mkdir -p $(STAGING_DIR)/usr/lib
79 $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.{a,so*} $(STAGING_DIR)/usr/lib/
80 endef
81
82 define Build/UninstallDev
83 rm -rf \
84 $(STAGING_DIR)/usr/include/serdisplib \
85 $(STAGING_DIR)/usr/lib/libserdisp.{a,so*}
86 endef
87
88 $(eval $(call BuildPackage,serdisplib))