[droid/depends] - add libusb to the buildsystem
authorMemphiz <memphis@machzwo.de>
Thu, 1 Nov 2012 19:21:20 +0000 (20:21 +0100)
committerMemphiz <memphis@machzwo.de>
Thu, 1 Nov 2012 19:22:29 +0000 (20:22 +0100)
tools/android/depends/Makefile.in
tools/android/depends/libusb/Makefile [new file with mode: 0644]

index 26b5f81..8e93c6b 100644 (file)
@@ -13,7 +13,7 @@ SUBDIRS = \
        python26-native python26 samba alsa-lib libcdio afpfs-ng libshairport \
        libplist libcec libbluray boost tinyxml dummy-libxbmc libsdl \
        liblzo2-native libjpeg-turbo-native libpng-native tiff-native libsdl_image rpl \
-       libamplayer libssh taglib swig-native pcre-native xbmc-pvr-addons
+       libamplayer libssh taglib swig-native pcre-native xbmc-pvr-addons libusb
 
 .PHONY: buildtools $(BUILDTOOLS) subdirs $(SUBDIRS) arm
 
diff --git a/tools/android/depends/libusb/Makefile b/tools/android/depends/libusb/Makefile
new file mode 100644 (file)
index 0000000..8626c80
--- /dev/null
@@ -0,0 +1,40 @@
+include ../Makefile.include
+DEPS= ../Makefile.include Makefile
+
+# lib name, version
+LIBNAME=libusb
+VERSION=0.1.12
+SOURCE=$(LIBNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
+
+# configuration settings
+CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
+          ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared
+
+LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+all: $(LIBDYLIB) .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+       $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+       rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+       $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+       cd $(PLATFORM); $(CONFIGURE)
+
+$(LIBDYLIB): $(PLATFORM)
+       $(MAKE) -C $(PLATFORM)
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+       $(MAKE) -C $(PLATFORM) install
+       touch $@
+
+clean:
+       $(MAKE) -C $(PLATFORM) clean
+       rm -f .installed-$(PLATFORM)
+
+distclean::
+       rm -rf $(PLATFORM) .installed-$(PLATFORM)