Adding lirc package to buildroot
Dely Nicolas
Nicolas.Dely at thomson.net
Tue Oct 4 16:31:43 UTC 2005
Hi,
I would like to add support for lirc in buildroot, so I try to start
from foo.mk but since lirc configure script is a ncurses menu, another
way be better? as busybox entry in buildroot menuconfig.
I've attached lirc Config.in and lirc.mk, if someone is interested.
Configure part of lirc.mk is a little bit dirty because there are static
args Need improvement :-(
Thanks
Nicolas
-------------- next part --------------
#############################################################
#
# zlib
#
#############################################################
LIRC_VER=0.7.2
LIRC_SOURCE=lirc-$(LIRC_VER).tar.bz2
LIRC_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/lirc
LIRC_DIR=$(BUILD_DIR)/lirc-$(LIRC_VER)
LIRC_CFLAGS=$(TARGET_CFLAGS)
LIRC_DAEMON=lircd
LIRC_TARGET_DAEMON=usr/sbin/lircd
$(DL_DIR)/$(LIRC_SOURCE):
$(WGET) -P $(DL_DIR) $(LIRC_SITE)/$(LIRC_SOURCE)
$(LIRC_DIR)/.source: $(DL_DIR)/$(LIRC_SOURCE)
bzcat $(DL_DIR)/$(LIRC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(LIRC_DIR) package/lirc/ lirc\*.patch
touch $(LIRC_DIR)/.source
$(LIRC_DIR)/.configured: $(LIRC_DIR)/.source
(cd $(LIRC_DIR); \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--shared \
--prefix=/usr \
--exec-prefix=$(STAGING_DIR)/usr/bin \
--libdir=$(STAGING_DIR)/lib \
--includedir=$(STAGING_DIR)/include \
--without-x \
--with-driver=tira \
--with-major=61 \
--with-port=none \
--with-irq=none \
);
touch $(LIRC_DIR)/.configured;
$(LIRC_DIR)/daemons/$(LIRC_DAEMON): $(LIRC_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LIRC_DIR)
$(TARGET_DIR)/$(LIRC_TARGET_DAEMON): $(LIRC_DIR)/daemons/$(LIRC_DAEMON)
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIRC_DIR) install
rm -Rf $(TARGET_DIR)/usr/man
lirc: uclibc ncurses $(TARGET_DIR)/$(LIRC_TARGET_DAEMON)
lirc-source: $(DL_DIR)/$(LIRC_SOURCE)
lirc-clean:
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(TARGET_DIR) uninstall
-$(MAKE) -C $(TARGET_DIR) clean
lirc-dirclean:
rm -rf $(TARGET_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_LIRC)),y)
TARGETS+=lirc
endif
#ifeq ($(strip $(BR2_PACKAGE_LIRC_TARGET_HEADERS)),y)
#TARGETS+=lirc-headers
#endif
-------------- next part --------------
config BR2_PACKAGE_LIRC
bool "lirc"
default n
help
LIRC is a package that allows you to decode and send
infra-red signals of many (but not all) commonly used
remote controls.
http://www.lirc.org/
More information about the uClibc
mailing list