Mention "lpc4300" (with "lpc1800" alias) flash drivers in manual
[openocd.git] / testing / build.test2 / Makefile
blobd4c428edda7cc43c40e8c5df911d600e0b5ff88b
1 # -*- mode: makefile -*-
2 #========================================
3 # DO NOT DELETE THE LINE BELOW
4 _default: default
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
14 include ./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.
24 ftd2xx.download:
25 mkdir -p ${VIRGINS}
26 wget -O ${FTD2XX_ZIPFILE_LOCAL} \
27 ${FTD2XX_ZIPFILE_URL}
29 ftd2xx.unpack:
30 rm -rf ${FTD2XX_WIN32_DIR}
31 mkdir -p ${FTD2XX_WIN32_DIR}
32 cd ${FTD2XX_WIN32_DIR} && unzip \
33 ${FTD2XX_ZIPFILE_LOCAL}
35 ftd2xx.build:
36 @echo "Nothing to do for: $@"
38 ftd2xx.configure:
39 @echo "Nothing to do for: $@"
41 ftd2xx.install:
42 @echo "Nothing to do for: $@"
44 clean::
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 :-(
55 libconfuse.download:
56 mkdir -p virgins
57 wget -O ${LIBCONFUSE_TARFILE_LOCAL} \
58 ${LIBCONFUSE_TARFILE_URL}
60 libconfuse.unpack:
61 tar xfz ${LIBCONFUSE_TARFILE_LOCAL}
63 clean::
64 rm -rf ${LIBCONFUSE_SRC_DIR}
66 libconfuse.configure:
67 rm -rf ${LIBCONFUSE_BUILD_DIR}
68 mkdir -p ${LIBCONFUSE_BUILD_DIR}
69 cd ${LIBCONFUSE_BUILD_DIR} && \
70 ${LIBCONFUSE_SRC_DIR}/configure \
71 --prefix=${PREFIX}
73 clean::
74 rm -rf ${LIBCONFUSE_BUILD_DIR}
76 libconfuse.build:
77 cd ${LIBCONFUSE_BUILD_DIR} && ${MAKE}
79 libconfuse.install:
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.
89 libftdi.download:
90 mkdir -p virgins
91 wget -O ${LIBFTDI_TARFILE_LOCAL} \
92 ${LIBFTDI_TARFILE_URL}
94 libftdi.unpack:
95 tar xfz ${LIBFTDI_TARFILE_LOCAL}
97 clean::
98 rm -rf ${LIBFTDI_SRC_DIR}
100 libftdi.configure:
101 rm -rf ${LIBFTDI_BUILD_DIR}
102 mkdir -p ${LIBFTDI_BUILD_DIR}
103 cd ${LIBFTDI_BUILD_DIR} && \
104 ${LIBFTDI_SRC_DIR}/configure \
105 --prefix=${PREFIX}
107 clean::
108 rm -rf ${LIBFTDI_BUILD_DIR}
110 libftdi.build:
111 cd ${LIBFTDI_BUILD_DIR} && ${MAKE}
113 libftdi.install:
114 cd ${LIBFTDI_BUILD_DIR} && ${MAKE} install
116 libftdi.all: libftdi.unpack libftdi.configure \
117 libftdi.build libftdi.install
119 #========================================
120 # Openocd...
122 openocd.bootstrap:
123 cd ${OPENOCD_SRC_DIR} && bash ./bootstrap
125 openocd.configure:
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}
132 openocd.build:
133 cd ${OPENOCD_BUILD_DIR} && ${MAKE}
135 openocd.docs:
136 cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE}
138 openocd.docs.pdf:
139 cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE} pdf
141 openocd.docs.html:
142 cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE} html
144 # fixme:
145 # need to add a "make one huge html file target"
147 openocd.install:
148 cd ${OPENOCD_BUILD_DIR} && ${MAKE} install
150 #========================================
151 # The world...
153 # Manual step.
154 download.all: \
155 ftd2xx.download \
156 libconfuse.download \
157 libftdi.download
159 ifeq (x"${FT2232_DRIVER}",x"ftd2xx")
160 prebuild: ftd2xx.all
161 endif
163 ifeq (x"${FT2232_DRIVER}",x"libftdi")
164 prebuild: libconfuse.all libftdi.all
165 endif
167 remake: \
168 openocd.bootstrap \
169 openocd.configure \
170 openocd.build \
171 openocd.install
173 initial.build : download.all prebuild remake
175 all:
176 @echo ""
177 @echo " This makefile does not support an 'all' target"
178 @echo ""
179 @echo " If this is your *FIRST* time building... "
180 @echo " Then use this command: \"make initial.build\""
181 @echo ""
182 @echo " The \"default\" target is for openocd developers"
183 @echo " and rebuilds openocd completely.."
184 @echo ""
186 default:
187 test -d ${OPENOCD_SRC_DIR} || (echo "Where is: The OPENOCD source?"; exit 1)
188 ${MAKE} remake
190 whatis_%:
191 @echo ""
192 @echo "Makevariable: $* => ${${*}}"
193 @echo ""