summaryrefslogtreecommitdiffstats
path: root/src/libusb.mk
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2009-06-06 15:11:31 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2009-06-06 15:11:31 (GMT)
commit32beacdfb9ea8426d7015e0bc3df083496ff559b (patch)
tree4a0115b2acb751a571dee61a26ac7db8f388e6f1 /src/libusb.mk
parentf34c9001838abad06522a9899f4e1184f94477a8 (diff)
downloadmxe-32beacdfb9ea8426d7015e0bc3df083496ff559b.zip
mxe-32beacdfb9ea8426d7015e0bc3df083496ff559b.tar.gz
mxe-32beacdfb9ea8426d7015e0bc3df083496ff559b.tar.bz2
don't use static linking for package libusb
Diffstat (limited to 'src/libusb.mk')
-rw-r--r--src/libusb.mk18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libusb.mk b/src/libusb.mk
index ce0191f..a566ab8 100644
--- a/src/libusb.mk
+++ b/src/libusb.mk
@@ -17,13 +17,19 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
- # applications which use libusb need to be linked with
- # -lusb -lusbd -lsetupapi -lntoskrnl
+ # convert DOS line endings
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
+
+ # don't actually build the library (DLL file),
+ # just create the DLL import stubs
+ $(MAKE) -C '$(1)' -j '$(JOBS)' host_prefix=$(TARGET) libusbd.a
+ cd '$(1)' && $(TARGET)-dlltool \
+ --dllname libusb0.dll \
+ --kill-at \
+ --add-stdcall-underscore \
+ --def libusb0.def \
+ --output-lib libusb.a
+
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m664 '$(1)/src/usb.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'