Added documentation for build test case1
[openocd.git] / testing / build.test1 / Makefile.libusb
blob815592a189c2d28c30a671355f894d878fe3facb
1 # -*- mode: makefile -*-
2 default: _complain_
4 include ./local.uses
6 ifeq (x"$BUILD_SYSNAME",x"cygwin")
7 $(error Please use the Win32 specific port of LibUSB not the Unix version)
8 endif
9 ifeq (x"$BUILD_SYSNAME",x"mingw32")
10 $(error Please use the win32 specific port of LibUSB not the Unix version)
11 endif 
13 TARFILE_LOCAL    = ${VIRGINS}/libusb-${LIBUSB_VERSION_linux}.tar.bz2
14 TARFILE_URL      = http://downloads.sourceforge.net/libusb/libusb-${LIBUSB_VERSION_linux}.tar.gz
16 LIBUSB_SRC_DIR   = ${HERE}/libusb-${LIBUSB_VERSION}
17 LIBUSB_BUILD_DIR = ${HERE}/libusb-build
19 download:
20         wget -O ${TARFILE_LOCAL} ${TARFILE_URL}
22 unpack:
23         rm -rf ${LIBUSB_SRC_DIR}
24         tar xfz ${TARFILE_LOCAL}
26 clean::
27         rm -rf ${LIBUSB_SRC_DIR}
29 configure:
30         rm -rf ${LIBUSB_BUILD_DIR}
31         mkdir -p ${LIBUSB_BUILD_DIR}
32         cd ${LIBUSB_BUILD_DIR} && ${LIBUSB_SRC_DIR}/configure \
33                 --prefix=${PREFIX} --exec-prefix=${EXEC_PREFIX}
35 clean::
36         rm -rf ${LIBUSB_BUILD_DIR}
38 build:
39         cd ${LIBUSB_BUILD_DIR} && ${MAKE}
41 install: 
42         cd ${LIBUSB_BUILD_DIR} && ${MAKE} install
44 all: unpack configure build install
46 .PHONY: install
48 _complain_:
49         @echo ""
50         @echo "Please try one of these targets: bootstrap, clean, configure, build, install"
51         @echo " Or read the makefile and learn about the permutation test targets"
52         @echo ""
53         @echo "You also might find the download and unpack targets helpful."
54         @echo ""
55         @exit 1