annotate src/libusb.mk @ 1673:1fd11f5b06b5

update package libusb
author Mark Brand <mabrand@mabrand.nl>
date Thu, 17 Mar 2011 23:47:39 +0100
parents 9e587ca588dc
children 9bf80b4a4780
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
641
dab071eac9c0 simplified file markers
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
1 # This file is part of mingw-cross-env.
714
29f1ba4559ae point consequently to "doc/index.html" instead of "doc/index.html or doc/README"
Volker Grabsch <vog@notjusthosting.com>
parents: 641
diff changeset
2 # See doc/index.html for further information.
414
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 409
diff changeset
3
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 # LibUsb
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 PKG := libusb
448
e9afec55fd6b improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents: 422
diff changeset
6 $(PKG)_IGNORE :=
1673
1fd11f5b06b5 update package libusb
Mark Brand <mabrand@mabrand.nl>
parents: 1499
diff changeset
7 $(PKG)_VERSION := 1.2.3.0
1fd11f5b06b5 update package libusb
Mark Brand <mabrand@mabrand.nl>
parents: 1499
diff changeset
8 $(PKG)_CHECKSUM := 9418390426be56a427cb0115993ca4ae82b986a4
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 $(PKG)_SUBDIR := $(PKG)-win32-src-$($(PKG)_VERSION)
1499
9e587ca588dc remove $($PKG)_SUBDIR) from FILE and URL defintions
Mark Brand <mabrand@mabrand.nl>
parents: 1470
diff changeset
10 $(PKG)_FILE := $(PKG)-win32-src-$($(PKG)_VERSION).zip
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 $(PKG)_WEBSITE := http://libusb-win32.sourceforge.net/
1466
2726fbef533c improved update script of all remaining SourceForge packages
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
12 $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)-win32/$(PKG)-win32-releases/$($(PKG)_VERSION)/$($(PKG)_FILE)
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13 $(PKG)_DEPS := gcc
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 define $(PKG)_UPDATE
1466
2726fbef533c improved update script of all remaining SourceForge packages
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
16 wget -q -O- 'http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/' | \
2726fbef533c improved update script of all remaining SourceForge packages
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
17 $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
2726fbef533c improved update script of all remaining SourceForge packages
Volker Grabsch <vog@notjusthosting.com>
parents: 1390
diff changeset
18 head -1
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 endef
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 define $(PKG)_BUILD
363
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
22 # convert DOS line endings
759
bf4bcb3370fa changed coding style: make "-i" always the first argument of $(SED) (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
23 $(SED) -i 's,\r$$,,' '$(1)/Makefile'
363
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
24
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
25 # don't actually build the library (DLL file),
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
26 # just create the DLL import stubs
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
27 $(MAKE) -C '$(1)' -j '$(JOBS)' host_prefix=$(TARGET) libusbd.a
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
28 cd '$(1)' && $(TARGET)-dlltool \
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
29 --dllname libusb0.dll \
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
30 --kill-at \
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
31 --add-stdcall-underscore \
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
32 --def libusb0.def \
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
33 --output-lib libusb.a
630c4769a90d don't use static linking for package libusb
Volker Grabsch <vog@notjusthosting.com>
parents: 344
diff changeset
34
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
35 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
1390
7fae546007a1 fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents: 1120
diff changeset
36 $(INSTALL) -m644 '$(1)/src/usb.h' '$(PREFIX)/$(TARGET)/include/'
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
37 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
1390
7fae546007a1 fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents: 1120
diff changeset
38 $(INSTALL) -m644 '$(1)/libusb.a' '$(PREFIX)/$(TARGET)/lib/'
7fae546007a1 fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents: 1120
diff changeset
39 $(INSTALL) -m644 '$(1)/libusbd.a' '$(PREFIX)/$(TARGET)/lib/'
344
92708f27f90b new package: libusb (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40 endef