diff options
author | Volker Grabsch <vog@notjusthosting.com> | 2009-05-21 16:39:04 (GMT) |
---|---|---|
committer | Volker Grabsch <vog@notjusthosting.com> | 2009-05-21 16:39:04 (GMT) |
commit | a2a46f7ac8bc0e964cec0a73fdbc71b826300211 (patch) | |
tree | b8792cb3962f86d39c146e2fa62b7a2922449fc8 /src/libusb.mk | |
parent | 33cbaad5a3ff580ea825e47c61cb024122b203c5 (diff) | |
download | mxe-a2a46f7ac8bc0e964cec0a73fdbc71b826300211.zip mxe-a2a46f7ac8bc0e964cec0a73fdbc71b826300211.tar.gz mxe-a2a46f7ac8bc0e964cec0a73fdbc71b826300211.tar.bz2 |
new package: libusb (by Mark Brand)
Diffstat (limited to 'src/libusb.mk')
-rw-r--r-- | src/libusb.mk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libusb.mk b/src/libusb.mk new file mode 100644 index 0000000..ce0191f --- /dev/null +++ b/src/libusb.mk @@ -0,0 +1,32 @@ +# LibUsb + +PKG := libusb +$(PKG)_VERSION := 0.1.12.1 +$(PKG)_CHECKSUM := b13fd5a0042152bc5d5e538533aa93754fa472a7 +$(PKG)_SUBDIR := $(PKG)-win32-src-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-win32-src-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://libusb-win32.sourceforge.net/ +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libusb-win32/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=78138&package_id=79216' | \ + grep 'libusb-win32-src-' | \ + $(SED) -n 's,.*libusb-win32-src-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # applications which use libusb need to be linked with + # -lusb -lusbd -lsetupapi -lntoskrnl + sed 's,\r$$,,' -i '$(1)/Makefile' + echo -e '$$(LIB_TARGET).a: $$(DLL_OBJECTS) $$(DRIVER_OBJECTS)' >> '$(1)/Makefile' + echo -e '\t$$(AR) rc $$@ $$^' >> '$(1)/Makefile' + echo -e '\t$$(host_prefix)ranlib $$@' >> '$(1)/Makefile' + $(MAKE) -C '$(1)' -j '$(JOBS)' host_prefix=$(TARGET) libusbd.a libusb.a + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m664 '$(1)/src/usb.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -m664 '$(1)/libusb.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -m664 '$(1)/libusbd.a' '$(PREFIX)/$(TARGET)/lib/' +endef |