]>
Commit | Line | Data |
---|---|---|
62c82025 | 1 | ## |
50985c20 | 2 | ## This file is part of the libsigrok project. |
62c82025 | 3 | ## |
c73d2ea4 | 4 | ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com> |
d375b3c3 | 5 | ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> |
62c82025 | 6 | ## |
a1bb33af UH |
7 | ## This program is free software: you can redistribute it and/or modify |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation, either version 3 of the License, or | |
10 | ## (at your option) any later version. | |
62c82025 | 11 | ## |
a1bb33af UH |
12 | ## This program is distributed in the hope that it will be useful, |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
62c82025 | 16 | ## |
a1bb33af UH |
17 | ## You should have received a copy of the GNU General Public License |
18 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
62c82025 | 19 | ## |
a1bb33af | 20 | |
ea1d5351 | 21 | ACLOCAL_AMFLAGS = -I m4 |
ba1c29dc | 22 | AM_LIBTOOLFLAGS = --silent |
ba1c29dc DE |
23 | |
24 | FIRMWARE_DIR = $(datadir)/sigrok-firmware | |
826938d8 | 25 | |
9ac018d0 | 26 | local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. |
1f61c22f | 27 | if BINDINGS_CXX |
4cf2f34f | 28 | local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx |
1f61c22f DE |
29 | endif |
30 | # Ensure that local include directories are always searched first. | |
5b869e97 | 31 | AM_CPPFLAGS = $(local_includes) -D_POSIX_C_SOURCE=200112L -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' |
340f6e7a | 32 | |
65489c1a | 33 | # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the |
1f61c22f | 34 | # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. |
65489c1a | 35 | AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) |
4cf2f34f | 36 | AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS) |
1f61c22f | 37 | |
8a7b47cd | 38 | lib_LTLIBRARIES = libsigrok.la |
a1bb33af | 39 | |
67bd8055 | 40 | # Backend files |
a695d6c0 | 41 | libsigrok_la_SOURCES = \ |
155b680d BV |
42 | src/backend.c \ |
43 | src/device.c \ | |
44 | src/session.c \ | |
45 | src/session_file.c \ | |
46 | src/session_driver.c \ | |
47 | src/drivers.c \ | |
48 | src/hwdriver.c \ | |
49 | src/trigger.c \ | |
50 | src/soft-trigger.c \ | |
fb019a0e | 51 | src/analog.c \ |
24287ea9 | 52 | src/fallback.c \ |
155b680d BV |
53 | src/strutil.c \ |
54 | src/log.c \ | |
55 | src/version.c \ | |
56 | src/error.c \ | |
57 | src/std.c | |
960a75e4 | 58 | |
155b680d BV |
59 | # Input modules |
60 | libsigrok_la_SOURCES += \ | |
155b680d | 61 | src/input/input.c \ |
b84cba4d | 62 | src/input/binary.c \ |
02e24c0c | 63 | src/input/chronovu_la8.c \ |
41d214f6 | 64 | src/input/csv.c \ |
7db06394 | 65 | src/input/vcd.c \ |
155b680d | 66 | src/input/wav.c |
67bd8055 | 67 | |
155b680d BV |
68 | # Output modules |
69 | libsigrok_la_SOURCES += \ | |
70 | src/output/output.c \ | |
71 | src/output/analog.c \ | |
72 | src/output/ascii.c \ | |
73 | src/output/bits.c \ | |
74 | src/output/binary.c \ | |
75 | src/output/csv.c \ | |
76 | src/output/chronovu_la8.c \ | |
afaa75b9 | 77 | src/output/wav.c \ |
155b680d BV |
78 | src/output/gnuplot.c \ |
79 | src/output/hex.c \ | |
80 | src/output/ols.c \ | |
3250d8c7 | 81 | src/output/srzip.c \ |
155b680d | 82 | src/output/vcd.c |
67bd8055 | 83 | |
988357ca UH |
84 | # Transform modules |
85 | libsigrok_la_SOURCES += \ | |
39f1752e | 86 | src/transform/transform.c \ |
43caa466 | 87 | src/transform/nop.c \ |
d74d30bb UH |
88 | src/transform/scale.c \ |
89 | src/transform/invert.c | |
988357ca | 90 | |
155b680d | 91 | # SCPI support |
67bd8055 | 92 | libsigrok_la_SOURCES += \ |
155b680d | 93 | src/scpi/scpi.c \ |
91ef511d | 94 | src/scpi/helpers.c \ |
155b680d | 95 | src/scpi/scpi_tcp.c |
67bd8055 UH |
96 | if NEED_RPC |
97 | libsigrok_la_SOURCES += \ | |
155b680d BV |
98 | src/scpi/scpi_vxi.c \ |
99 | src/scpi/vxi_clnt.c \ | |
100 | src/scpi/vxi_xdr.c \ | |
101 | src/scpi/vxi.h | |
67bd8055 UH |
102 | endif |
103 | if NEED_SERIAL | |
104 | libsigrok_la_SOURCES += \ | |
155b680d BV |
105 | src/serial.c \ |
106 | src/scpi/scpi_serial.c | |
67bd8055 UH |
107 | endif |
108 | if NEED_USB | |
109 | libsigrok_la_SOURCES += \ | |
155b680d BV |
110 | src/ezusb.c \ |
111 | src/usb.c \ | |
112 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
113 | endif |
114 | if NEED_VISA | |
115 | libsigrok_la_SOURCES += \ | |
155b680d | 116 | src/scpi/scpi_visa.c |
67bd8055 | 117 | endif |
bb2a4ed4 ML |
118 | if NEED_GPIB |
119 | libsigrok_la_SOURCES += \ | |
7343ad1e | 120 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 121 | endif |
67bd8055 | 122 | |
f54ebe0c | 123 | # Modbus support |
daa39012 AJ |
124 | libsigrok_la_SOURCES += \ |
125 | src/modbus/modbus.c | |
4c938fc2 AJ |
126 | if NEED_SERIAL |
127 | libsigrok_la_SOURCES += \ | |
128 | src/modbus/modbus_serial_rtu.c | |
129 | endif | |
daa39012 | 130 | |
155b680d BV |
131 | # Hardware (DMM chip parsers) |
132 | libsigrok_la_SOURCES += \ | |
133 | src/dmm/es519xx.c \ | |
134 | src/dmm/fs9721.c \ | |
135 | src/dmm/fs9922.c \ | |
136 | src/dmm/m2110.c \ | |
137 | src/dmm/metex14.c \ | |
a24c3f4a | 138 | src/dmm/rs9lcd.c \ |
626027df | 139 | src/dmm/bm25x.c \ |
f3cde309 | 140 | src/dmm/ut71x.c \ |
c36f78f7 UH |
141 | src/dmm/ut372.c \ |
142 | src/dmm/vc870.c | |
67bd8055 | 143 | |
6bcb3ee8 | 144 | # Hardware (LCR chip parsers) |
d378f100 | 145 | if NEED_SERIAL |
6bcb3ee8 JH |
146 | libsigrok_la_SOURCES += \ |
147 | src/lcr/es51919.c | |
d378f100 | 148 | endif |
6bcb3ee8 | 149 | |
e5d953b5 UH |
150 | # Hardware (Scale protocol parsers) |
151 | libsigrok_la_SOURCES += \ | |
152 | src/scale/kern.c | |
153 | ||
67bd8055 UH |
154 | # Hardware drivers |
155 | if HW_AGILENT_DMM | |
156 | libsigrok_la_SOURCES += \ | |
155b680d BV |
157 | src/hardware/agilent-dmm/api.c \ |
158 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
159 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 160 | endif |
67bd8055 UH |
161 | if HW_APPA_55II |
162 | libsigrok_la_SOURCES += \ | |
155b680d BV |
163 | src/hardware/appa-55ii/protocol.h \ |
164 | src/hardware/appa-55ii/protocol.c \ | |
165 | src/hardware/appa-55ii/api.c | |
67bd8055 UH |
166 | endif |
167 | if HW_ASIX_SIGMA | |
168 | libsigrok_la_SOURCES += \ | |
155b680d BV |
169 | src/hardware/asix-sigma/asix-sigma.h \ |
170 | src/hardware/asix-sigma/asix-sigma.c | |
67bd8055 UH |
171 | endif |
172 | if HW_ATTEN_PPS3XXX | |
173 | libsigrok_la_SOURCES += \ | |
155b680d BV |
174 | src/hardware/atten-pps3xxx/protocol.h \ |
175 | src/hardware/atten-pps3xxx/protocol.c \ | |
176 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 177 | endif |
dfaee1de BG |
178 | if HW_BAYLIBRE_ACME |
179 | libsigrok_la_SOURCES += \ | |
180 | src/hardware/baylibre-acme/protocol.h \ | |
181 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
182 | src/hardware/baylibre-acme/api.c \ |
183 | src/hardware/baylibre-acme/gpio.h \ | |
184 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 185 | endif |
bb993797 KA |
186 | if HW_BEAGLELOGIC |
187 | libsigrok_la_SOURCES += \ | |
3db4b08b | 188 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
189 | src/hardware/beaglelogic/protocol.h \ |
190 | src/hardware/beaglelogic/protocol.c \ | |
191 | src/hardware/beaglelogic/api.c | |
bb993797 | 192 | endif |
67bd8055 UH |
193 | if HW_BRYMEN_BM86X |
194 | libsigrok_la_SOURCES += \ | |
155b680d BV |
195 | src/hardware/brymen-bm86x/protocol.h \ |
196 | src/hardware/brymen-bm86x/protocol.c \ | |
197 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
198 | endif |
199 | if HW_BRYMEN_DMM | |
200 | libsigrok_la_SOURCES += \ | |
155b680d BV |
201 | src/hardware/brymen-dmm/parser.c \ |
202 | src/hardware/brymen-dmm/protocol.h \ | |
203 | src/hardware/brymen-dmm/protocol.c \ | |
204 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
205 | endif |
206 | if HW_CEM_DT_885X | |
207 | libsigrok_la_SOURCES += \ | |
155b680d BV |
208 | src/hardware/cem-dt-885x/protocol.h \ |
209 | src/hardware/cem-dt-885x/protocol.c \ | |
210 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
211 | endif |
212 | if HW_CENTER_3XX | |
213 | libsigrok_la_SOURCES += \ | |
155b680d BV |
214 | src/hardware/center-3xx/protocol.h \ |
215 | src/hardware/center-3xx/protocol.c \ | |
216 | src/hardware/center-3xx/api.c | |
67bd8055 | 217 | endif |
7b356712 | 218 | if HW_CHRONOVU_LA |
67bd8055 | 219 | libsigrok_la_SOURCES += \ |
155b680d BV |
220 | src/hardware/chronovu-la/protocol.h \ |
221 | src/hardware/chronovu-la/protocol.c \ | |
222 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
223 | endif |
224 | if HW_COLEAD_SLM | |
225 | libsigrok_la_SOURCES += \ | |
155b680d BV |
226 | src/hardware/colead-slm/protocol.h \ |
227 | src/hardware/colead-slm/protocol.c \ | |
228 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
229 | endif |
230 | if HW_CONRAD_DIGI_35_CPU | |
231 | libsigrok_la_SOURCES += \ | |
155b680d BV |
232 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
233 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
234 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
235 | endif |
236 | if HW_DEMO | |
237 | libsigrok_la_SOURCES += \ | |
155b680d | 238 | src/hardware/demo/demo.c |
67bd8055 | 239 | endif |
b5089195 JH |
240 | if HW_DEREE_DE5000 |
241 | libsigrok_la_SOURCES += \ | |
242 | src/hardware/deree-de5000/api.c | |
243 | endif | |
67bd8055 UH |
244 | if HW_FLUKE_DMM |
245 | libsigrok_la_SOURCES += \ | |
155b680d BV |
246 | src/hardware/fluke-dmm/fluke-dmm.h \ |
247 | src/hardware/fluke-dmm/fluke.c \ | |
248 | src/hardware/fluke-dmm/api.c | |
67bd8055 UH |
249 | endif |
250 | if HW_FX2LAFW | |
251 | libsigrok_la_SOURCES += \ | |
155b680d BV |
252 | src/hardware/fx2lafw/protocol.h \ |
253 | src/hardware/fx2lafw/protocol.c \ | |
a7d7f93c | 254 | src/hardware/fx2lafw/api.c \ |
b9d53092 BV |
255 | src/hardware/fx2lafw/dslogic.c \ |
256 | src/hardware/fx2lafw/dslogic.h | |
67bd8055 UH |
257 | endif |
258 | if HW_GMC_MH_1X_2X | |
259 | libsigrok_la_SOURCES += \ | |
155b680d BV |
260 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
261 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
262 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 UH |
263 | endif |
264 | if HW_HAMEG_HMO | |
265 | libsigrok_la_SOURCES += \ | |
155b680d BV |
266 | src/hardware/hameg-hmo/protocol.h \ |
267 | src/hardware/hameg-hmo/protocol.c \ | |
268 | src/hardware/hameg-hmo/api.c | |
67bd8055 UH |
269 | endif |
270 | if HW_HANTEK_DSO | |
271 | libsigrok_la_SOURCES += \ | |
155b680d BV |
272 | src/hardware/hantek-dso/dso.h \ |
273 | src/hardware/hantek-dso/dso.c \ | |
274 | src/hardware/hantek-dso/api.c | |
67bd8055 UH |
275 | endif |
276 | if HW_IKALOGIC_SCANALOGIC2 | |
277 | libsigrok_la_SOURCES += \ | |
155b680d BV |
278 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
279 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
280 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
281 | endif |
282 | if HW_IKALOGIC_SCANAPLUS | |
283 | libsigrok_la_SOURCES += \ | |
155b680d BV |
284 | src/hardware/ikalogic-scanaplus/protocol.h \ |
285 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
286 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
287 | endif |
288 | if HW_KECHENG_KC_330B | |
289 | libsigrok_la_SOURCES += \ | |
155b680d BV |
290 | src/hardware/kecheng-kc-330b/protocol.h \ |
291 | src/hardware/kecheng-kc-330b/protocol.c \ | |
292 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 293 | endif |
9380ec2f UH |
294 | if HW_KERN_SCALE |
295 | libsigrok_la_SOURCES += \ | |
296 | src/hardware/kern-scale/protocol.h \ | |
297 | src/hardware/kern-scale/protocol.c \ | |
298 | src/hardware/kern-scale/api.c | |
299 | endif | |
67bd8055 UH |
300 | if HW_LASCAR_EL_USB |
301 | libsigrok_la_SOURCES += \ | |
155b680d BV |
302 | src/hardware/lascar-el-usb/protocol.h \ |
303 | src/hardware/lascar-el-usb/protocol.c \ | |
304 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 305 | endif |
8f4e922f UH |
306 | if HW_MANSON_HCS_3XXX |
307 | libsigrok_la_SOURCES += \ | |
155b680d BV |
308 | src/hardware/manson-hcs-3xxx/protocol.h \ |
309 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
310 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 311 | endif |
e1ccfb19 AJ |
312 | if HW_MAYNUO_M97 |
313 | libsigrok_la_SOURCES += \ | |
314 | src/hardware/maynuo-m97/protocol.h \ | |
315 | src/hardware/maynuo-m97/protocol.c \ | |
316 | src/hardware/maynuo-m97/api.c | |
317 | endif | |
67bd8055 UH |
318 | if HW_MIC_985XX |
319 | libsigrok_la_SOURCES += \ | |
155b680d BV |
320 | src/hardware/mic-985xx/protocol.h \ |
321 | src/hardware/mic-985xx/protocol.c \ | |
322 | src/hardware/mic-985xx/api.c | |
67bd8055 | 323 | endif |
41b7bd01 MH |
324 | if HW_MOTECH_LPS_30X |
325 | libsigrok_la_SOURCES += \ | |
155b680d BV |
326 | src/hardware/motech-lps-30x/protocol.h \ |
327 | src/hardware/motech-lps-30x/protocol.c \ | |
328 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 329 | endif |
67bd8055 UH |
330 | if HW_NORMA_DMM |
331 | libsigrok_la_SOURCES += \ | |
155b680d BV |
332 | src/hardware/norma-dmm/protocol.h \ |
333 | src/hardware/norma-dmm/protocol.c \ | |
334 | src/hardware/norma-dmm/api.c | |
67bd8055 | 335 | endif |
d4b38748 | 336 | if HW_OPENBENCH_LOGIC_SNIFFER |
67bd8055 | 337 | libsigrok_la_SOURCES += \ |
155b680d BV |
338 | src/hardware/openbench-logic-sniffer/protocol.h \ |
339 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
340 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 341 | endif |
4bd80e12 | 342 | if HW_PIPISTRELLO_OLS |
343 | libsigrok_la_SOURCES += \ | |
344 | src/hardware/pipistrello-ols/protocol.h \ | |
345 | src/hardware/pipistrello-ols/protocol.c \ | |
346 | src/hardware/pipistrello-ols/api.c | |
347 | endif | |
67bd8055 UH |
348 | if HW_RIGOL_DS |
349 | libsigrok_la_SOURCES += \ | |
155b680d BV |
350 | src/hardware/rigol-ds/protocol.h \ |
351 | src/hardware/rigol-ds/protocol.c \ | |
352 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
353 | endif |
354 | if HW_SALEAE_LOGIC16 | |
355 | libsigrok_la_SOURCES += \ | |
155b680d BV |
356 | src/hardware/saleae-logic16/protocol.h \ |
357 | src/hardware/saleae-logic16/protocol.c \ | |
358 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 359 | endif |
ca1a7cb5 BV |
360 | if HW_SCPI_PPS |
361 | libsigrok_la_SOURCES += \ | |
362 | src/hardware/scpi-pps/protocol.h \ | |
363 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 364 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
365 | src/hardware/scpi-pps/api.c |
366 | endif | |
67bd8055 UH |
367 | if HW_SERIAL_DMM |
368 | libsigrok_la_SOURCES += \ | |
155b680d BV |
369 | src/hardware/serial-dmm/protocol.h \ |
370 | src/hardware/serial-dmm/protocol.c \ | |
371 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
372 | endif |
373 | if HW_SYSCLK_LWLA | |
374 | libsigrok_la_SOURCES += \ | |
155b680d BV |
375 | src/hardware/sysclk-lwla/lwla.h \ |
376 | src/hardware/sysclk-lwla/lwla.c \ | |
377 | src/hardware/sysclk-lwla/protocol.h \ | |
378 | src/hardware/sysclk-lwla/protocol.c \ | |
379 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
380 | endif |
381 | if HW_TELEINFO | |
382 | libsigrok_la_SOURCES += \ | |
155b680d BV |
383 | src/hardware/teleinfo/protocol.h \ |
384 | src/hardware/teleinfo/protocol.c \ | |
385 | src/hardware/teleinfo/api.c | |
67bd8055 | 386 | endif |
0acdd793 BV |
387 | if HW_TESTO |
388 | libsigrok_la_SOURCES += \ | |
155b680d BV |
389 | src/hardware/testo/protocol.h \ |
390 | src/hardware/testo/protocol.c \ | |
391 | src/hardware/testo/api.c | |
0acdd793 | 392 | endif |
67bd8055 UH |
393 | if HW_TONDAJ_SL_814 |
394 | libsigrok_la_SOURCES += \ | |
155b680d BV |
395 | src/hardware/tondaj-sl-814/protocol.h \ |
396 | src/hardware/tondaj-sl-814/protocol.c \ | |
397 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
398 | endif |
399 | if HW_UNI_T_DMM | |
400 | libsigrok_la_SOURCES += \ | |
155b680d BV |
401 | src/hardware/uni-t-dmm/protocol.h \ |
402 | src/hardware/uni-t-dmm/protocol.c \ | |
403 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
404 | endif |
405 | if HW_UNI_T_UT32X | |
406 | libsigrok_la_SOURCES += \ | |
155b680d BV |
407 | src/hardware/uni-t-ut32x/protocol.h \ |
408 | src/hardware/uni-t-ut32x/protocol.c \ | |
409 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
410 | endif |
411 | if HW_VICTOR_DMM | |
412 | libsigrok_la_SOURCES += \ | |
155b680d BV |
413 | src/hardware/victor-dmm/protocol.h \ |
414 | src/hardware/victor-dmm/protocol.c \ | |
415 | src/hardware/victor-dmm/api.c | |
67bd8055 | 416 | endif |
10763937 SA |
417 | if HW_YOKOGAWA_DLM |
418 | libsigrok_la_SOURCES += \ | |
419 | src/hardware/yokogawa-dlm/protocol.h \ | |
420 | src/hardware/yokogawa-dlm/protocol.c \ | |
421 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
422 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
423 | src/hardware/yokogawa-dlm/api.c | |
424 | endif | |
67bd8055 UH |
425 | if HW_ZEROPLUS_LOGIC_CUBE |
426 | libsigrok_la_SOURCES += \ | |
155b680d BV |
427 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
428 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
429 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
430 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
431 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
432 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
433 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
434 | endif |
435 | ||
bc8ff24d | 436 | libsigrok_la_LIBADD = $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 437 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 438 | |
45c59c8b | 439 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
440 | library_include_HEADERS = \ |
441 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
442 | include/libsigrok/proto.h |
443 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 444 | include/libsigrok/version.h |
155b680d | 445 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 446 | |
8a7b47cd UH |
447 | pkgconfigdir = $(libdir)/pkgconfig |
448 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 449 | |
67bd8055 UH |
450 | EXTRA_DIST = \ |
451 | Doxyfile \ | |
452 | HACKING \ | |
453 | README.devices \ | |
31ac7735 DE |
454 | bindings/cxx/ConfigKey_methods.cpp \ |
455 | bindings/cxx/ConfigKey_methods.hpp \ | |
456 | bindings/cxx/ConfigKey_methods.i \ | |
457 | bindings/cxx/Doxyfile \ | |
458 | bindings/cxx/QuantityFlag_methods.cpp \ | |
459 | bindings/cxx/QuantityFlag_methods.hpp \ | |
460 | bindings/cxx/enums.py \ | |
461 | bindings/python/Doxyfile \ | |
462 | bindings/python/setup.py \ | |
463 | bindings/python/sigrok/__init__.py \ | |
464 | bindings/python/sigrok/core/__init__.py \ | |
465 | bindings/python/sigrok/core/classes.i \ | |
466 | bindings/java/Doxyfile \ | |
467 | bindings/java/org/sigrok/core/classes/classes.i \ | |
468 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
469 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
470 | bindings/java/org/sigrok/core/interfaces/SourceCallback.java \ | |
471 | bindings/swig/classes.i \ | |
472 | bindings/swig/doc.py \ | |
67bd8055 UH |
473 | contrib/gnuplot_chronovu_la8.gpi \ |
474 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
475 | contrib/gnuplot_usbeesx.gpi \ | |
476 | contrib/gnuplot_usbeedx8.gpi \ | |
477 | contrib/gnuplot_usbeedx16.gpi \ | |
478 | contrib/sigrok-logo-notext.png \ | |
479 | contrib/z60_libsigrok.rules | |
480 | ||
481 | if HAVE_CHECK | |
02a2bf68 | 482 | TESTS = tests/main |
67bd8055 | 483 | check_PROGRAMS = ${TESTS} |
65489c1a | 484 | endif |
67bd8055 | 485 | |
02a2bf68 | 486 | tests_main_SOURCES = \ |
6592c369 | 487 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
488 | tests/lib.c \ |
489 | tests/lib.h \ | |
02a2bf68 UH |
490 | tests/main.c \ |
491 | tests/core.c \ | |
492 | tests/input_all.c \ | |
493 | tests/input_binary.c \ | |
494 | tests/output_all.c \ | |
495 | tests/transform_all.c \ | |
496 | tests/session.c \ | |
497 | tests/strutil.c \ | |
498 | tests/version.c \ | |
499 | tests/driver_all.c \ | |
500 | tests/device.c \ | |
501 | tests/trigger.c | |
502 | ||
65489c1a | 503 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 504 | |
580ed400 ML |
505 | BUILD_EXTRA = |
506 | INSTALL_EXTRA = | |
507 | CLEAN_EXTRA = | |
508 | ||
c23c8659 ML |
509 | if BINDINGS_CXX |
510 | ||
52ff4f6a | 511 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 512 | |
52ff4f6a | 513 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 514 | |
bc8ff24d | 515 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) |
1f61c22f | 516 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 517 | |
0959ed3d UH |
518 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
519 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
520 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
521 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 522 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 523 | |
52ff4f6a | 524 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 525 | |
3532ed01 | 526 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 527 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 528 | |
cf5b338e | 529 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 530 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 531 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 532 | |
b595a458 | 533 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 534 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 535 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 536 | $(AM_V_at)touch $@ |
c23c8659 | 537 | |
580ed400 | 538 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 539 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 540 | |
580ed400 | 541 | cxx-clean: |
3532ed01 | 542 | rm -rf doxy/ |
bd4fda24 | 543 | rm -rf bindings/cxx/doxy/ |
580ed400 | 544 | rm -f bindings/cxx/enums.cpp |
161dc24d | 545 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 546 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 547 | |
580ed400 ML |
548 | CLEAN_EXTRA += cxx-clean |
549 | ||
550 | endif | |
f7740954 | 551 | |
bd4fda24 ML |
552 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
553 | ||
161dc24d | 554 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 555 | bindings/cxx/enums.timestamp |
33c84e81 | 556 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 557 | |
f7740954 ML |
558 | if BINDINGS_PYTHON |
559 | ||
d1785122 | 560 | PDIR = bindings/python |
bd4fda24 ML |
561 | PDOC = bindings/python/sigrok/core/doc.i |
562 | ||
c05a0ba5 DE |
563 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
564 | setup_quiet = --quiet | |
565 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 566 | |
dbde3b65 | 567 | $(PDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 568 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
dbde3b65 | 569 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) > $@ |
d1785122 ML |
570 | |
571 | python-build: $(PDIR)/timestamp | |
572 | ||
52ff4f6a | 573 | $(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \ |
cf5b338e DE |
574 | bindings/swig/classes.i bindings/swig/enums.i $(PDOC) \ |
575 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) | |
a9cb82ac DE |
576 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
577 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" build_py | |
578 | $(AM_V_at): >$@ | |
f7740954 | 579 | |
a9cb82ac DE |
580 | python-install: |
581 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
582 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
583 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 584 | |
c26162ff | 585 | python-clean: |
a9cb82ac DE |
586 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
587 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 588 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
589 | |
590 | python-doc: | |
a9cb82ac | 591 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
592 | |
593 | BUILD_EXTRA += python-build | |
594 | INSTALL_EXTRA += python-install | |
595 | CLEAN_EXTRA += python-clean | |
596 | ||
597 | endif | |
598 | ||
9fcf4d0b ML |
599 | if BINDINGS_JAVA |
600 | ||
601 | JDIR = bindings/java | |
90bd7656 ML |
602 | JPKG = org/sigrok/core |
603 | JCLS = $(JDIR)/$(JPKG)/classes | |
604 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 605 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 606 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 607 | JDOC = $(JCLS)/doc.i |
90bd7656 | 608 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
609 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
610 | JJAR = $(JDIR)/sigrok-core.jar | |
611 | ||
a9cb82ac DE |
612 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
613 | ||
9fcf4d0b ML |
614 | java-build: $(JJAR) $(JLIB) |
615 | ||
dbde3b65 | 616 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 617 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 618 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 619 | |
dbde3b65 | 620 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \ |
cf5b338e | 621 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
a9cb82ac | 622 | -$(AM_V_at)rm -f $(java_cleanfiles) |
3f03ffaf | 623 | $(AM_V_GEN)$(SWIG) -c++ -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
624 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
625 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 626 | |
90bd7656 | 627 | $(JJAR): $(JCXX) |
1f61c22f | 628 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 629 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 630 | |
cf5b338e | 631 | $(JLIB): $(JCXX) bindings/cxx/libsigrokcxx.la $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
1f61c22f | 632 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 633 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
1f61c22f | 634 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
635 | |
636 | java-install: | |
df705a7a JP |
637 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
638 | $(INSTALL) $(JLIB) -t $(DESTDIR)$(libdir)/jni | |
639 | $(INSTALL) -d $(DESTDIR)$(datadir)/java | |
640 | $(INSTALL) $(JJAR) -t $(DESTDIR)$(datadir)/java | |
9fcf4d0b ML |
641 | |
642 | java-clean: | |
a9cb82ac DE |
643 | -$(AM_V_at)rm -f $(java_cleanfiles) |
644 | -$(AM_V_at)rm -fr $(JDIR)/doxy | |
8a314e90 ML |
645 | |
646 | java-doc: | |
a9cb82ac | 647 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
648 | |
649 | BUILD_EXTRA += java-build | |
650 | INSTALL_EXTRA += java-install | |
651 | CLEAN_EXTRA += java-clean | |
652 | ||
653 | endif | |
654 | ||
f7740954 ML |
655 | all-local: $(BUILD_EXTRA) |
656 | install-exec-local: $(INSTALL_EXTRA) | |
d1785122 | 657 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 658 | |
c0958408 | 659 | MAINTAINERCLEANFILES = ChangeLog |
0fc12d66 UH |
660 | |
661 | .PHONY: ChangeLog | |
662 | ChangeLog: | |
bd58d8f3 | 663 | git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog |
0fc12d66 UH |
664 | |
665 | dist-hook: ChangeLog | |
666 |