avrusbboot needs libgcc to compile correctly
[openwrt/svn-archive/archive.git] / utils / avrusbboot / Makefile
1 #
2 # Copyright (C) 2008 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:=avrusbboot
12 PKG_VERSION:=2006-06-25
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.fischl.de/avrusbboot/
17 PKG_MD5SUM:=3e2f5e2c257918410a66c3463f583fdf
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/avrusbboot
24 SECTION:=utils
25 CATEGORY:=Utilities
26 DEPENDS:=+libusb +uclibcxx +libgcc
27 TITLE:=USB bootloader for Atmel AVR controllers
28 URL:=http://www.fischl.de/avrusbboot/
29 endef
30
31 define Package/avrusbboot/description
32 AVRUSBBoot is a bootloader for the Atmel AVR controllers.
33 It uses a firmware-only USB driver to transfer binary data
34 from the PC to the flash of the controller. Once the AVR
35 is flashed with the bootloader, no other ISP programmer is
36 needed; then the microcontroller can be reprogrammed over USB.
37 endef
38
39 define Build/Configure
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR)/software \
44 CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/uClibc++" \
45 LFLAGS="-L$(STAGING_DIR)/usr/lib -nodefaultlibs -luClibc++ -lusb -lgcc_s" \
46 all
47 endef
48
49 define Package/avrusbboot/install
50 $(INSTALL_DIR) $(1)/usr/sbin
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/software/avrusbboot $(1)/usr/sbin/
52 endef
53
54 $(eval $(call BuildPackage,avrusbboot))