linux_usbfs: Gracefully handle buggy devices with a configuration 0
[platform/upstream/libusb.git] / Makefile.am
1 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
2 ACLOCAL_AMFLAGS = -I m4
3 EXTRA_DIST = INSTALL_WIN.txt PORTING doc/libusb.png \
4              android msvc Xcode
5 SUBDIRS = libusb
6
7 if BUILD_EXAMPLES
8 SUBDIRS += examples
9 endif
10
11 if BUILD_TESTS
12 SUBDIRS += tests
13 endif
14
15 pkgconfigdir = $(libdir)/pkgconfig
16 pkgconfig_DATA = libusb-1.0.pc
17
18 # The package name is libusb-1.0, but we want the distribution
19 # to be created as libusb-x.y.z instead of libusb-1.0-x.y.z
20 distdir = libusb-$(VERSION)
21
22 # Ensure any generated docs are cleaned out
23 # We need this here because make does not recurse into doc/
24 clean-local:
25         rm -rf doc/$(DOXYGEN_HTMLDIR)
26
27 # Use dist-hook to accomplish the following things for the dist recipe:
28 #   1) Remove the GitHub Markdown from the README file
29 #   2) Remove the .gitattributes file from the msvc directory
30 dist-hook:
31         chmod u+w $(distdir)/README $(distdir)/msvc
32         $(SED) -i.orig -e '/Build Status/d' $(distdir)/README
33         $(SED) -i.orig -e '/^$$/N;/^\n$$/D' $(distdir)/README
34         $(SED) -i.orig -e 's/\[\([A-Z]*\)\](\1)/\1/' $(distdir)/README
35         rm -f $(distdir)/README.orig
36         rm -f $(distdir)/msvc/.gitattributes
37
38 reldir = .release/$(distdir)
39 sfurl = frs.sourceforge.net:/home/frs/project/libusb/libusb-1.0
40 .PHONY: dist-upload
41 dist-upload: dist
42         rm -rf $(reldir)
43         mkdir -p $(reldir)
44         cp $(distdir).tar.bz2 $(reldir)
45         if [ -z "$$SF_USER" ]; then \
46                 rsync -rv $(reldir) $(sfurl); \
47         else \
48                 rsync -rv $(reldir) $$SF_USER@$(sfurl); \
49         fi
50         rm -rf $(reldir)