psoc4: support for Cypress PSoC 41xx/42xx family
[openocd.git] / testing / build.test1 / Makefile.openocd
1 # -*- mode: makefile -*-
2 #
3 default: _complain_
4
5 include ./local.uses
6
7
8 SRC_DIR ?= $(HERE)/openocd
9 BUILD_SUFFIX ?= $(BUILD_MACHINE)
10 BUILD_DIR =$(HERE)/openocd.$(BUILD_SUFFIX)
11
12 checkout:
13 svn co https://svn.berlios.de/svnroot/repos/openocd/trunk openocd
14
15 remove.install:
16 rm -rf ${INSTALL_DIR}
17
18 #========================================
19 # Win32 Build Permutations
20 # none
21 # parport
22 # ftd2xx - (ftdichip)
23 # libftd
24 CONFIG_OPTIONS_win32_none =
25 CONFIG_OPTIONS_win32_parport = --enable-parport
26 CONFIG_OPTIONS_win32_ftd2xx = --enable-parport --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=$(FTD2XX_WIN32_DIR)
27
28 CYGWIN_EASY_PERMUTATIONS += none
29 CYGWIN_EASY_PERMUTATIONS += parport
30 CYGWIN_EASY_PERMUTATIONS += ftd2xx
31
32 MINGW32_EASY_PERMUTATIONS += none
33 MINGW32_EASY_PERMUTATIONS += parport
34 MINGW32_EASY_PERMUTATIONS += ftd2xx
35
36
37 # This is not a possible permutation, it is manual :-(
38 # Why? Because "libftdi" installs things into install/include
39 # which would efect the 'ftd2xx' win32 build
40 CONFIG_OPTIONS_win32_libftdi = --enable-parport --enable-ft2232_libftdi
41
42 # Default build for win32... is the ftd2xx type build.
43 PERMUTE_win32 ?= ftd2xx
44 CONFIG_OPTIONS_win32 ?= $(CONFIG_OPTIONS_win32_$(PERMUTE_win32))
45 CONFIG_OPTIONS_cygwin = $(CONFIG_OPTIONS_win32)
46 CONFIG_OPTIONS_mingw32 = $(CONFIG_OPTIONS_win32)
47
48 #========================================
49 # Linux Build Permuatations
50 # none
51 # parport
52 # ft2232_ftd2xx
53 # ft2232_libftdi
54 CONFIG_OPTIONS_linux_none =
55 LINUX_EASY_PERMUTATIONS += none
56
57 CONFIG_OPTIONS_linux_parport = --enable-parport
58 LINUX_EASY_PERMUTATIONS += parport
59
60 CONFIG_OPTIONS_linux_ft2232_libftdi = --enable-parport --enable-ft2232-libftdi
61 #this cannot be done as part of the permutations.
62 #LINUX_EASY_PERMUTATIONS += ft2232_libftdi
63
64 CONFIG_OPTIONS_linux_ft2232_ftd2xx_static = \
65 --enable-parport \
66 --enable-ft2232-ftd2xx --with-ftd2xx-lib=static --with-ftd2xx-linux-tardir=$(FTD2XX_LINUX_DIR)
67 LINUX_EASY_PERMUTATIONS += ft2232_ftd2xx_static
68
69 # this is not a possible permutation it is manual :-(
70 # why? because it interfers with the other permutations
71 # by "installing files" in the $(INSTALL_DIR)
72 CONFIG_OPTIONS_linux_ftd2xx_installed = \
73 --enable-parport \
74 --enable-ft2232-ftd2xx \
75 --with-ftd2xx-lib=shared
76
77 # The default build permutation is
78 PERMUTE_linux ?= ft2232_ftd2xx_static
79 CONFIG_OPTIONS_linux = $(CONFIG_OPTIONS_linux_$(PERMUTE_linux))
80
81 CONFIG_OPTIONS_darwin=\
82 --enable-ftd2232-libftdi
83
84 # Which build are we doing?
85 CONFIG_OPTIONS := $(CONFIG_OPTIONS_$(BUILD_SYSNAME))
86
87 bootstrap:
88 cd $(SRC_DIR) && bash ./bootstrap
89
90 clean::
91 rm -rf $(BUILD_DIR)
92
93 ifndef CFLAGS
94 _CFLAGS=true
95 else
96 _CFLAGS=export CFLAGS="${CFLAGS}"
97 endif
98
99
100 # if this was given... then pass it on
101 configure:
102 @echo " Build Sysname: $(BUILD_SYSNAME)"
103 @echo " Config Options: $(CONFIG_OPTIONS)"
104 rm -rf $(BUILD_DIR)
105 mkdir $(BUILD_DIR)
106 ${_CFLAGS} && \
107 cd $(BUILD_DIR) && \
108 $(SRC_DIR)/configure \
109 --prefix=$(PREFIX) \
110 --exec-prefix=$(EXEC_PREFIX) \
111 $(CONFIG_OPTIONS)
112
113 build:
114 cd $(BUILD_DIR) && $(MAKE)
115
116 install:
117 cd $(BUILD_DIR) && $(MAKE) install
118
119 all: configure build install
120
121 .PHONY: install
122
123 # The "cygwin.libftdi" requires that libftdi be built
124 # and installed *PRIOR* to running this target.
125 # it is not part of the permutations because ...
126 # it interfers with the ftd2xx based builds
127 cygwin.libftdi:
128 $(MAKE) -f Makefile.openocd bootstrap
129 $(MAKE) BUILD_SUFFIX=$@ PERMUTE_win32=libftdi -f Makefile.openocd all
130
131 cygwin.easy.permutations: remove.install ${CYGWIN_EASY_PERMUTATIONS:%=_cygwin.%}
132
133 _cygwin.%:
134 @echo ""
135 @echo ""
136 @echo "========================================"
137 @echo "Permutation Build... $@"
138 @echo "========================================"
139 @echo ""
140 @echo ""
141 $(MAKE) PERMUTE_win32=$* BUILD_SUFFIX=cygwin.$* -f Makefile.openocd all
142 $(EXEC_PREFIX)/bin/openocd -v
143
144 mingw32.easy.permutations: remove.install ${MINGW32_EASY_PERMUTATIONS:%=_mingw32.%}
145
146 # I (duane) build openocd-mingw32 via Cygwin.
147 # Sadly, the "mingw32" buid for cygwin does not include
148 # the required "elf.h" header files... so ...
149 # we have them in our own private helper place.
150 _mingw32.%:
151 @echo ""
152 @echo ""
153 @echo "========================================"
154 @echo "Permutation Build... $@"
155 @echo "========================================"
156 @echo ""
157 @echo ""
158 CFLAGS="-mno-cygwin -I$(HERE)/mingw32_help/include" \
159 $(MAKE) -f Makefile.openocd all ;\
160 $(EXEC_PREFIX)/bin/openocd -v
161
162 win32.permutations: mingw32.permutations cygwin.permutations
163
164
165 # SMOKE TEST - Build every linux permuation...
166 # If "openocd -v" does exit(0) we are good enough.
167
168 linux.easy.permutations: remove.install ${LINUX_EASY_PERMUTATIONS:%=_linux.%}
169
170
171 _linux.%:
172 @echo ""
173 @echo ""
174 @echo "========================================"
175 @echo "Permutation Build... $@"
176 @echo "========================================"
177 @echo ""
178 @echo ""
179 $(MAKE) PERMUTE_linux=$* BUILD_SUFFIX=linux.$* -f Makefile.openocd all
180 $(EXEC_PREFIX)/bin/openocd -v
181
182 linux.ftd2xx_installed:
183 ${MAKE} -f Makefile.openocd _$@
184
185 linux.ft2232_libftdi:
186 ${MAKE} -f Makefile.openocd _$@
187
188 _complain_:
189 @echo ""
190 @echo "Please try one of these targets: bootstrap, clean, configure, build, install"
191 @echo " Or read the makefile and learn about the permutation test targets"
192 @echo ""
193 @exit 1

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)