annotate src/libusb.mk @ 344:92708f27f90b

new package: libusb (by Mark Brand)
author Volker Grabsch <vog@notjusthosting.com>
date Thu, 21 May 2009 18:39:04 +0200
parents
children 630c4769a90d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
1 # LibUsb
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3 PKG := libusb
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 $(PKG)_VERSION := 0.1.12.1
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 $(PKG)_CHECKSUM := b13fd5a0042152bc5d5e538533aa93754fa472a7
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6 $(PKG)_SUBDIR := $(PKG)-win32-src-$($(PKG)_VERSION)
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7 $(PKG)_FILE := $(PKG)-win32-src-$($(PKG)_VERSION).tar.gz
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8 $(PKG)_WEBSITE := http://libusb-win32.sourceforge.net/
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libusb-win32/$($(PKG)_FILE)
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 $(PKG)_DEPS := gcc
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12 define $(PKG)_UPDATE
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13 wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=78138&package_id=79216' | \
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14 grep 'libusb-win32-src-' | \
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 $(SED) -n 's,.*libusb-win32-src-\([0-9][^>]*\)\.tar.*,\1,p' | \
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 head -1
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17 endef
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 define $(PKG)_BUILD
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20 # applications which use libusb need to be linked with
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 # -lusb -lusbd -lsetupapi -lntoskrnl
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 sed 's,\r$$,,' -i '$(1)/Makefile'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23 echo -e '$$(LIB_TARGET).a: $$(DLL_OBJECTS) $$(DRIVER_OBJECTS)' >> '$(1)/Makefile'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
24 echo -e '\t$$(AR) rc $$@ $$^' >> '$(1)/Makefile'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
25 echo -e '\t$$(host_prefix)ranlib $$@' >> '$(1)/Makefile'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26 $(MAKE) -C '$(1)' -j '$(JOBS)' host_prefix=$(TARGET) libusbd.a libusb.a
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28 $(INSTALL) -m664 '$(1)/src/usb.h' '$(PREFIX)/$(TARGET)/include/'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
30 $(INSTALL) -m664 '$(1)/libusb.a' '$(PREFIX)/$(TARGET)/lib/'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
31 $(INSTALL) -m664 '$(1)/libusbd.a' '$(PREFIX)/$(TARGET)/lib/'
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 endef