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