source: packages/utils/firmwarehotplug/Makefile @ 26475

Last change on this file since 26475 was 26475, checked in by thepeople, 5 years ago

account for more sdcc variants

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=firmwarehotplug
11PKG_VERSION:=0.1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/linux-hotplug
16PKG_MD5SUM:=e5cf352b172f498e27b160167b981f24
17
18PKG_INSTALL:=1
19PKG_BUILD_PARALLEL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23# workaround for fedora sdcc naming changes
24ifneq ($(wildcard /usr/libexec/sdcc),)
25  export PATH:=$(PATH):/usr/libexec
26endif
27
28define Package/firmwarehotplug
29  SECTION:=utils
30  CATEGORY:=Utilities
31  DEPENDS:=@USB_SUPPORT +fxload
32  TITLE:=Hotplug firmware for EZ-USB microcontrollers
33  URL:=http://linux-hotplug.sourceforge.net/
34endef
35
36MAKE_PATH:=ezusb/midi/original
37
38MAKE_FLAGS+=\
39        OPT="$(TARGET_CFLAGS)"
40
41define Package/firmwarehotplug/install
42        $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
43        install -m755 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi $(1)/etc/hotplug.d/usb
44        install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi.usermap $(1)/etc/hotplug.d
45        $(INSTALL_DIR) $(1)/usr/share/usb/ezusbmidi
46        install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi1x1.ihx $(1)/usr/share/usb/ezusbmidi
47        install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi2x2.ihx $(1)/usr/share/usb/ezusbmidi
48endef
49
50define Require/working-sdcc
51        sdcc -v 2>&1 | awk '($$$$1 == "SDCC") && ($$$$3 ~ "mcs51/gbz80/z80" && $$$$3 ~ "/ds390/pic16/pic14/TININative") { print "ok" }' | grep ok > /dev/null
52endef
53
54$(eval $(call RequireCommand,sdcc, \
55        $(PKG_NAME) requires the SDCC Cross Compiler (sdcc). \
56))
57
58$(eval $(call Require,working-sdcc, \
59        $(PKG_NAME) requires a SDCC Cross Compiler (sdcc) that supports the following targets : \
60        mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08. You might consider \
61        installing the non-free version. \
62))
63
64$(eval $(call BuildPackage,firmwarehotplug))
65
Note: See TracBrowser for help on using the repository browser.