1 # -*- mode: makefile -*-
2 #========================================
3 # DO NOT DELETE THE LINE BELOW
5 # DO NOT DELETE THE LINE_ABOVE
6 #========================================
8 #========================================
10 # There are no user configurable options here.
12 # All user configurable options are in local.uses
16 #========================================
18 #========================================
19 # This is the USB driver for the FTDI2XX chips.
20 # It is a "closed" solution from FTDICHIP.COM
21 # Some claim it is faster then the open/free
22 # solution: win32-libusb+libftdi.
26 wget
-O
${FTD2XX_ZIPFILE_LOCAL} \
30 rm -rf
${FTD2XX_WIN32_DIR}
31 mkdir
-p
${FTD2XX_WIN32_DIR}
32 cd
${FTD2XX_WIN32_DIR} && unzip \
33 ${FTD2XX_ZIPFILE_LOCAL}
36 @echo
"Nothing to do for: $@"
39 @echo
"Nothing to do for: $@"
42 @echo
"Nothing to do for: $@"
45 rm -rf
${FTD2XX_WIN32_DIR}
47 ftd2xx.
all: ftd2xx.unpack ftd2xx.configure \
48 ftd2xx.build ftd2xx.
install
51 #========================================-
52 # LIBFTDI - requires LIBCONFUSE..
53 # So we handle it here :-(
57 wget
-O
${LIBCONFUSE_TARFILE_LOCAL} \
58 ${LIBCONFUSE_TARFILE_URL}
61 tar xfz
${LIBCONFUSE_TARFILE_LOCAL}
64 rm -rf
${LIBCONFUSE_SRC_DIR}
67 rm -rf
${LIBCONFUSE_BUILD_DIR}
68 mkdir
-p
${LIBCONFUSE_BUILD_DIR}
69 cd
${LIBCONFUSE_BUILD_DIR} && \
70 ${LIBCONFUSE_SRC_DIR}/configure \
74 rm -rf
${LIBCONFUSE_BUILD_DIR}
77 cd
${LIBCONFUSE_BUILD_DIR} && ${MAKE}
80 cd
${LIBCONFUSE_BUILD_DIR} && ${MAKE} install
82 libconfuse.
all: libconfuse.unpack libconfuse.configure \
83 libconfuse.build libconfuse.
install
85 #========================================
86 # LIBFTDI - the open source (and free)
87 # alternative to (closed) FTD2XX drivers.
91 wget
-O
${LIBFTDI_TARFILE_LOCAL} \
92 ${LIBFTDI_TARFILE_URL}
95 tar xfz
${LIBFTDI_TARFILE_LOCAL}
98 rm -rf
${LIBFTDI_SRC_DIR}
101 rm -rf
${LIBFTDI_BUILD_DIR}
102 mkdir
-p
${LIBFTDI_BUILD_DIR}
103 cd
${LIBFTDI_BUILD_DIR} && \
104 ${LIBFTDI_SRC_DIR}/configure \
108 rm -rf
${LIBFTDI_BUILD_DIR}
111 cd
${LIBFTDI_BUILD_DIR} && ${MAKE}
114 cd
${LIBFTDI_BUILD_DIR} && ${MAKE} install
116 libftdi.
all: libftdi.unpack libftdi.configure \
117 libftdi.build libftdi.
install
119 #========================================
123 cd
${OPENOCD_SRC_DIR} && bash .
/bootstrap
126 rm -rf
${OPENOCD_BUILD_DIR}
127 mkdir
-p
${OPENOCD_BUILD_DIR}
128 cd
${OPENOCD_BUILD_DIR} && ${OPENOCD_SRC_DIR}/configure \
129 --prefix=${INSTALL_DIR} \
130 ${OPENOCD_CONFIG_OPTIONS}
133 cd
${OPENOCD_BUILD_DIR} && ${MAKE}
136 cd
${OPENOCD_BUILD_DIR}/docs
&& ${MAKE}
139 cd
${OPENOCD_BUILD_DIR}/docs
&& ${MAKE} pdf
142 cd
${OPENOCD_BUILD_DIR}/docs
&& ${MAKE} html
145 # need to add a "make one huge html file target"
148 cd
${OPENOCD_BUILD_DIR} && ${MAKE} install
150 #========================================
156 libconfuse.download \
159 ifeq (x
"${FT2232_DRIVER}",x
"ftd2xx")
163 ifeq (x
"${FT2232_DRIVER}",x
"libftdi")
164 prebuild
: libconfuse.
all libftdi.
all
173 initial.build
: download.
all prebuild remake
177 @echo
" This makefile does not support an 'all' target"
179 @echo
" If this is your *FIRST* time building... "
180 @echo
" Then use this command: \"make initial.build\""
182 @echo
" The \"default\" target is for openocd developers"
183 @echo
" and rebuilds openocd completely.."
187 test -d
${OPENOCD_SRC_DIR} ||
(echo
"Where is: The OPENOCD source?"; exit
1)
192 @echo
"Makevariable: $* => ${${*}}"