1Simple install procedure 2======================== 3 4 % gzip -cd libusb-@LIBUSB_VERSION@.tar.gz | tar xvf - # unpack the sources 5 % cd libusb-@LIBUSB_VERSION@ # change to the toplevel directory 6 % ./configure # run the `configure' script 7 % make # build libusb 8 [ Become root if necessary ] 9 % make install # install libusb 10 11The Nitty-Gritty 12================ 13 14The 'configure' script can be given a number of options to enable 15and disable various features. For a complete list, type: 16 17 ./configure --help 18 19A few of the more important ones: 20 21* --prefix=PREFIX install architecture-independent files in PREFIX 22 [ Defaults to /usr/local ] 23 24* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 25 [ Defaults to the value given to --prefix ] 26 27Options can be given to the compiler and linker by setting 28environment variables before running configure. A few of the more 29important ones: 30 31 CC : The C compiler to use 32 CPPFLAGS : Flags for the C preprocesser such as -I and -D 33 CFLAGS : C compiler flags 34 35The most important use of this is to set the 36optimization/debugging flags. For instance, to compile with no 37debugging information at all, run configure as: 38 39 CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh) 40 41or, 42 43 setenv CFLAGS -O2 ; ./configure # csh and variants 44 45 46Installation directories 47======================== 48 49The location of the installed files is determined by the --prefix 50and --exec-prefix options given to configure. There are also more 51detailed flags to control individual directories. However, the 52use of these flags is not tested. 53 54A shell script libusb-config is created during the configure 55process, and installed in the bin/ directory 56($exec_prefix/bin). This is used to determine the location of libusb 57when building applications. If you move libusb after installation, 58it will be necessary to edit this file. 59 60